Commits

Zhang Huangbin  committed 21cf0f3

Use 'OK' instead of 'DUNNO' for whitelisted senders.

  • Participants
  • Parent commits 68800eb

Comments (0)

Files changed (2)

File src/libs/__init__.py

 __author__ = 'Zhang Huangbin <zhb@iredmail.org>'
 __version__ = '1.3.7'
 
-SMTP_ACTIONS = {'accept': 'DUNNO',
+SMTP_ACTIONS = {'accept': 'OK',
                 'defer': 'DEFER_IF_PERMIT Service temporarily unavailable',
                 'reject': 'REJECT Not authorized',
                 'default': 'DUNNO',

File src/plugins/block_amavisd_blacklisted_senders.py

 
 PLUGIN_NAME = 'block_amavisd_blacklisted_senders'
 
+from libs import SMTP_ACTIONS
+
 def restriction(smtpSessionData, ldapRecipientLdif, logger, **kargs):
     # Get sender address.
     sender = smtpSessionData.get('sender').lower()
 
     # Bypass whitelisted senders.
     if len(valid_amavisd_senders & wlSenders) > 0:
-        return 'DUNNO Whitelisted'
+        return SMTP_ACTIONS['accept']
 
     # Reject blacklisted senders.
     if len(valid_amavisd_senders & blSenders) > 0: