No empty .Rs/.Re
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / smtpd / smtpd_acl.ref
blob110e7a57b8653c514acb967fa8700cc280a1cb92
1 >>> #
2 >>> # Initialize
3 >>> #
4 >>> smtpd_delay_reject 0
5 OK
6 >>> mynetworks 127.0.0.0/8,168.100.189.0/28
7 OK
8 >>> relay_domains porcupine.org
9 OK
10 >>> smtpd_null_access_lookup_key <> 
12 >>> #
13 >>> # Test check_domain_access()
14 >>> #
15 >>> helo_restrictions hash:./smtpd_check_access
17 >>> # Expect: REJECT
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
21 >>> # Expect: OK
22 >>> helo bar.dunno.com
24 >>> # Expect: OK
25 >>> helo foo.duuno.com
27 >>> #
28 >>> # Test check_namadr_access(), domain part
29 >>> #
30 >>> client_restrictions hash:./smtpd_check_access
32 >>> # Expect: REJECT
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
36 >>> # Expect: OK
37 >>> client bar.dunno.com 131.155.210.17
39 >>> # Expect: OK
40 >>> client bar.dunno.com 131.155.210.19
42 >>> #
43 >>> # Test check_namadr_access(), address part
44 >>> #
45 >>> # Expect: OK
46 >>> client bar.duno.com 131.155.210.17
48 >>> # Expect: REJECT
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
52 >>> # Expect: REJECT
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
56 >>> # Expect: OK
57 >>> client bar.duno.com 44.33.22.55
59 >>> # Expect: REJECT
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
63 >>> #
64 >>> # Test check_mail_access()
65 >>> #
66 >>> sender_restrictions hash:./smtpd_check_access
68 >>> # Expect: REJECT
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
72 >>> # Expect: OK
73 >>> mail ok@dunno.domain
75 >>> # Expect: OK
76 >>> mail anyone@dunno.domain
78 >>> # Expect: OK
79 >>> mail bad-sender@dunno.domain
81 >>> #
82 >>> # Again, with a domain that rejects by default
83 >>> #
84 >>> # Expect: REJECT  
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
88 >>> # Expect: OK
89 >>> mail ok@reject.domain
91 >>> # Expect: REJECT
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
95 >>> # Expect: REJECT
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
99 >>> #
100 >>> # Again, with a domain that accepts by default
101 >>> #
102 >>> # Expect: REJECT
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
106 >>> # Expect: OK
107 >>> mail ok@ok.domain
109 >>> # Expect: OK
110 >>> mail anyone@ok.domain
112 >>> # Expect: OK
113 >>> mail bad-sender@ok.domain
115 >>> #
116 >>> # Test check_mail_access()
117 >>> #
118 >>> recipient_restrictions hash:./smtpd_check_access
120 >>> # Expect: REJECT
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
124 >>> # Expect: REJECT
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 |
132 >>> # Expect: OK
133 >>> rcpt ok@dunno.domain
135 >>> # Expect: OK
136 >>> recipient_delimiter +
138 >>> rcpt ok+ext@dunno.domain
140 >>> recipient_delimiter |
142 >>> # Expect: OK
143 >>> rcpt anyone@dunno.domain
145 >>> # Expect: OK
146 >>> rcpt bad-sender@dunno.domain
148 >>> #
149 >>> # Again, with a domain that rejects by default
150 >>> #
151 >>> # Expect: REJECT  
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
155 >>> # Expect: OK
156 >>> rcpt ok@reject.domain
158 >>> # Expect: REJECT
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
162 >>> # Expect: REJECT
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
166 >>> #
167 >>> # Again, with a domain that accepts by default
168 >>> #
169 >>> # Expect: REJECT
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
173 >>> # Expect: OK
174 >>> rcpt ok@ok.domain
176 >>> # Expect: OK
177 >>> rcpt anyone@ok.domain
179 >>> # Expect: OK
180 >>> rcpt bad-sender@ok.domain
182 >>> #
183 >>> # check_sender_access specific
184 >>> #
185 >>> mail <>
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