On Thu, Sep 10, 2015 at 06:12:44PM +0200, Mark Clarke wrote: > We need to apply a content_filter to all outgoing mail. To do this we have > set up two smtp processes in master.cf > > 192.168.10.73:smtp inet n - - - - smtpd > 192.168.10.72:smtp inet n - - - - smtpd > -o content_filter=dfilt:
These are Postfix SMTP servers (accept incoming mail). > dfilt unix - n n - - pipe > flags=Rq user=filter argv=/etc/postfix/postfix_filter.sh -f ${sender} -- > ${recipient} > > > this is for the altermime script. In main.cf we have set up > > smtp_bind_address = 192.168.10.72 This is a configuration parameter of the SMTP client (sends outgoing mail). It has nothing to do with which SMTP service mail will be sent to. > The problem is it appears the transport map simply by passes the outgoing > smtp server settings as defined in main.cf and with smtp_bind_address. There's no bypass, you're simply confused. > I have tried editing the transport map to force it to use the > 192.168.10.72:smtp service but this doesn't work. To send to that service, you'd make the transport: smtp:[192.168.10.72] but that will almost certainly create a mai loop. > How can I get this to > work? i.e route outgoing mail to a specific gateway via transport maps but > still apply a content filter to outgoing mail? That's what Postfix does. It first applies content filters, and then once the mail is re-injected into queue (by a mechanism that does set a content_filter) uses the transport table. You're just confused. -- Viktor.