Re: [exim] how to detect if address aliased?

Top Page
Delete this message
Reply to this message
Author: Giuliano Gavazzi
Date:  
To: exim-users
Subject: Re: [exim] how to detect if address aliased?

On Mon, 12 Dec 2005, Tony Finch wrote:

> On Mon, 12 Dec 2005, Giuliano Gavazzi wrote:
>
> Some small suggestions, to improve the neatness...
>

[...]
> local_parts = lsearch;DOMAINS_DIR/$domain/alias
> address_data = ${extract{field}{$address_data}} aliased=$local_part_data
> data = $local_part_data
>


very neat, thanks.

>> The localuser router then checks that the aliased field is not empty::
>>
>> condition = ${if !eq {${extract{aliased}{$address_data}}}{} {1}{0}}
>
> You can just use ${extract {aliased} {$address_data} } here, since a
> username is equivalent to true (unless you have some unusual usernames!).


like "no", or "!yes" or even "!foooo" perhaps? Well, I suppose I could do
that, but might be just too clever for too little advantage.

>
>> And it all works so well with the local sender verify (called by a
>> sender verify for authenticated users)::
>>
>> condition = ${if eq{$local_part}{$authenticated_id}{no}{yes}}
>> fail_verify_sender
>
> I do this check in the ACLs rather than the routers, because messages may
> come in to our email hub with a loadl user as the sender address for many
> reasons other than message submission - email routing in Cambridge is
> complicated, and there is lots of forwarding.


yes, but does that mean that servers authenticate each other? If not (and
they could authenticate using certificates, and I presume that would not
necessarily set authenticated_id) the only case authenticated_id is set
would be for message submission. The advantage of the router check (that
is triggered by an acl of course) is that the aliases are resolved. Can
you get the alias resolution from an acl? I guess so, probably in
$sender_address_local_part after verify = sender has been called for a
local domains sender.

Thanks

Giuliano