Recently I've been trying to increase the security options to prevent the mail server to be used as an open relay, so I set the "smtpd_sender_restrictions" in the postfix config, in which I set the following "reject_sender_login_mismatch, reject_unknown_sender_domain, permit_sasl_authenticated", although when sending emails with this configuration I get the following error:
Failed to send mail, error reason[{'targetemail@gmail.com': (553, b'5.7.1 : Sender address rejected: not owned by user user@vpsmaildomain.com')}]
Upon searching on this topic, I found that this might be due to "smtpd_sender_login_maps" not configured in the postfix config, so I set this with the following value: "sqlite:/etc/postfix/sqlite_virtual_mailbox_maps.cf"
But the previous error keeps showing up, what am I doing wrong? My guess here is that it might be due to the mapping not being properly done by postfix, but I don't really know how to adress this. Any help will be appreciated, thanks in advance!