Re: [exim] Creating local blacklist

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Cyborg
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] Creating local blacklist
Am 26.04.2018 um 03:25 schrieb Mike Brown via Exim-users:
>
> So, how does one set up the acl_check_rcpt section to use the exim_blacklist
> that was defined to deny the incoming e-mail from the named domain?
>


you don't.

acl_check_data:
....
lots of other stuff
...
  deny    condition  = ${if eq{1}{${lookup mysql{ SELECT 1 FROM
blacklist WHERE "${quote_mysql:${lc:${address:$reply_address}}}" regexp
domain LIMIT 1 }}}{yes}{no}}
          message    = The Receiver does not like you.

  accept

the field "domain" contains a regexpression of the domainname. That
allows you to block entire TLDs like ".*@com.ag" ".*@com.br" etc.

That's way better than a simple domainlist, you had in mind ;) and as
the compare operation is outsourced to mysql, it gets done with a highly
sofisicated regex engine, resulting in a better performance too ;)

Why it's in check_data instead of check_rcpt ? because the mail_from:
used in the smtp protocol is commonly different ( in spams ) from what's
written als From: or reply-to: in the email itself. This makes things
easier for you.


Have fun..