Преглед изворни кода

Merge pull request #122 from bryanjswift/recipient_delimiter

recipient_delimeter not working
Luke Cyca пре 11 година
родитељ
комит
94272dd5e0
2 измењених фајлова са 12 додато и 2 уклоњено
  1. 2
    2
      roles/mailserver/files/etc_postfix_master.cf
  2. 10
    0
      tests.py

+ 2
- 2
roles/mailserver/files/etc_postfix_master.cf Прегледај датотеку

126
   ${nexthop} ${user}
126
   ${nexthop} ${user}
127
 # spam protection
127
 # spam protection
128
 dspam     unix  -       n       n       -       10      pipe
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
 dovecot   unix  -       n       n       -       -       pipe
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 Прегледај датотеку

199
         s.quit()
199
         s.quit()
200
         self.assertEmailReceived(subject)
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
     def test_smtps_requires_auth(self):
212
     def test_smtps_requires_auth(self):
203
         """SMTPS with no authentication is rejected"""
213
         """SMTPS with no authentication is rejected"""
204
         import smtplib
214
         import smtplib

Loading…
Откажи
Сачувај