Re: [exim] Blocking external mails to particular id

Etusivu
Poista viesti
Vastaa
Lähettäjä: Oliver von Bueren
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [exim] Blocking external mails to particular id
Biju Abraham N. wrote:
> Hello,
>
> I want to block mails from any external (non local) user from sending
> mails to a system alias say mytestid on my mail server (debian, exim
> 4.59). I have added the following deny directive in acl_smtp_rcpt:
>
>   deny
>     message = email not allowed to this id
>     !hosts = :
>     recipients = mytestid

>
>
>

In the documentation 40.23 ACL conditions you have:
    recipients = <address list>
        This condition is relevant only after a RCPT command. It checks 
the entire recipient address
        against a list of recipients.
The important part of it is probably the "entire" address part of it. I 
guess that this address is expanded with your default domain and looks 
something like mytestid@???.


Another way is to use local_parts as condition, but I'd think that, if
you have more than one domain as local domain in your setup, you should
check the domain part of the address as well.

You can always debug your ACLs by running exim -bh <remote ip address>
where this address is the address exim takes as the host the test SMTP
session is supposed to come from. You then can simulate an entire SMTP
session and get the output of what exim does with what data and which ACL.

Oliver