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.

1 Answer 1

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 "[email protected]"
}

References:

3
  • 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 "[email protected]"
    – proy
    Jun 16, 2010 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, 2010 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, 2016 at 14:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .