Re: [exim] Block Entire TLDs in Exim?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Heiko Schlittermann
Date:  
À: exim-users
Sujet: Re: [exim] Block Entire TLDs in Exim?
Sajan Parikh <sajan@???> (Sa 15 Feb 2014 11:50:01 CET):
> I am using the following lines of config to block all email from
> ".eu" domains. Will this work as expected?
>
> if first_delivery
> and ("$h_from:" contains ".eu")
> then
>         seen finish
> endif

>
> Secondly, how can I block all mail from hosts with ".eu"?


I'd use the ACL, not the filters. IMHO filters are applied when the
message is already accepted, rejecting the message at SMTP time
is more valuable for the sender (in case it is an legitimate sender,
spammers won't notice the rejection probably).

I'd put this into the rcpt ACL, right *after* accepting mails
for postmaster:

            # reject messages originating from .eu servers
            deny    message = sorry
                    hosts = *.eu


This is based on the hostname, not on the senders address.
If you want to match the senders address, replace "hosts"
with "senders" in the example above.

Checking is possible

    swaks -f … -t … --pipe 'exim -bh 1.2.3.4'  -q rcpt


(As always, I might be wrong! It's written without consulting the
spec.txt!)

    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
-- 
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
 gnupg encrypted messages are welcome --------------- key ID: 7CBF764A -
 gnupg fingerprint: 9288 F17D BBF9 9625 5ABC  285C 26A9 687E 7CBF 764A -
(gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2  7E92 EE4E AC98 48D0 359B)-