Commits

Zhang Huangbin committed 01c081a

Fixed: Incorrect detection of domain (missing '@').
Thanks wildweasel@forum for the report.

  • Participants
  • Parent commits 4cede47

Comments (0)

Files changed (2)

 iRedAPD-1.4.2:
     * Fixed:
+        + Incorrect detection of domain (missing '@').
+          Thanks wildweasel@forum for the report.
         + Fix Python path on FreeBSD after the latest ports tree update.
           Thanks hainan <hasanalpinan _at_ gmail> in our online support forum
           for the report and fix.

File plugins/sql_user_restrictions.py

 
             if all_allowed_recipients:
                 if recipient in all_allowed_recipients \
-                   or recipient_domain in all_allowed_recipients \
+                   or '@' + recipient_domain in all_allowed_recipients \
                    or '@.' + recipient_domain in all_allowed_recipients \
                    or '@.' in all_allowed_recipients:
                     return SMTP_ACTIONS['accept']
 
             if all_rejected_recipients:
                 if recipient in all_rejected_recipients \
-                   or recipient_domain in all_rejected_recipients \
+                   or '@' + recipient_domain in all_rejected_recipients \
                    or '@.' + recipient_domain in all_rejected_recipients \
                    or '@.' in all_rejected_recipients:
                     return SMTP_ACTIONS['reject']