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

Página Inicial
Delete this message
Reply to this message
Autor: Tony Finch
Data:  
Para: Giuliano Gavazzi
CC: exim-users
Assunto: Re: [exim] how to detect if address aliased?
On Mon, 12 Dec 2005, Giuliano Gavazzi wrote:

Some small suggestions, to improve the neatness...

> # domain aliases, for optionally suffixed local_parts
> domain_aliases_unspec:
> driver = redirect
> allow_fail
> allow_defer
> domains = +local_domains
> address_data = ${extract{field}{$address_data}} aliased=\
> ${lookup{$local_part}lsearch{DOMAINS_DIR/$domain/alias}{$value}fail}


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

> 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!).

> 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.

Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}