4 >>> smtpd_delay_reject 0
6 >>> mynetworks 127.0.0.0/8,168.100.189.0/28
8 >>> relay_domains porcupine.org
10 >>> smtpd_null_access_lookup_key <>
13 >>> # Test check_domain_access()
15 >>> helo_restrictions hash:./smtpd_check_access
18 >>> helo foo.dunno.com
19 ./smtpd_check: <queue id>: reject: HELO from localhost[127.0.0.1]: 554 5.7.1 <foo.dunno.com>: Helo command rejected: Access denied; proto=SMTP helo=<foo.dunno.com>
20 554 5.7.1 <foo.dunno.com>: Helo command rejected: Access denied
22 >>> helo bar.dunno.com
25 >>> helo foo.duuno.com
28 >>> # Test check_namadr_access(), domain part
30 >>> client_restrictions hash:./smtpd_check_access
33 >>> client foo.dunno.com 131.155.210.17
34 ./smtpd_check: <queue id>: reject: CONNECT from foo.dunno.com[131.155.210.17]: 554 5.7.1 <foo.dunno.com[131.155.210.17]>: Client host rejected: Access denied; proto=SMTP helo=<foo.duuno.com>
35 554 5.7.1 <foo.dunno.com[131.155.210.17]>: Client host rejected: Access denied
37 >>> client bar.dunno.com 131.155.210.17
40 >>> client bar.dunno.com 131.155.210.19
43 >>> # Test check_namadr_access(), address part
46 >>> client bar.duno.com 131.155.210.17
49 >>> client bar.duno.com 131.155.210.19
50 ./smtpd_check: <queue id>: reject: CONNECT from bar.duno.com[131.155.210.19]: 554 5.7.1 <bar.duno.com[131.155.210.19]>: Client host rejected: Access denied; proto=SMTP helo=<foo.duuno.com>
51 554 5.7.1 <bar.duno.com[131.155.210.19]>: Client host rejected: Access denied
53 >>> client bar.duno.com 44.33.22.11
54 ./smtpd_check: <queue id>: reject: CONNECT from bar.duno.com[44.33.22.11]: 554 5.7.1 <bar.duno.com[44.33.22.11]>: Client host rejected: Access denied; proto=SMTP helo=<foo.duuno.com>
55 554 5.7.1 <bar.duno.com[44.33.22.11]>: Client host rejected: Access denied
57 >>> client bar.duno.com 44.33.22.55
60 >>> client bar.duno.com 44.33.44.33
61 ./smtpd_check: <queue id>: reject: CONNECT from bar.duno.com[44.33.44.33]: 554 5.7.1 <bar.duno.com[44.33.44.33]>: Client host rejected: Access denied; proto=SMTP helo=<foo.duuno.com>
62 554 5.7.1 <bar.duno.com[44.33.44.33]>: Client host rejected: Access denied
64 >>> # Test check_mail_access()
66 >>> sender_restrictions hash:./smtpd_check_access
69 >>> mail reject@dunno.domain
70 ./smtpd_check: <queue id>: reject: MAIL from bar.duno.com[44.33.44.33]: 554 5.7.1 <reject@dunno.domain>: Sender address rejected: Access denied; from=<reject@dunno.domain> proto=SMTP helo=<foo.duuno.com>
71 554 5.7.1 <reject@dunno.domain>: Sender address rejected: Access denied
73 >>> mail ok@dunno.domain
76 >>> mail anyone@dunno.domain
79 >>> mail bad-sender@dunno.domain
82 >>> # Again, with a domain that rejects by default
85 >>> mail reject@reject.domain
86 ./smtpd_check: <queue id>: reject: MAIL from bar.duno.com[44.33.44.33]: 554 5.7.1 <reject@reject.domain>: Sender address rejected: Access denied; from=<reject@reject.domain> proto=SMTP helo=<foo.duuno.com>
87 554 5.7.1 <reject@reject.domain>: Sender address rejected: Access denied
89 >>> mail ok@reject.domain
92 >>> mail anyone@reject.domain
93 ./smtpd_check: <queue id>: reject: MAIL from bar.duno.com[44.33.44.33]: 554 5.7.1 <anyone@reject.domain>: Sender address rejected: Access denied; from=<anyone@reject.domain> proto=SMTP helo=<foo.duuno.com>
94 554 5.7.1 <anyone@reject.domain>: Sender address rejected: Access denied
96 >>> mail good-sender@reject.domain
97 ./smtpd_check: <queue id>: reject: MAIL from bar.duno.com[44.33.44.33]: 554 5.7.1 <good-sender@reject.domain>: Sender address rejected: Access denied; from=<good-sender@reject.domain> proto=SMTP helo=<foo.duuno.com>
98 554 5.7.1 <good-sender@reject.domain>: Sender address rejected: Access denied
100 >>> # Again, with a domain that accepts by default
103 >>> mail reject@ok.domain
104 ./smtpd_check: <queue id>: reject: MAIL from bar.duno.com[44.33.44.33]: 554 5.7.1 <reject@ok.domain>: Sender address rejected: Access denied; from=<reject@ok.domain> proto=SMTP helo=<foo.duuno.com>
105 554 5.7.1 <reject@ok.domain>: Sender address rejected: Access denied
107 >>> mail ok@ok.domain
110 >>> mail anyone@ok.domain
113 >>> mail bad-sender@ok.domain
116 >>> # Test check_mail_access()
118 >>> recipient_restrictions hash:./smtpd_check_access
121 >>> rcpt reject@dunno.domain
122 ./smtpd_check: <queue id>: reject: RCPT from bar.duno.com[44.33.44.33]: 554 5.7.1 <reject@dunno.domain>: Recipient address rejected: Access denied; from=<bad-sender@ok.domain> to=<reject@dunno.domain> proto=SMTP helo=<foo.duuno.com>
123 554 5.7.1 <reject@dunno.domain>: Recipient address rejected: Access denied
125 >>> recipient_delimiter +
127 >>> rcpt reject+ext@dunno.domain
128 ./smtpd_check: <queue id>: reject: RCPT from bar.duno.com[44.33.44.33]: 554 5.7.1 <reject+ext@dunno.domain>: Recipient address rejected: Access denied; from=<bad-sender@ok.domain> to=<reject+ext@dunno.domain> proto=SMTP helo=<foo.duuno.com>
129 554 5.7.1 <reject+ext@dunno.domain>: Recipient address rejected: Access denied
130 >>> recipient_delimiter |
133 >>> rcpt ok@dunno.domain
136 >>> recipient_delimiter +
138 >>> rcpt ok+ext@dunno.domain
140 >>> recipient_delimiter |
143 >>> rcpt anyone@dunno.domain
146 >>> rcpt bad-sender@dunno.domain
149 >>> # Again, with a domain that rejects by default
152 >>> rcpt reject@reject.domain
153 ./smtpd_check: <queue id>: reject: RCPT from bar.duno.com[44.33.44.33]: 554 5.7.1 <reject@reject.domain>: Recipient address rejected: Access denied; from=<bad-sender@ok.domain> to=<reject@reject.domain> proto=SMTP helo=<foo.duuno.com>
154 554 5.7.1 <reject@reject.domain>: Recipient address rejected: Access denied
156 >>> rcpt ok@reject.domain
159 >>> rcpt anyone@reject.domain
160 ./smtpd_check: <queue id>: reject: RCPT from bar.duno.com[44.33.44.33]: 554 5.7.1 <anyone@reject.domain>: Recipient address rejected: Access denied; from=<bad-sender@ok.domain> to=<anyone@reject.domain> proto=SMTP helo=<foo.duuno.com>
161 554 5.7.1 <anyone@reject.domain>: Recipient address rejected: Access denied
163 >>> rcpt good-sender@reject.domain
164 ./smtpd_check: <queue id>: reject: RCPT from bar.duno.com[44.33.44.33]: 554 5.7.1 <good-sender@reject.domain>: Recipient address rejected: Access denied; from=<bad-sender@ok.domain> to=<good-sender@reject.domain> proto=SMTP helo=<foo.duuno.com>
165 554 5.7.1 <good-sender@reject.domain>: Recipient address rejected: Access denied
167 >>> # Again, with a domain that accepts by default
170 >>> rcpt reject@ok.domain
171 ./smtpd_check: <queue id>: reject: RCPT from bar.duno.com[44.33.44.33]: 554 5.7.1 <reject@ok.domain>: Recipient address rejected: Access denied; from=<bad-sender@ok.domain> to=<reject@ok.domain> proto=SMTP helo=<foo.duuno.com>
172 554 5.7.1 <reject@ok.domain>: Recipient address rejected: Access denied
174 >>> rcpt ok@ok.domain
177 >>> rcpt anyone@ok.domain
180 >>> rcpt bad-sender@ok.domain
183 >>> # check_sender_access specific
186 ./smtpd_check: <queue id>: reject: MAIL from bar.duno.com[44.33.44.33]: 550 5.7.1 <>: Sender address rejected: Go away postmaster; from=<> proto=SMTP helo=<foo.duuno.com>
187 550 5.7.1 <>: Sender address rejected: Go away postmaster