[SOLVED] Postfix/LDAP Mail error with usernames

6 posts / 0 new
Last post
#1 Sun, 08/02/2015 - 20:25
hyper3xpl0iter
hyper3xpl0iter's picture

[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

Sun, 08/02/2015 - 22:15
andreychek

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

Sun, 08/02/2015 - 23:01
hyper3xpl0iter
hyper3xpl0iter's picture

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. :(

Andre Mattie email: hyper3xpl0iter@gmail.com website: https://www.th3c1inic.org GPG: 9B5E 079D A91E 74AC 333C D3C3 6398 151B BFE5 FB4C bitcoin: 3Nfs74EJcdHB3ewnvW6ynF2EexkMDfCexd

Services: Virtualmin Pro, Cloudmin Pro, Webmin OS: Ubuntu 16.04.2

Sun, 08/02/2015 - 23:28
hyper3xpl0iter
hyper3xpl0iter's picture

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!

Andre Mattie email: hyper3xpl0iter@gmail.com website: https://www.th3c1inic.org GPG: 9B5E 079D A91E 74AC 333C D3C3 6398 151B BFE5 FB4C bitcoin: 3Nfs74EJcdHB3ewnvW6ynF2EexkMDfCexd

Services: Virtualmin Pro, Cloudmin Pro, Webmin OS: Ubuntu 16.04.2

Mon, 08/03/2015 - 00:31
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

Mon, 08/03/2015 - 14:16 (Reply to #5)
hyper3xpl0iter
hyper3xpl0iter's picture

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

Andre Mattie email: hyper3xpl0iter@gmail.com website: https://www.th3c1inic.org GPG: 9B5E 079D A91E 74AC 333C D3C3 6398 151B BFE5 FB4C bitcoin: 3Nfs74EJcdHB3ewnvW6ynF2EexkMDfCexd

Services: Virtualmin Pro, Cloudmin Pro, Webmin OS: Ubuntu 16.04.2

Topic locked