Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On my companies mail server there is a mail address everyone@example.org which sends a mail to every user which is useful for internal communication etc. I want to restrict this recipient to only allow mails from our mail server and reject any mail from outside to this address. What is the best way to do this in postfix?

share|improve this question

A workaround is to change the Mailadress of each mail to everyone@ to noreply@ so that these fast replies going straight into the void. You could do this through a header-check:

/^(To|Cc):.*everyone@your.tld/ REPLACE To:noreply@your.tld
share|improve this answer
up vote 0 down vote accepted

I found a pretty simple solution: Use postfwd (postfix firewall daemon).

Create a rule:

sender_domain!=example.org ; recipient==everyone@example.org ; action=REJECT everyone@example.org only allowed for example.org addresses
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.