[SOLVED] Postfix/LDAP Mail error with usernames

Hello,
I hoping I can get some help with an issue I’m having while trying to send/receive mail. I keep having my mail rejected and sent back due to the following

user-domain.com@hostname.domain.com (expanded from user@domain.com):
unknown user: “user-domain.com

Why is the mail address name being changed to “user-domain.com”? I’ve set the server template settings so that all user/mail names are “user@domain.com”… Any help is appreciated. Thanks guys.

Ubuntu 14.04
Virtualmin 4.18.gpl

Howdy,

When using the user@domain email format, well, Postfix doesn’t actually support that. It won’t allow you to deliver to a user with a “@” in it’s name.

To get around that, Virtualmin create’s two usernames in that circumstance… user@domain.tld, and user-domain.tld.

Either can be used in most cases- they’re essentially synonyms for each other.

However, when delivering email, Postfix is configured to use the user-domain.tld username.

What that means is that, for some reason, it’s not seeing the other usernames in your LDAP setup.

Out of curiosity, if you change the username format to something else temporarily, perhaps just user.domain, and create a new email address – does that work properly?

-Eric

Changing the username format is something I just finished trying, I changed it to the default “user.domain”. Unfortunatly it still throws the same error and bounces the messages. I’m i’m really clueless as to what could be stopping it from seeing both usernames. :frowning:

Ok, I solved the issue!! :D.
For anyone else struggling with the same problem, I had to install libnss-ldapd, and then properly configure it with the LDAP settings. once I did that it searched LDAP properly and found the names and passwords. Thank you for your help andreychek!

Hey, that’s fantastic… so that’s working with the user@domain.tld email format now?

It sounds like we need to update the instructions with a few additional steps!

-Eric

Yes it does work using user@domain.tld. thanks again for your help!