Alex: > HI, > > I have a check_sender_access restriction that blocks many TLDs like > .red and .space. Problem is that we have one legitimate .red customer > (what was he thinking?) that needs to send us mail. How can I allow > this single domain? > > smtpd_sender_restrictions = > permit_mynetworks, > check_sender_access hash:/etc/postfix/sender_checks, > check_sender_access pcre:/etc/postfix/sender_checks.pcre, > check_sender_access hash:/etc/postfix/spamsources, > check_sender_ns_access hash:/etc/postfix/blacklist_ns.cf, > reject_unknown_sender_domain > > /etc/postfix/spamsources contains lines like: > > red 500 This TLD sends spam > pw 500 This TLD sends spam > trade 500 This TLD sends spam > party 500 This TLD sends spam > > I see that it's legitimately blocking this domain, but when I use > postmap to test, it fails: > > # postmap -q a...@sub.red hash:/etc/postfix/spamsources > # > > I would have expected "This TLD sends spam". I've tried adding the > following at the top of the file then recreating the hash db, but > testing doesn't seem to work:
Postmap command does not know that this is an access map. Until it does, you need to manually make the queries described in the "man 5 access": the queries are sub.red then red. To exclude sub.red:: red 500 This TLD sends spam sub.red DUNNO pw 500 This TLD sends spam trade 500 This TLD sends spam party 500 This TLD sends spam The result does not have to be upper case. Wietse