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
|
#
# Initialize.
#
#! ../bin/postmap smtpd_check_access
#msg_verbose 1
smtpd_delay_reject 0
mynetworks 127.0.0.0/8,168.100.189.0/28
relay_domains porcupine.org
maps_rbl_domains dnsbltest.porcupine.org
#
# Test the client restrictions.
#
client_restrictions permit_mynetworks,reject_unknown_client,check_client_access,hash:./smtpd_check_access
client unknown 131.155.210.17
client unknown 168.100.189.13
client random.bad.domain 123.123.123.123
client friend.bad.domain 123.123.123.123
client bad.domain 123.123.123.123
client wzv.win.tue.nl 131.155.210.17
client aa.win.tue.nl 131.155.210.18
client_restrictions permit_mynetworks
#
# Test the helo restrictions
#
helo_restrictions permit_mynetworks,reject_unknown_client,reject_invalid_hostname,reject_unknown_hostname,check_helo_access,hash:./smtpd_check_access
client unknown 131.155.210.17
helo foo.
client foo 123.123.123.123
helo foo.
helo foo
helo spike.porcupine.org
helo_restrictions permit_mynetworks,reject_unknown_client,reject_invalid_hostname,check_helo_access,hash:./smtpd_check_access
helo random.bad.domain
helo friend.bad.domain
#
# Test the sender restrictions
#
sender_restrictions permit_mynetworks,reject_unknown_client
client unknown 131.155.210.17
mail foo@ibm.com
client unknown 168.100.189.13
mail foo@ibm.com
client foo 123.123.123.123
mail foo@ibm.com
sender_restrictions reject_unknown_address
mail foo@ibm.com
mail foo@bad.domain
sender_restrictions check_sender_access,hash:./smtpd_check_access
mail bad-sender@any.domain
mail bad-sender@good.domain
mail reject@this.address
mail Reject@this.address
mail foo@bad.domain
mail foo@Bad.domain
mail foo@random.bad.domain
mail foo@friend.bad.domain
#
# Test the recipient restrictions
#
recipient_restrictions permit_mynetworks,reject_unknown_client,check_relay_domains
client unknown 131.155.210.17
rcpt foo@ibm.com
client unknown 168.100.189.13
rcpt foo@ibm.com
client foo 123.123.123.123
rcpt foo@ibm.com
rcpt foo@porcupine.org
recipient_restrictions check_relay_domains
client foo.porcupine.org 168.100.189.13
rcpt foo@ibm.com
rcpt foo@porcupine.org
client foo 123.123.123.123
rcpt foo@ibm.com
rcpt foo@porcupine.org
recipient_restrictions check_recipient_access,hash:./smtpd_check_access
mail bad-sender@any.domain
mail bad-sender@good.domain
mail reject@this.address
mail foo@bad.domain
mail foo@random.bad.domain
mail foo@friend.bad.domain
#
# RBL
#
client_restrictions reject_maps_rbl
client spike.porcupine.org 168.100.189.2
client foo 127.0.0.2
#
# unknown sender/recipient domain
#
unknown_address_reject_code 554
recipient_restrictions reject_unknown_recipient_domain,reject_unknown_sender_domain
mail wietse@porcupine.org
rcpt wietse@porcupine.org
rcpt wietse@no.recipient.domain
mail wietse@no.sender.domain
rcpt wietse@porcupine.org
#
# {permit_auth,reject_unauth}_destination
#
relay_domains foo.com,bar.com
mail user@some.where
recipient_restrictions permit_auth_destination,reject
rcpt user@foo.org
rcpt user@foo.com
recipient_restrictions reject_unauth_destination,permit
rcpt user@foo.org
rcpt user@foo.com
#
# unknown client tests
#
unknown_client_reject_code 550
client_restrictions reject_unknown_client
client spike.porcupine.org 160.100.189.2 2
client unknown 1.1.1.1 4
client unknown 1.1.1.1 5
|