Re: [exim] Blocking mails from outside to local aliases...

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Nigel Wade
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Blocking mails from outside to local aliases...
Biju Abraham N. wrote:
> Hi,
>
> I am using a Debian Etch release with Exim4 4.50. We are getting mails on
> SMTP and to some locally defined mail aliases in /etc/mail/alias files. Is
> it possible to block external mails to these aliases or could some show
> which documentation to read up on this?
>
> Thanks in advance,
> Regards,
> Biju.


I'm sure it's possible. I do something similar here to prevent a certain
class of user from sending or receiving external email. An LDAP lookup
is performed in the recipient ACL when the SMTP sending host is not part
of our local network. You could do something similar performing an
lsearch or lookup
(http://www.exim.org/exim-html-current/doc/html/spec_html/ch09.html) of
the /etc/mail/alias file. This is what I do:

   deny    hosts = ! +relay_from_hosts
         condition = ${lookup ldap { ...


relay_from_hosts is a hostlist containing the hosts which I consider to
be local hosts with regard to accepting SMTP mail, i.e. the loopback
interface and local subnets:

hostlist relay_from_hosts = 127.0.0.1 : 192.168.24.0/24

Since you are using Debian you'd need to work out how to integrate this
into Debian's non-standard Exim configuration files.

-- 
Nigel Wade, System Administrator, Space Plasma Physics Group,
             University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@???
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555