Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 3 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 "!someothermail@domain2.com"
}

References:

share|improve this answer
1  
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 "!someothermail@domain2.com" –  proy Jun 16 '10 at 5:54
    
I finally managed to get maildrop working with virtualusers in postfix details here netzary.com/blogs/2010/jul/01/… –  proy Jul 16 '10 at 17:57
add comment

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.