Re: [exim] using multiply routers

Pàgina inicial
Delete this message
Reply to this message
Autor: Cyborg
Data:  
A: Todd Lyons
CC: exim-users
Assumpte: Re: [exim] using multiply routers
Am 10.10.2011 15:02, schrieb Todd Lyons:
> On Mon, Oct 10, 2011 at 12:33 AM, Cyborg<cyborg2@???> wrote:
>> Hi,
>>
>> i'm having a small problem with multiply routers,
>>
>> if the condition inside "userforward" hits, "virtual_user" is not used, but
>> may also hit if it would be considered
> In my systems, I always set it up so that an email address is either a
> forwarder or a mailbox, but never both. Instead, what you seem to
> want is to be able to combine both. But your SQL doesn't seem to allow
> both to exist:
>
>> userforward:
>> condition = ${if eq{1}{${lookup mysql{SELECT '1' FROM mail_config WHERE
>> address = '${quote_mysql:${local_part}@${domain}}' and type in (
>> 'Forwarder') }}}{yes}{no}}
>> virtual_user:
>> data = ${lookup mysql{ SELECT concat(target,'/Maildir/') FROM mail_config
>> WHERE address = '${quote_mysql:${local_part}@${domain}}' and type in (
>> 'Popkonto','Imapkonto') }}
> Do you see that one looks for type "forwarder" and the other looks for
> type "popkonto" or "imapkonto"? Your logic says that both cannot be
> set in the database, so what else would you be looking at to determine
> that you want it to do both?


to clear thinks up, the database has several lines for several types of
mailadresses:

autoresponder
mailboxes of type pop3 and imap
forwarder
aso.

if you do a

select target,type from mail_config where address="example@???"

i may return several lines of hits.

I thought, that one responder should only handle one type ( or two
similar types like imap/pop3 ) at once.

ATM, the sort order of the routers in the config file decides which one
of those i mentioned above work.
The first one wins.

If the first ( userforward) one does not have a match, exim takes the
next one, in this case the "virtual_user"
If it has a match, it finishes and does not consider the next router in
chain.

And thats my problem, as i know a config i used on an old server ( which
is no longer available ) worked and used "redirect_router =
firstroutername " to return to the start of the router chain and start
over as long as new targets were generated by the routers.

somthing like this :

do  {
         try autoresponder;
         try userforward;
         try virtual_user;
} while ( havenewtargets() )


I also thought about the option to create a single router with all types
build in, but that may be very complicate as of the different routing
options used for each type.


best regards,
M. Schwarz