• Support
  • Problem with postfix rules to prevent Open Relay

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!

    Josdansd changed the title to Problem with postfix rules to prevent Open Relay .

    aaPanel_Kern I haven't been able to, I mean, I could if I get rid of the "smtpd_sender_restrictions" but I want to make them work to make the mail server more secure and less prone to compromise the server's IP in blacklists, since I have been getting a lot of mail logs saying that some random IPs are trying to sending mails in behalf of my domains.