Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

2 Answers 2

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

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

Your Answer

 
discard

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.