Report this

What is the reason for this report?

Configure Postfix to discard 'unknown_sender_domain' rather than reject

Posted on June 4, 2020

I have hit the common issue of my DO IP address being blocked by hotmail, after 10+ years of trouble free usage!

They are completely unhelpful on why this is happening now so I am trying to sort it myself.

I have postfix configured to reject all unknown_sender_domain and I have noticed a lot of spam attempts from hotmail addresses in the logs. I wonder if there is a form of backscatter going on because I am then sending rejects?

Rather than send any sort of reject, can I configure postfix to silently discard the email and not send any reply? eg; I have ‘reject_unknown_sender_domain’ in main.cf



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Heya,

Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.

Yes, you can configure Postfix to silently discard emails from unknown domains. You’ll need to modify the main.cf file, which should have a line that’s setting up your smtpd_recipient_restrictions. You can add the line ‘check_sender_access hash:/etc/postfix/sender_access’.

In the sender_access file, you can use the ‘DISCARD’ action to silently drop emails from specific addresses or domains. Here’s an example:

hotmail.com DISCARD

You should run postmap /etc/postfix/sender_access after every change to the sender_access file. Finally, don’t forget to reload Postfix’s configuration using the postfix reload command.

Please confirm that you understand the consequences of implementing this change. This will discard every single email from hotmail.com without any notification. The sender won’t get a bounce message or any other error and will not know that their message wasn’t delivered.

You can learn more about this in the DigitalOcean tutorials, specifically How To Configure a Mail Server Using Postfix, Dovecot, MySQL, and SpamAssassin.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.