Re: [exim] rewrite aliases

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Heiko Schlittermann
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] rewrite aliases
Hello Karl,

SCHUH Karl, BFI-Bgld <k.schuh@???> (Fr 15 Mär 2013 14:31:42 CET):
> Hi,
> I have a installation with Zimbra as the main-mailserver. It runs LDAP and knows all users (by e-mail-address) and all aliases. I also have a mail-relay with exim4, which cares for spam and viruses. This exim achecks the incoming e-mails, if the recipient exist, by asking the LDAP-server on my Zimbra. This works OK so far.
>
> For some reasons I want to resolve the aliases to the primary e-mail-adress of my users. Any mail to one of the aliases, should be rewritten to the primary-address of the user. I thought, that a redirect-router would do this, so I tried
>
> ldap_alias:
> driver = redirect
> one_time = true
> domains = +forward_domains
> data = ${lookup ldap \
> {user="cn=abc" pass=xyz ldap:///ou=people,dc=bfi-burgenland,dc=at?mail?sub?(mail=$local_part@$domain)} }
> forbid_file = true
> forbid_pipe = true
>
> But since all adresses (primary and all aliases) have the argument "mail", it looks like having a loop. When I try:
>
> exim4 -d -bt -C /etc/exim4/exim-test.conf k.schuh@???


Sure that you used the configuration shown above? At least the router
"ldap_alias" does not appear in the output.

Try "exim4 -d-all+route -C …", it's not as much output.

> Why does the "one_time"-option not prevent this. Can anyone help?


"one_time" prevents an alias from resolved again and again on for
several delivery attempts.

I think, you should try to add an extra attribute to your LDAP
directory, "mailPrimaryAddress" or something similiar. I'd say you can't
even rely on a specific order of the returned values for the "mail"
attribute. Or you can calculate the primary address from other
attributes of the specific user.

    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)-