What I want to achieve:
On my production server, I'm planning to have multiple users and multiple domains and my best option is to create full email-address-format unix user - when John Doe requests email account at myfirstdomain.com, he should receive username that is his exact email address - [email protected]
What do I do?
I create (UNIX) user [email protected], and then map this user to email address [email protected], so /etc/postfix/virtual
looks like this:
[email protected] [email protected]
Then I postmap my virtual map, reload configuration and send email to address [email protected].
What do I get
immediate error saying that user john.doe doesn't exist - it doesn't count full username [email protected], only what's before @ - so mapping shown above doesnt work. How to fix that?
Just to note, I am able to achieve functionality when I use UNIX user that do not have @ character.
I think that you're going to have to give up that dream, rfc 822 is pretty clear about it,
addr-spec = local-part "@" domain ; global address
Postfix will treat an
@
symbol as the terminator of the local part, and what comes afterwards as the host, I wouldn't count on being able to use local unix names with that symbol in them.If you want your usernames to be the person's email, you can make use of the virtual table, but they won't map directly to system users.