summaryrefslogtreecommitdiffstats
path: root/src/smtpd/smtpd_addr_valid.ref
blob: 768a4c476943f1a9de1862f939ffdecc7edf5dbd (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
>>> #
>>> # Initialize
>>> #
>>> smtpd_delay_reject 0
OK
>>> mynetworks 127.0.0.0/8,168.100.189.0/28
OK
>>> local_recipient_maps inline:{foo_canon=whatever,bar_canon=whatever}
OK
>>> mydestination example.com
OK
>>> myorigin example.com
OK
>>> 
>>> sender_canonical_maps inline:{foo@example.com=foo_canon@example.com}
OK
>>> recipient_canonical_maps inline:{bar@example.com=bar_canon@example.com}
OK
>>> 
>>> sender_restrictions reject_unlisted_sender
OK
>>> # Expect accept
>>> mail bar_canon@example.com
OK
>>> # Expect accept
>>> mail bar@example.com
OK
>>> # Expect accept
>>> mail foo_canon@example.com
OK
>>> # Expect accept
>>> mail foo@example.com
OK
>>> # Expect reject
>>> mail baz@example.com
./smtpd_check: <queue id>: reject: MAIL from localhost[127.0.0.1]: 550 5.1.0 <baz@example.com>: Sender address rejected: User unknown in local recipient table; from=<baz@example.com> proto=SMTP
550 5.1.0 <baz@example.com>: Sender address rejected: User unknown in local recipient table
>>> 
>>> recipient_restrictions reject_unlisted_recipient
OK
>>> # Expect accept
>>> rcpt bar_canon@example.com
OK
>>> # Expect accept
>>> rcpt bar@example.com
OK
>>> # Expect accept
>>> rcpt foo_canon@example.com
OK
>>> # Expect reject
>>> rcpt foo@example.com
./smtpd_check: <queue id>: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <foo@example.com>: Recipient address rejected: User unknown in local recipient table; from=<baz@example.com> to=<foo@example.com> proto=SMTP
550 5.1.1 <foo@example.com>: Recipient address rejected: User unknown in local recipient table
>>> # Expect reject
>>> mail baz@example.com
./smtpd_check: <queue id>: reject: MAIL from localhost[127.0.0.1]: 550 5.1.0 <baz@example.com>: Sender address rejected: User unknown in local recipient table; from=<baz@example.com> proto=SMTP
550 5.1.0 <baz@example.com>: Sender address rejected: User unknown in local recipient table