blob: 45d1d4fa5f0833a0802100d5c38304fc38a8a304 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
#
# Initialize
#
smtpd_delay_reject 0
mynetworks 127.0.0.0/8,168.100.189.0/28
relay_domains porcupine.org
smtpd_null_access_lookup_key <>
#
# Test check_domain_access()
#
helo_restrictions hash:./smtpd_check_access
# Expect: REJECT
helo foo.dunno.com
# Expect: OK
helo bar.dunno.com
# Expect: OK
helo foo.duuno.com
#
# Test check_namadr_access(), domain part
#
client_restrictions hash:./smtpd_check_access
# Expect: REJECT
client foo.dunno.com 131.155.210.17
# Expect: OK
client bar.dunno.com 131.155.210.17
# Expect: OK
client bar.dunno.com 131.155.210.19
#
# Test check_namadr_access(), address part
#
# Expect: OK
client bar.duno.com 131.155.210.17
# Expect: REJECT
client bar.duno.com 131.155.210.19
# Expect: REJECT
client bar.duno.com 44.33.22.11
# Expect: OK
client bar.duno.com 44.33.22.55
# Expect: REJECT
client bar.duno.com 44.33.44.33
#
# Test check_mail_access()
#
sender_restrictions hash:./smtpd_check_access
# Expect: REJECT
mail reject@dunno.domain
# Expect: OK
mail ok@dunno.domain
# Expect: OK
mail anyone@dunno.domain
# Expect: OK
mail bad-sender@dunno.domain
#
# Again, with a domain that rejects by default
#
# Expect: REJECT
mail reject@reject.domain
# Expect: OK
mail ok@reject.domain
# Expect: REJECT
mail anyone@reject.domain
# Expect: REJECT
mail good-sender@reject.domain
#
# Again, with a domain that accepts by default
#
# Expect: REJECT
mail reject@ok.domain
# Expect: OK
mail ok@ok.domain
# Expect: OK
mail anyone@ok.domain
# Expect: OK
mail bad-sender@ok.domain
#
# Test check_mail_access()
#
recipient_restrictions hash:./smtpd_check_access
# Expect: REJECT
rcpt reject@dunno.domain
# Expect: REJECT
recipient_delimiter +
rcpt reject+ext@dunno.domain
recipient_delimiter |
# Expect: OK
rcpt ok@dunno.domain
# Expect: OK
recipient_delimiter +
rcpt ok+ext@dunno.domain
recipient_delimiter |
# Expect: OK
rcpt anyone@dunno.domain
# Expect: OK
rcpt bad-sender@dunno.domain
#
# Again, with a domain that rejects by default
#
# Expect: REJECT
rcpt reject@reject.domain
# Expect: OK
rcpt ok@reject.domain
# Expect: REJECT
rcpt anyone@reject.domain
# Expect: REJECT
rcpt good-sender@reject.domain
#
# Again, with a domain that accepts by default
#
# Expect: REJECT
rcpt reject@ok.domain
# Expect: OK
rcpt ok@ok.domain
# Expect: OK
rcpt anyone@ok.domain
# Expect: OK
rcpt bad-sender@ok.domain
#
# check_sender_access specific
#
mail <>
|