On Tue, Mar 04, 2014 at 07:01:53PM +0530, Nilesh Govindrajan wrote: > I'd totally solve this problem using sieve at IMAP level.
That'll work. > But an alternate postfix level solution is - > > http://mattshaw.org/news/how-to-filter-mail-with-postfix-header_checks/ & > http://www.postfix.org/header_checks.5.html > > (untested!!) > > if /^From: sales@software\.tld/ > /^To: seceratary@ee\.ethz\.ch/ REDIRECT ... > endif This can't and won't. Header checks are processed one line at a time. At previous employer I wrote a transparent SMTP proxy (content filter) that selectively encapsulates (makes message/rfc822 attachments out of) harassment and other mail that needs to be delivered to supervisory mailboxes rather than the requested recipient. It operated on various properties of the incoming envelope. -- Viktor.