Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

CentOS 5.x | SendMail

I want to block most emails going to a specific sendmail mailbox unless they are on an approved "whitelist". Is this possible to do in sendmail?

share|improve this question

@quanta should have qualified that answer - it is possible. Sendmail is a very powerful heuristic rules processing engine which can be configured to do all sorts of things. It's just rather hard to do what you ask (would probably require re-writing of the file rather than and easier to implement it in other ways.

Obvious solutions include using a milter like mailfromd or use procmail (with an approporaite recipe) as the delivery agent.

share|improve this answer

It is possible to write a version of check_compat rule set, but take care if you are using FEATURE(compat_check). IMHO the easiest way to achieve this is to use MIMEDefang and implement the whitelist in your own version of the filter_recipient subroutine within mimedefang-filter.

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.