Afficher un message
Vieux 03/03/2006, 06h21   #3
Greg Hackney
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Is this the job of address rewriting

dsw4@lucent.com wrote:
> I have a need for Postfix to change the destination address of a
> message.
>
> For example, I have mail accounts on different network boxes (
> box1.mydomain.com, box2.mydomain.com). I will be getting messages
> addressed to user@mydomain, but the message needs to get routed to
> box1.mydomain.com. The destination of where "user" lives in stored in
> an LDAP database.
>
> Is there a way for Postfix to get this information from the LDAP
> database, and rewrite the address so that the message gets delivered to
> the correct host?
>


Yes.

It's done by adding an LDAP query to the virtual_alias_maps in main.cf,
such as:

virtual_alias_maps = ldap:$config_directory/ldap.cf

The left hand side of the table is usually the "mail" attribute in the
LDAP database:

query_filter = (mail=%s)

The right hand side of the table is whatever LDAP attribute holds the
email address you want it to go to, such as mailroutingaddress


result_attribute = mailroutingaddress

--
Greg

  Réponse avec citation
 
Page generated in 0,05813 seconds with 9 queries