Re: [exim] Limiting system_aliases recipients to only "local…

Etusivu
Poista viesti
Vastaa
Lähettäjä: Nigel Metheringham
Päiväys:  
Vastaanottaja: Frank Elsner, Janelle Bourne
Kopio: exim-users@exim.org users
Aihe: Re: [exim] Limiting system_aliases recipients to only "local" addresses
On 10 Feb 2011, at 21:53, Frank Elsner wrote:

> On Thu, 10 Feb 2011 13:31:24 +0000 Janelle Bourne wrote:
>>
>> Hi all,
>>
>> I have a pretty standard exim conf set up on FreeBSD (Exim version 4.71), system aliases (or groups) are configured thus:
>>
>> system_aliases:
>> driver = redirect
>> allow_fail
>> allow_defer
>> data = ${lookup{$local_part}lsearch{/etc/aliases}}
>> user = mailnull
>> group = mail
>> file_transport = address_file
>> pipe_transport = address_pipe
>>
>> I would like to limit senders to these groups/aliases to only local addresses (i.e. sender1@???, othersender@???... but _NOT_ outsider@???).
>> How can I do this?
>
> 1st If not already done, define "domainlist local_domains = <domains local for your system>"
> 2nd Insert "domains = +local_domains" into router "system_aliases"


You may want to add the domains condition to the system aliases router, but this will restrict it to being considered only for *target* addresses in the local domains (you may well have another mechanism that already does this depending on the ordering and handling of previous routers).

To restrict the senders to being from local domains you need a senders condition - so something like:-
    senders = *@+local_domains


The senders condition is described in the generic router options section
http://docs.exim.org/current/spec_html/ch15.html

and takes an address list
http://docs.exim.org/current/spec_html/ch10.html#SECTaddresslist

NB this is a very weak security mechanism as forging sender addresses
is easy, unless you take other precautions against this.

    Nigel.
--
[ Nigel Metheringham             Nigel.Metheringham@??? ]
[ - Comments in this message are my own and not ITO opinion/policy - ]