Re: [exim] Unrouteable address - All recipients fail

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Heiko Schlittermann
Datum:  
To: exim-users
Betreff: Re: [exim] Unrouteable address - All recipients fail
Hi Rob,

Rob Gunther <redrob@???> (Mi 19 Feb 2014 02:32:10 CET):
> Thanks for the feedback guys. I continued to work on the issue after
> posting the message. I was able to confirm that the ACL is not the best
> place to do the lookups as the information is user specific. It seemed to
> set the values acl_m_delivery to be the values of the first recipient of
> the message - not good for my case.


Sure, that the first value in acl_m_delivery is sticky? I'd say, it gets
overwritten. The spec is not clear about this.

My checks show that the $acl_m_* are overwritten each time they are used
in set acl_m_x.


> condition = ${if == {${extract{srs}{$acl_m_delivery}}}{1}}
>
> I do a lookup in the router every time I need a preference like this:
>
> condition = ${if ==
> {${extract{srs}{${lookup{$local_part}nwildlsearch{/smtpconfig/domains/$domain/deliverydat}}}}}{1}}


You can use Macros:

DELIVERY_INFO = ${lookup{$local_part}nwildlsearch{/smtpconfig/domains/$domain/deliverydat}}
SRS_INFO = ${extract{srs}{DELIVERY_INFO}

condition = ${if =={SRC_INFO}{1}}

or something similiar. (Formerly the macros neede to be in the global
part of the configuration, I'm not sure if this is true still.

> The user's do not actually exist on the box, so I don't think I can
> use the require
> verify = recipient. The machine just accepts and forwards, getting all
> information about preferences and destination server from the deliverydat
> file for every domain.


    verify = recipient


does just what 'exim -bv …' whould do, it's a simple attempt to route(!)
the address. Only the "check_local_user" router option forces a check if
the user is a locally known system user.

> Is there a more elegant way to get user data in the router, like filling a
> variable with user preference like I was trying to do in the acl?


The $address_data remains for all subsequent routers.

    begin routers:


            foo:
                # create key=value pais in $address_data
                address_data = DELIVERY_INFO
                …
                condition = ${extract{srs}{$address_data}}


            bar:
                …
                condition = ${extract{bar}{$address_data}}



As always: not checked, but it could be the way to go.


    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
-- 
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
 gnupg encrypted messages are welcome --------------- key ID: 7CBF764A -
 gnupg fingerprint: 9288 F17D BBF9 9625 5ABC  285C 26A9 687E 7CBF 764A -
(gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2  7E92 EE4E AC98 48D0 359B)-