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

I have a postfix + virtual users setup. I have enabled maildrop as the delivery agent. How can I write a filter for a user so that if mail comes from a particular domain to that user a copy also goes to another email address.

share|improve this question
up vote 4 down vote accepted

It's been a while since I've used maildrop to create recipes, but I believe something like this:

if ( /^From:.*domain\.com/:h ) {
  cc "!"


share|improve this answer
Thanks Jon for the pointer. That was something for me to start with. There is a slight correction to the above, maildrop requires a "!" to understand that it needs to be send via sendmail. It should cc "!" – proy Jun 16 '10 at 5:54
I finally managed to get maildrop working with virtualusers in postfix details here… – proy Jul 16 '10 at 17:57
@proy did you keep a copy of your blog post somewhere else ? I can't find it on the neither. – ychaouche Mar 31 at 14:12

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.