[CentOS] [exim] Blacklist hostname/domain

Mon Nov 3 16:31:49 UTC 2014
Always Learning <centos at u62.u22.net>

On Mon, 2014-11-03 at 02:24 +0100, Bertrand Caplet wrote:

> I do think so too, I tried this way and I can ban the domain in from 
> header.
> But not in reverse DNS via IP I guess. I searched for it in google but 
> can't find.
> Maybe I could do this with iptables/ufw I'll see

Bonjour Bertrand,

Try .....................


acl_check_connection:

deny    message       = [SNA03] Rejected. Sender's IP address has no Host name. \
                         Ask your technical experts to rectify the problem. 
        condition     = ${lookup dnsdb{ptr=$sender_host_address} {0}{1} }

deny    message       = [SNA04] Rejected. Sender's Host has No Reverse DNS. \
                        Ask your technical experts to rectify the problem. 
        condition     = ${if and{{def:sender_host_address}{!def:sender_host_name}} \
                        {yes}{no}}

deny    message       = [SNA08] Host name not genuine mail server. Complaints to: \
                         xxxxx at gmail.com
        condition     = ${if match{$sender_host_name} \
                        {^.*[0-9]+[\\-|\\.|_][0-9]+[\\-|\\.|_][0-9]+[\\-|\\.|_]*.*}}
        !hosts        = EXDIR/hosts.a8
        delay         = 5s


deny    message       = [SNA13] Your mail server's host name, $sender_host_name, \
                        resembles a home Internet connection. \
                        Complaints to: xxxxx at gmail.com 
        condition     = ${if match{${lc:$sender_host_name}} \
 {(broadband|client|customer|dsl|dyn|dynamic|home|static|user)(\\d|\\.|\\-|ip)} \
                         {1}{} }
        !condition    = ${if match{${lc:$sender_host_name}} \
                         {smarthost|pndsl\\.co\\.uk} {1}{} }




-- 
Regards,

Paul.
England, EU.