[exim] New expansion condition: aliasfor

Top Page
Delete this message
Reply to this message
Author: Magnus Holmgren
Date:  
To: exim-users
Subject: [exim] New expansion condition: aliasfor
I'd like an expansion condition that checks if a given address is encountered
when routing a different address. That could e.g. be used to determine
whether an authenticated user "owns" a certain alias, like this:

require message = You're not authorized to use that address.
        condition = ${if aliasfor {$sender_address}
{$authenticated_id@$primary_hostname}}


or

accept condition = ${if aliasfor {$local_part-owner@$domain}
{$authenticated_id@$primary_hostname}} (for a mailing list)

What this would do is to try to route $sender_address, and if the (presumably
canonical) authenticated address is encountered along the way, at any depth,
and not necessarily at a leaf node, the condition is true. As an example take
this alias file for example.com:

info: bob.sunesson
bob.sunesson: bob

Then aliasfor {info@???}{bob@???} would be true, even if bob
has a .forward containing some other address.

As one might have aliases expanding to many addresses, this lookup could be
both time-consuming and give undesirable results. Hence a variant that only
allows 1:1 aliases will probably be needed, and perhaps some other way to
specify what is a pure alias and what is a mailing list.

--
Magnus Holmgren
holmgren@???