Browse Source

Merge pull request #122 from bryanjswift/recipient_delimiter

recipient_delimeter not working
Luke Cyca 10 years ago
parent
commit
94272dd5e0
2 changed files with 12 additions and 2 deletions
  1. 2
    2
      roles/mailserver/files/etc_postfix_master.cf
  2. 10
    0
      tests.py

+ 2
- 2
roles/mailserver/files/etc_postfix_master.cf View File

@@ -126,6 +126,6 @@ mailman   unix  -       n       n       -       -       pipe
126 126
   ${nexthop} ${user}
127 127
 # spam protection
128 128
 dspam     unix  -       n       n       -       10      pipe
129
-  flags=Ru user=dspam argv=/usr/bin/dspam --deliver=innocent,spam --user $recipient -i -f $sender -- $recipient
129
+  flags=Ru user=dspam argv=/usr/bin/dspam --deliver=innocent,spam --user ${user}@${nexthop} -i -f $sender -- $recipient
130 130
 dovecot   unix  -       n       n       -       -       pipe
131
-  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -d ${recipient}
131
+  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -d ${user}@${nexthop}

+ 10
- 0
tests.py View File

@@ -199,6 +199,16 @@ class MailTests(unittest.TestCase):
199 199
         s.quit()
200 200
         self.assertEmailReceived(subject)
201 201
 
202
+    def test_smtps_delimiter_to(self):
203
+        """Email sent to address with delimiter is delivered"""
204
+        import smtplib
205
+        msg, subject = new_message(TEST_ADDRESS, 'root+foo@sovereign.local')
206
+        s = smtplib.SMTP_SSL(TEST_SERVER, 465)
207
+        s.login(TEST_ADDRESS, TEST_PASSWORD)
208
+        s.sendmail(TEST_ADDRESS, ['root+foo@sovereign.local'], msg)
209
+        s.quit()
210
+        self.assertEmailReceived(subject)
211
+
202 212
     def test_smtps_requires_auth(self):
203 213
         """SMTPS with no authentication is rejected"""
204 214
         import smtplib

Loading…
Cancel
Save