2

How can I apply a content filter to a specific email address in Postfix?

Setting the content_filter parameter in main.cf applies the content filter to all inbound messages. I only want to apply my filter to a specific address, e.g. support@example.com.

I've defined my filter in master.cf using the pipe command as follows:

myfilter unix   -       n       n       -       -       pipe
     flags=Rq user=filter argv=/usr/bin/myfilter -f ${sender} -- ${recipient}

I'm using Postfix 3.1.4 and I'm not using virtual mailboxes.

Simon
  • 121
  • 2
  • out of the box I am not sure you can do that with postfix. You can use policyd (https://wiki.policyd.org/accesscontrol) but it requires third party software – natxo asenjo Sep 05 '17 at 17:59

2 Answers2

1

The classic way of doing per email address processing of mail is to use procmail

ptman
  • 28,394
  • 2
  • 30
  • 45
0

The classic way of doing per email address processing of mail is to use maildrop

bgtvfr
  • 1,262
  • 10
  • 20