Blocking an email address in Postfix

I want to block an email address in Postfix, from idiot@spamcompany.com

I've found on Google that I should use checksenderaccess. The question is, where should I put it?

It seems I can put it in either smtpdrecipientrestrictions or smtpdsenderrestrictions. Which should I use and why, and what's the difference?

A common theme throughout the internet seems to be putting all the settings into smtpdrecipientrestrictions and skipping smtpdsenderrestrictions, even if the setting was specified under the smtpdsenderrestrictions in the Postfix docs. Why do people do this?

1 Reply

The difference is the stage in the SMTP transaction the restriction is applied. See this article for some explanation.

There's really no significant disadvantage to using smtpdrecipientrestrictions; in fact, in newer versions of Postfix, senderrestrictions won't be acted on sooner than recipientrestrictions.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct