1>>> # 2>>> # Initialize. 3>>> # 4>>> #! ../bin/postmap smtpd_check_access 5>>> #msg_verbose 1 6>>> smtpd_delay_reject 0 7OK 8>>> relay_domains porcupine.org 9OK 10>>> client spike.porcupine.org 168.100.189.2 11OK 12>>> # 13>>> # Check MX access 14>>> # 15>>> helo_restrictions check_helo_mx_access,inline:{168.100.189.2=reject} 16OK 17>>> helo www.porcupine.org 18./smtpd_check: <queue id>: reject: HELO from spike.porcupine.org[168.100.189.2]: 554 5.7.1 <www.porcupine.org>: Helo command rejected: Access denied; proto=SMTP helo=<www.porcupine.org> 19554 5.7.1 <www.porcupine.org>: Helo command rejected: Access denied 20>>> helo example.tld 21./smtpd_check: warning: Unable to look up MX host example.tld for Helo command example.tld: hostname nor servname provided, or not known 22OK 23>>> helo foo@postfix.org 24OK 25>>> sender_restrictions check_sender_mx_access,inline:{168.100.189.2=reject} 26OK 27>>> mail foo@www.porcupine.org 28./smtpd_check: <queue id>: reject: MAIL from spike.porcupine.org[168.100.189.2]: 554 5.7.1 <foo@www.porcupine.org>: Sender address rejected: Access denied; from=<foo@www.porcupine.org> proto=SMTP helo=<foo@postfix.org> 29554 5.7.1 <foo@www.porcupine.org>: Sender address rejected: Access denied 30>>> mail example.tld 31./smtpd_check: warning: Unable to look up MX host example.tld for Sender address example.tld: hostname nor servname provided, or not known 32OK 33>>> mail foo@postfix.org 34OK 35>>> recipient_restrictions check_recipient_mx_access,inline:{168.100.189.2=reject} 36OK 37>>> rcpt foo@www.porcupine.org 38./smtpd_check: <queue id>: reject: RCPT from spike.porcupine.org[168.100.189.2]: 554 5.7.1 <foo@www.porcupine.org>: Recipient address rejected: Access denied; from=<foo@postfix.org> to=<foo@www.porcupine.org> proto=SMTP helo=<foo@postfix.org> 39554 5.7.1 <foo@www.porcupine.org>: Recipient address rejected: Access denied 40>>> rcpt foo@example.tld 41./smtpd_check: warning: Unable to look up MX host example.tld for Recipient address foo@example.tld: hostname nor servname provided, or not known 42OK 43>>> rcpt foo@postfix.org 44OK 45>>> # 46>>> # Check NS access 47>>> # 48>>> helo_restrictions check_helo_ns_access,inline:{168.100.189.2=reject} 49OK 50>>> helo www.porcupine.org 51./smtpd_check: <queue id>: reject: HELO from spike.porcupine.org[168.100.189.2]: 554 5.7.1 <www.porcupine.org>: Helo command rejected: Access denied; from=<foo@postfix.org> proto=SMTP helo=<www.porcupine.org> 52554 5.7.1 <www.porcupine.org>: Helo command rejected: Access denied 53>>> helo example.tld 54./smtpd_check: warning: Unable to look up NS host for tld: Host not found 55OK 56>>> helo foo@postfix.org 57OK 58>>> sender_restrictions check_sender_ns_access,inline:{168.100.189.2=reject} 59OK 60>>> mail foo@www.porcupine.org 61./smtpd_check: <queue id>: reject: MAIL from spike.porcupine.org[168.100.189.2]: 554 5.7.1 <foo@www.porcupine.org>: Sender address rejected: Access denied; from=<foo@www.porcupine.org> proto=SMTP helo=<foo@postfix.org> 62554 5.7.1 <foo@www.porcupine.org>: Sender address rejected: Access denied 63>>> mail example.tld 64./smtpd_check: warning: Unable to look up NS host for tld: Host not found 65OK 66>>> mail foo@postfix.org 67OK 68>>> recipient_restrictions check_recipient_ns_access,inline:{168.100.189.2=reject} 69OK 70>>> rcpt foo@www.porcupine.org 71./smtpd_check: <queue id>: reject: RCPT from spike.porcupine.org[168.100.189.2]: 554 5.7.1 <foo@www.porcupine.org>: Recipient address rejected: Access denied; from=<foo@postfix.org> to=<foo@www.porcupine.org> proto=SMTP helo=<foo@postfix.org> 72554 5.7.1 <foo@www.porcupine.org>: Recipient address rejected: Access denied 73>>> rcpt foo@example.tld 74./smtpd_check: warning: Unable to look up NS host for tld: Host not found 75OK 76>>> rcpt foo@postfix.org 77OK 78>>> # 79>>> # Check A access 80>>> # 81>>> helo_restrictions check_helo_a_access,inline:{168.100.189.2=reject} 82OK 83>>> helo spike.porcupine.org 84./smtpd_check: <queue id>: reject: HELO from spike.porcupine.org[168.100.189.2]: 554 5.7.1 <spike.porcupine.org>: Helo command rejected: Access denied; from=<foo@postfix.org> proto=SMTP helo=<spike.porcupine.org> 85554 5.7.1 <spike.porcupine.org>: Helo command rejected: Access denied 86>>> helo www.porcupine.org 87OK 88>>> client_restrictions check_client_a_access,inline:{168.100.189.2=reject} 89OK 90>>> client spike.porcupine.org 1.2.3.4 91./smtpd_check: <queue id>: reject: CONNECT from spike.porcupine.org[1.2.3.4]: 554 5.7.1 <spike.porcupine.org[1.2.3.4]>: Client host rejected: Access denied; from=<foo@postfix.org> proto=SMTP helo=<www.porcupine.org> 92554 5.7.1 <spike.porcupine.org[1.2.3.4]>: Client host rejected: Access denied 93>>> client www.porcupine.org 1.2.3.4 94OK 95>>> reverse_client_restrictions check_reverse_client_a_access,inline:{168.100.189.2=reject} 96bad command 97>>> client spike.porcupine.org 1.2.3.4 98./smtpd_check: <queue id>: reject: CONNECT from spike.porcupine.org[1.2.3.4]: 554 5.7.1 <spike.porcupine.org[1.2.3.4]>: Client host rejected: Access denied; from=<foo@postfix.org> proto=SMTP helo=<www.porcupine.org> 99554 5.7.1 <spike.porcupine.org[1.2.3.4]>: Client host rejected: Access denied 100>>> client www.porcupine.org 1.2.3.4 101OK 102>>> sender_restrictions check_sender_a_access,inline:{168.100.189.2=reject} 103OK 104>>> mail foo@spike.porcupine.org 105./smtpd_check: <queue id>: reject: MAIL from www.porcupine.org[1.2.3.4]: 554 5.7.1 <foo@spike.porcupine.org>: Sender address rejected: Access denied; from=<foo@spike.porcupine.org> proto=SMTP helo=<www.porcupine.org> 106554 5.7.1 <foo@spike.porcupine.org>: Sender address rejected: Access denied 107>>> mail foo@www.porcupine.org 108OK 109>>> recipient_restrictions check_recipient_a_access,inline:{168.100.189.2=reject} 110OK 111>>> rcpt foo@spike.porcupine.org 112./smtpd_check: <queue id>: reject: RCPT from www.porcupine.org[1.2.3.4]: 554 5.7.1 <foo@spike.porcupine.org>: Recipient address rejected: Access denied; from=<foo@www.porcupine.org> to=<foo@spike.porcupine.org> proto=SMTP helo=<www.porcupine.org> 113554 5.7.1 <foo@spike.porcupine.org>: Recipient address rejected: Access denied 114>>> rcpt foo@www.porcupine.org 115OK 116