[exim] Redirection on multiple conditions

Top Page
Delete this message
Reply to this message
Author: Miham KEREKES
Date:  
To: exim-users
Subject: [exim] Redirection on multiple conditions
Dear List,

I've a problem creating redirection on a multi-domained email-server. I
have to set it up to redirect every email based on the per-domain
aliases file, but not in the usual way, because:
if /etc/exim4/virt/$domain.aliases exists, I have to lsearch in that file,
and if the $local_part not exists in $domain.aliases, I have to lsearch
in the /etc/exim4/virt/DEFAULT_ALIASES file. If no result, the
$local_part is "nonexist".
And, in addition, I have to handle webmaster different way, which means
if the $local_part is webmaster, then I have to do an lsearch in the
/etc/exim4/virt/webmaster_aliases file for $local_part@$domain, and if I
can't find it, the target mailbox should be webmaster_default, otherwise
the found value.

Pretty complicated, isn't it?

The usual redirect router looks like this:
aliases:
        driver = redirect
        debug_print = "R: aliases for $local_part@$domain"
        data = ${lookup{$local_part}lsearch{/etc/exim4/virt/$domain.aliases}}


But I don't know how to perform the redirection using the guidelines
above.. Any help?

Thanks,
    Miham.
-- 
int name[]={1634232653,1699422317,1701537138,854643};
int email[]={1634232685,1768046701,1965976674,1702523693,778331495,218789224,0};
printf("%s%s", name, email);