Re: [exim] New expansion condition: aliasfor

Página Inicial
Delete this message
Reply to this message
Autor: Tony Finch
Data:  
Para: Magnus Holmgren
CC: exim-users
Assunto: Re: [exim] New expansion condition: aliasfor
On Tue, 18 Apr 2006, Magnus Holmgren wrote:

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


You don't need a new condition to do this:

# message submission RCPT ACL:

  require
    verify         = sender
    set SENDER     = ${sender_address_data}


# Check that authenticated users aren't pretending to be someone else.

  deny
    message        = Sender address ${extract {user}{$SENDER} } \
                     does not match authenticated user $authenticated_id
    authenticated  = *
    condition      = ${extract {user}{$SENDER} \
                               {${if !eq{$value}{$authenticated_id} }} }


In the routers, we set the address data to contain various information
about the address. If it is eventually routed to a user's account, then
the address data includes a user=fanf2 clause which can be checked against
their authenticated ID as above.

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