[exim] Catchall Alias

Góra strony
Delete this message
Reply to this message
Autor: Q Beukes
Data:  
Dla: exim-users
Stare tematy: Re: [exim] Dropping Mail
Temat: [exim] Catchall Alias
Currently I have the following configuration for my last router:
final_aliases:
  driver = redirect
  allow_fail
  allow_defer
  data = ${lookup mysql \
                { SELECT dest FROM aliases WHERE
email='${local_part}@${domain}' AND type="site"} \
                {$value} \
                { ${lookup mysql \
                        { SELECT dest FROM aliases WHERE
email='*@${domain}' AND type="site"} \
                        {$value} \
                   } \
                } \
        }


I figure everyone can see that it first checks for a fixed match, and if
not found for a *@domain match, which is the catchall alias.

I have two questions.
1. Is there a better way to do this? For some reason this seems ugly.
Not really sure what I dig here. I set it up by luck when I setup exim
for the first time, and never really looked into how it works.

2. Is there a way I can have exim interpret multiple rows returned by
the query as multiple destinations for the alias.

Meaning if I have a mail delivered for user1@???, and there are
two rows for user1@???, one for dest1@??? and another
for dest2@???. Currently I separate them by commas to deliver
to more than one person. Because I run mysql 3 (technical reasons) which
doesn't support grouping multiple rows into one row, I am stuck using
the difficult to manage technique. I basically want to know if there is
an exim configuration option or function which can cause exim to
interpret multiple destinations separated by a newline (if I'm not
mistaken) instead of a comma.

Thanks
Quintin Beukes

PS. I am not on the mailing list, please reply to my personal address.