On Mon, 2010-11-08 at 22:19 -0500, Zhou, Yan wrote:
> Hi there, 
> 
> When Postfix' local delivery agent gets a mail, it drops it into the
> user's maildir folder, the user name is the user portion of the email
> address. But, how can I customize it so that all emails with the
> recipient address: postfixd...@domain get dropped into user "jsmith"
> Maildir/?  
> 
> We are building an app. so that a user can get messages with a different
> user name. 
> 
> Internally, I am using LDAP to get the user name for each recipient
> address.

Use an alias map or a virtual_alias_map
http://www.postfix.org/aliases.5.html 

This may be of this format For eg., 

In /etc/postfix/aliases
postfixdemo: jsmith

In main.cf 
alias_maps = hash:/etc/postfix/aliases



You could also compile your postfix with ldap lookup support and
directly lookup aliases from LDAP. But personally I would recommend ,
you write simple scripts to create an alias file instead. 


Reply via email to