0

I have a problem with my postfix configuration. I've set it up to get users and passwords from an active directory. Nearly everything works. I can send and receive emails for nearly every account. There are some exceptions. All users have their surnames as usernames. Now I'v got all users to have email accounts as surname@company.com. These addresses work, because the userpart of the email address match the usernames. But some users have given_name.surname@company.com. These don't work. Postmap shows the right directories.

postmap -q surname@company.com ldap://....
surname/Maildir/

postmap -q given_name.surname@company.com ldap://....
surname/Maildir/

But: maildrop tries to deliver to /home/vmail/given_name.surname/Maildir/

postfix/pipe[30831]: 252B8161FC1: to=<given_name.surname@company.com>, relay=maildrop, delay=71444, delays=71443/0.02/0/0.02, dsn=4.3.0, status=deferred (temporary failure. Command output: ERR: authdaemon: s_connect() failed: No such file or directory maildirmake: /home/vmail/given_name.surname/Maildir/.Junk: No such file or directory chmod: missing operand after `/home/vmail/given_name.surname/Maildir/.Junk' Try `chmod --help' for more information. bash: /home/vmail/given_name.surname/Maildir/courierimapsubscribed: No such file or directory maildirmake: /home/vmail/given_name.surname/Maildir/.Faxe: No such file or directory chmod: missing operand after `/home/vmail/given_name.surname/Maildir/.Faxe' Try `chmod --help' for more information. bash: /home/vmail/given_name.surname/Maildir/courierimapsubscribed: No such file or directory /usr/bin/maildrop: Unable to create a dot-lock at /home/vmail/given_name.surname/30936.0.server-s03.  )

Config in master.cf:

maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d vmail ${user}

Any suggestions?

0

Found the bug. It was a misconfiguration of the ldap-users.cf and ldap-alias.cf.

In ldap-users.cf I was looking for every address belonging to the account. So both emails returned user "surname" as account. The trick is: Only the mail "surname@company.com" should be found by ldap-users.cf. The mail "given_name.surname@company.com" should be found by ldap-aliases.cf and then be mapped to "surname@company.com"

| improve this answer | |
  • 1
    Hello, Could you provide more details on what was the misconfiguration? Thanks – user130370 Jan 20 '14 at 13:22
  • Sure. In ldap-users.cf I was looking for every address belonging to the account. So both emails returned user "surname" as account. The trick is: Only the mail "surname@company.com" should be found by ldap-users.cf. The mail "given_name.surname@company.com" should be found by ldap-aliases.cf and then be mapped to "surname@company.com" Hope that helps! – Gewürzwiesel Jan 21 '14 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.