sendmail conditional mail processing

204 Views Asked by At

is it possible to configure sendmail.mc / sendmail.cf to process email according to this flow chart?

HACK(`require_rdns')dnl
HACK(`dnswl', `whitelist.roosit.nl')dnl
INPUT_MAIL_FILTER(`smf-spf', `S=local:/var/run/smfs/smf-spf.sock, T=S:30s;R:1m')dnl
FEATURE(`dnsbl', `zen.spamhaus.org', `"554 Rejected " $&{client_addr} " SPAM (zen.spamhaus.org)"')dnl
FEATURE(`dnsbl', `bl.spamcop.net', `"554 Rejected " $&{client_addr} " SPAM (bl.spamcop.net)"')dnl
FEATURE(`dnsbl', `rbl.roosit.nl', `"554 Rejected " $&{client_addr} " SPAM (rbl.roosit.nl)"')dnl
INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamav/clamav-milter.sock, F=, T=S:4m;R:4m')dnl
INPUT_MAIL_FILTER(`spamassassin', `S=local:/var/run/spamass-milter/spamass-milter.sock, F=, T=C:15m;S:4m;R:4m;E:10m')
define(`confINPUT_MAIL_FILTERS', `smf-spf,clamav,spamassassin')dnl
MAILER(smtp)dnl
1

There are 1 best solutions below

2
On

Have you considered using free perl based MIMEDefang milter?

MIMEDefang behavior is controlled by perl script, it can deploy DNS whitelists, DNS blacklists, SPF checks, anti-spam (spamasssassin) checks and anti-virus checks. You use perl based spamassassin anyway.

MIMEDefang may cooperate with Sendmail and Postfix. MIMEDefang (unlike sendmail.cf) can conduct blacklist loops in parallel.