3

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.

5

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:

  • 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
  • 1
    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
  • @proy did you keep a copy of your blog post somewhere else ? I can't find it on the archive.org neither. – ychaouche Mar 31 '16 at 14:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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