mailadresses are rewritten abusively

I’ve setup virtualmin to use ‘@’ as delimiter (so I can login to dovecot with username@domain)
but now Postfix still rewrites user@domain to user-domain.host
I’ve setup virtualmin to use user@domain as format, and I’ve checked Dovecot and Postfix config’s, but I cannot find why the adresses are rewriten.

Example:

Oct 22 15:23:35 lithium postfix/error[20916]: 62C0D43C397: to=test-vleeswijzer.nl@li.ebrius.nl, orig_to=test@vleeswijzer.nl, relay=none, delay=0.24, delays=0.13/0/0/0.11, dsn=5.0.0, status=bounced (User unknown in virtual alias table)

You can see that ‘test@vleeswijzer.nl’ gets rewritten to ‘test-vleeswijzer.nl@li.ebrius.nl’ but this is wrong, the imap user is ‘test@vleeswijzer.nl’

Anyone?

Well, remember that Virtualmin has to jump through hoops in order to get the ‘@’ delimiter to work. Postfix doesn’t support ‘@’ as a delimeter, so it’s going to be delivering email to user-domain.tld.

Note that in your /etc/passwd file, you’ll have two users, each with the same uid and gid – user@domain.tld, and user-domain.tld. The latter is where Postfix is going to attempt to deliver emails to since it doesn’t support the former.

All that is to say, that much is typical behavior for this case.

The problem you’re having could be a few things; however, I’ve occasionally seen that when the hostname of your server didn’t match what was in the “mydestination” line of your /etc/postfix/main.cf. Make sure your full hostname is listed in “mydestination”.

-Eric