On Mon, 23 Mar 2009 15:28:03 +0100, Terry Carmen <te...@cnysupport.com> wrote:
> Martin Strand wrote: >> Is it possible to make a header_checks rule apply only to a certain client? >> >> I've got an annoying piece of software which sends messages through Postfix. >> This software insists on including a "Sender" header that I wish to filter >> out with Postfix, but only for this certain client (or the envelope sender, >> which is always the same) >> Unfortunately, fixing the software is not an option :( >> Any tips? >> > > If you want to change the sender's email address for the message, you > can use > > smtp_generic_maps = hash:/etc/postfix/generic > > In main.cf > > and add the address translation to > > /etc/postfix/generic > > (don't forget to postmap and reload config) > > If you really want to not deliver it, you can add: > > badsen...@yourdomain.tld error:mail from badsender is not deliverable > > to your transport table. > > Terry > > Terry No, it's only the "Sender" *header* that's causing problems, not the actual envelope sender. I added an IGNORE line to filter out all Sender headers, but I would prefer to only apply that filter to this specific client. After reading the header_checks documentation several times I still can't find a way to do this so I'll live with the current workaround for now. Thanks anyway!