On 6 Nov 2017, at 08:08, Viktor Dukhovni <postfix-us...@dukhovni.org> wrote: > Mind you, I would not recommend such rules to anyone. Just block the > domains specifically observed to send unwanted email. If you really > want to block all tlds, there are only 1510 live at present and 31 > in "test mode" with no delegations. It is easy to machine generate > a complete list of patterns for a regular indexed table.
I find it is *extremely* effective to simply whitelist the TLDs I receive legitimate mail from: # cat /etc/postfix/helo_checks.pcre […] /.*infusionmail.com$/ 550 Infusionmail is not wanted or welcome /.*\yahoo\.com/ 550 Yahoo.com is not allowed here, use gmail or someone who hasn't leaked 3 billion passwords (com|net|org|edu|gov|ca|mx|de|dk|fi|uk|us|tv|info|biz|eu|es|il|it|nl|name|jp|host)$/ DUNNO /.*webinar.com/ 550 Die in a Fire spammer scum /.*xpoof\.us/ 550 Die is a Fire spammer scum /.*\.*/ 550 Mail for this TLD is not allowed (those are the TLDs that my server gets mail from, not recommending anyone else use that list). -- Apple broke AppleScripting signatures in Mail.app, so no random signatures.