Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Feb 13, 2009 2:12 pm 
Offline
Senior Newbie

Joined: Tue Feb 10, 2009 12:51 pm
Posts: 9
I'm working on moving my mail from Postfix + Cyrus with all my virtual users in Cyrus' sasl database to Postfix + Dovecot with all my virtual users in an LDAP database.

I have my test user in LDAP, test@foo.com, which has mailAlternateAddress'es test1@foo.com and test2@foo.com. test@foo.com's uid is "nottest".

In postfix's main.cf, I set

alias_maps = hash:/etc/aliases, ldap:/etc/postfix/ldap.cf

and in ldap.cf, I have:
server_host = ldapserver
search_base = dc=foo, dc=com
query_filter = (|(mail=%s)(mailAlternateAddress=%s))
result_attribute = uid

I'm expecting postfix to do a search like "(|(mail=test2@foo.com)(mailAlternateAddress=test2@foo.com))" (which I tested, and got my nottest uid), return the uid, and call dovecot's deliver with the uid "nottest" as the user. Instead, its calling deliver and delivering to the user part of the email address, e.g. test2, test1.

I tried a postmap -vq "test2@foo.com" ldap:/etc/postfix/ldap.cf, and it returned the UID I expected. So, there's nothing wrong with the LDAP config, it's gotta be something that happens between the lookup and the handoff to dovecot's deliver. Right now I suspect its my line in master.cf:

dovecot unix - n n - - pipe
flags=DRhu user=mail:mail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}


I think $user is the wrong variable to use, but I'm not sure how to tell Postfix to deliver to the LDAP UID, not dumbly deliver to test2.

Also, I noticed that Postfix isn't bouncing mails to addresses that don't exist. I emailed barf@foo.org, and Postfix just dropped off the mail to the non-existent mail user "barf".

Anyone know what I'm missing?

Thanks!


Top
   
PostPosted: Sat Feb 14, 2009 2:45 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
I don't know LDAP so can't help with most of your question (although more than once I've scratched my head over why a Postfix change didn't take, only to realize that I forgot to run "newaliases" or restart Postfix, so you might try those), but on this one:

pratfall wrote:
Also, I noticed that Postfix isn't bouncing mails to addresses that don't exist. I emailed barf@foo.org, and Postfix just dropped off the mail to the non-existent mail user "barf".

Do you have local_recipient_maps set so it isn't empty?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group