Hermes Mauricio López wrote:
> Hello there, I have been digging around how to forward email to second
> email server, I have had success on either relaying for a complete
> domain with this instruction:
>
> route_data = ${lookup{$domain}lsearch{/etc/staticroutes}}
>
> or per specific email with this one:
>
> route_data = ${lookup{$local_part@$domain}lsearch{/etc/staticroutes}}
>
> However what I need is to be able to use both at same time, so that my
> staticroutes file could be like this:
>
> user@??? 1.2.3.4
> domain2.com 2.3.4.5
>
> I have tried with: "partial-lsearch", ";" and "+" combinations of both
> instructions, but so far nothing has worked for me.
>
> Would you mind giving me a hint of what am I missing?
>
> Thank you in advance.
>
> Hermes.
>
CAVEAT: Not tested (we use SQL instead),
..but see if 'wildlsearch' works for you:
${lookup{$local_part@$domain}wildlsearch{/etc/staticroutes}}
... against a file of the format:
user1@???
....
user(n)@example1.com
*example2.com
....
*@example(n).com
Bill
--
韓家標