1>>> #
2>>> # Initialize
3>>> #
4>>> smtpd_delay_reject 0
5OK
6>>> #
7>>> # Test check_domain_access()
8>>> #
9>>> helo_restrictions fail:1_helo_access
10OK
11>>> # Expect: REJECT (temporary lookup failure)
12>>> helo foobar
13./smtpd_check: warning: fail:1_helo_access lookup error for "foobar"
14./smtpd_check: <queue id>: reject: HELO from localhost[127.0.0.1]: 451 4.3.5 <foobar>: Helo command rejected: Server configuration error; proto=SMTP helo=<foobar>
15451 4.3.5 <foobar>: Helo command rejected: Server configuration error
16>>> #
17>>> # Test check_namadr_access()
18>>> #
19>>> client_restrictions fail:1_client_access
20OK
21>>> # Expect: REJECT (temporary lookup failure)
22>>> client foo.dunno.com 131.155.210.17
23./smtpd_check: warning: fail:1_client_access lookup error for "foo.dunno.com"
24./smtpd_check: <queue id>: reject: CONNECT from foo.dunno.com[131.155.210.17]: 451 4.3.5 <foo.dunno.com[131.155.210.17]>: Client host rejected: Server configuration error; proto=SMTP helo=<foobar>
25451 4.3.5 <foo.dunno.com[131.155.210.17]>: Client host rejected: Server configuration error
26>>> #
27>>> # Test check_mail_access()
28>>> #
29>>> sender_restrictions fail:1_sender_access
30OK
31>>> # Expect: REJECT (temporary lookup failure)
32>>> mail reject@dunno.domain
33./smtpd_check: warning: fail:1_sender_access lookup error for "reject@dunno.domain"
34./smtpd_check: <queue id>: reject: MAIL from foo.dunno.com[131.155.210.17]: 451 4.3.5 <reject@dunno.domain>: Sender address rejected: Server configuration error; from=<reject@dunno.domain> proto=SMTP helo=<foobar>
35451 4.3.5 <reject@dunno.domain>: Sender address rejected: Server configuration error
36>>> #
37>>> # Test check_rcpt_access()
38>>> #
39>>> recipient_restrictions fail:1_rcpt_access
40OK
41>>> # Expect: REJECT (temporary lookup failure)
42>>> rcpt reject@dunno.domain
43./smtpd_check: warning: fail:1_rcpt_access lookup error for "reject@dunno.domain"
44./smtpd_check: <queue id>: reject: RCPT from foo.dunno.com[131.155.210.17]: 451 4.3.5 <reject@dunno.domain>: Recipient address rejected: Server configuration error; from=<reject@dunno.domain> to=<reject@dunno.domain> proto=SMTP helo=<foobar>
45451 4.3.5 <reject@dunno.domain>: Recipient address rejected: Server configuration error
46>>> # Expect: OK
47>>> rcpt postmaster
48OK
49>>> #
50>>> # Test mynetworks in generic_checks().
51>>> #
52>>> mynetworks fail:1_mynetworks
53OK
54>>> #
55>>> # Expect REJECT (temporary lookup failure)
56>>> #
57>>> recipient_restrictions permit_mynetworks
58OK
59>>> rcpt reject@dunno.domain
60./smtpd_check: warning: mynetworks: fail:1_mynetworks: table lookup problem
61./smtpd_check: <queue id>: reject: RCPT from foo.dunno.com[131.155.210.17]: 451 4.3.0 <reject@dunno.domain>: Temporary lookup failure; from=<reject@dunno.domain> to=<reject@dunno.domain> proto=SMTP helo=<foobar>
62451 4.3.0 <reject@dunno.domain>: Temporary lookup failure
63>>> #
64>>> # Test mynetworks.
65>>> #
66>>> mynetworks 168.100.3.1/27
67OK
68>>> #
69>>> # Expect REJECT (server configuration error)
70>>> #
71>>> rcpt reject@dunno.domain
72./smtpd_check: warning: mynetworks: non-null host address bits in "168.100.3.1/27", perhaps you should use "168.100.3.0/27" instead
73./smtpd_check: <queue id>: reject: RCPT from foo.dunno.com[131.155.210.17]: 451 4.3.0 <reject@dunno.domain>: Temporary lookup failure; from=<reject@dunno.domain> to=<reject@dunno.domain> proto=SMTP helo=<foobar>
74451 4.3.0 <reject@dunno.domain>: Temporary lookup failure
75>>> #
76>>> # check_sender_access specific
77>>> #
78>>> smtpd_null_access_lookup_key <>
79OK
80>>> mail <>
81./smtpd_check: warning: fail:1_sender_access lookup error for "<>"
82./smtpd_check: <queue id>: reject: MAIL from foo.dunno.com[131.155.210.17]: 451 4.3.5 <>: Sender address rejected: Server configuration error; from=<> proto=SMTP helo=<foobar>
83451 4.3.5 <>: Sender address rejected: Server configuration error
84>>> #
85>>> # Test permit_tls_client_certs in generic_restrictions
86>>> #
87>>> relay_clientcerts fail:1_certs
88OK
89>>> fingerprint abcdef
90OK
91>>> recipient_restrictions permit_tls_clientcerts
92OK
93>>> rcpt reject@dunno.domain
94./smtpd_check: warning: fail:1_certs lookup error for "abcdef"
95./smtpd_check: warning: relay_clientcerts: lookup error for fingerprint 'abcdef', pkey fingerprint abcdef
96./smtpd_check: <queue id>: reject: RCPT from foo.dunno.com[131.155.210.17]: 451 4.3.0 <reject@dunno.domain>: Temporary lookup failure; from=<> to=<reject@dunno.domain> proto=SMTP helo=<foobar>
97451 4.3.0 <reject@dunno.domain>: Temporary lookup failure
98>>> #
99>>> # Test smtpd_check_rewrite().
100>>> #
101>>> local_header_rewrite_clients fail:1_rewrite
102OK
103>>> #
104>>> # Expect: REJECT (temporary lookup failure)
105>>> #
106>>> rewrite
107./smtpd_check: warning: fail:1_rewrite lookup error for "131.155.210.17"
108./smtpd_check: <queue id>: reject: RCPT from foo.dunno.com[131.155.210.17]: 451 4.3.0 Temporary lookup error; from=<> proto=SMTP helo=<foobar>
109451 4.3.0 Temporary lookup error
110>>> #
111>>> # Test resolve_local()
112>>> #
113>>> mydestination example.com
114OK
115>>> recipient_restrictions reject_unauth_destination
116OK
117>>> rcpt user@example.com
118OK
119>>> mydestination fail:1_mydestination
120OK
121>>> rcpt user@example.com
122./smtpd_check: warning: mydestination: fail:1_mydestination: table lookup problem
123./smtpd_check: <queue id>: reject: RCPT from foo.dunno.com[131.155.210.17]: 451 4.3.0 <user@example.com>: Temporary lookup failure; from=<> to=<user@example.com> proto=SMTP helo=<foobar>
124451 4.3.0 <user@example.com>: Temporary lookup failure
125>>> #
126>>> # Test virtual alias lookup.
127>>> #
128>>> mydestination example.com
129OK
130>>> virtual_alias_maps fail:1_virtual
131OK
132>>> rcpt user@example.com
133./smtpd_check: warning: fail:1_virtual lookup error for "user@example.com"
134./smtpd_check: <queue id>: reject: RCPT from foo.dunno.com[131.155.210.17]: 451 4.3.0 <user@example.com>: Temporary lookup failure; from=<> to=<user@example.com> proto=SMTP helo=<foobar>
135451 4.3.0 <user@example.com>: Temporary lookup failure
136