Okay guys, I am now 100% certain that my error is caused by the escaped characters in /etc/postfix/virtual.
What I tested:
I removed every backslash (the escaped @ character) from the file: /etc/postfix/virtual.
Then, I remapped the config file with command: postmap /etc/postfix/virtual
After that, I could send my e-mails like usually with the following restrictions in place:
If I put the backslash back, then I’ll receive the error again:
Sender address rejected: not owned by user test@test.com
So… Now I am lost… I am thinking about creating a Virtualmin Script (Actions upon server and user creation) that copies the /etc/postfix/virtual file to /etc/postfic/virtual_copy and removes every backslash from the copied file. Then I am able to use ‘smtpd_sender_restrictions’ like it is intended. But this is imho a dirty workaround that should not be necessary. If you have better ideas, please let me know.
Not really. I didn’t notice anything that would break aside from RoundCube couldn’t properly detect the domain name when sending mail. It sets From: address to something like username@localhost in case if only a username used for login (e.g. in case of a main domain user). Although, this can easily be fixed in RoundCube by properly defining your (user) email address. What else could break you think? RoundCube just sends and receives using credentials provided (i.e. uses SMTP and IMAP).
Well, yes, you could send mail but the problem is that mail is not getting received with this only change (i.e. replacing \@ with @ wouldn’t work for receiving mail).
That’s why I created a copy of the file to /etc/postfic/virtual_copy that’s only been used in smtpd_sender_login_maps = hash:/etc/postfix/virtual_copy.
Now I can send and receive. But like I said, this is a (dirty) workaround…
Instead, do you have any issues by disabling virtuser_file plugin completely by editing roundcube/config/config.inc.php file and removing virtuser_file from plugins list.
No, it doesn’t apply. This thread is related to RoundCube sending username as user\@dom.name rather than as user@dom.name when virtuser_file plugin is enabled.
It was enabled by default.
At first I tried to bring over the roundcube from the old server (files & DB), but that version (1.5.x) did not respond well to php8. I decided to go for a fresh installation and used the Virtualmin install script to accomplish that.
There is one thing I don’t understand. If I restore a virtual server it doesn’t add any user line in /etc/postfix/virtual. But if I add a new user to this restored server then Virtualmin adds the line: newuser@domain.tld newuser\@domain.tld
I’m worried. Is this correct? What about the other users in the restored server?
I’ve just reading all this as I been installing new Server and added roundcube and got the authentication issue. Will this be fixed in a future releases or do we remove the Roundcube addon in future?
For anyone having this issue, you can force Virtualmin to switch back to the old format of having two Unix users per @-format mailbox at System Settings → Virtualmin Configuration → Advanced options → Create extra Unix user on Postfix systems when using user@domain format? by selecting Yes