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