On 2022-01-09 11:11, Bernardo Reino wrote:
Further to what others have replied, I find it odd that invalid e-mail addresses (in your case, www-data@mydomain.com) manage their way to your LMTP server (dovecot).
+1
Normally, your MTA (postfix, I presume) should reject e-mails to invalid addresses (i.e. not existing in your system -> dovecot), so that only e-mails to existing addresses reach LMTP at all.
postfix will reject if its not in mynetworks
So you should check your postfix configuration, and in particular virtual_mailbox_maps, etc.
it will work if dovecot do the alias to mailbox mapping in lmtp, but this is just a dream :=)
postfix can do alias mapping before sending to dovecot lmtp, so all local alias do work aswell
hope www-data stays local system user, that is not usable from outside of postfix mynetworks
mydomain must not be a virtual domain in postfix here
mydomain should be a realm in postfix/dovecot
all the best