I have these lines in my master.cf on postfix:
Code:
filter unix - n n - 10 pipe
flags=Rq user=filter argv=/usr/local/sbin/newfilter.pl ${sender} ${recipient}
smtp inet n - n - - smtpd
-o content_filter=filter:dummy
What this does is pass all the mail comming into the system througha custom filter I made.
This works great, no spam because of our filter. Problem is outgoing mail is also going through the filter. This is a problem because on some of our outgoign mail we get this error:
snippet from log:
Code:
Jun 26 17:34:08 gma-web postfix/smtp[14753]: 67AA838E: to=<luke@gabbartandwoods.com>, relay=mail-fwd.sbc-webhosting.com[161.58.18.5], delay=1, status=bounced (host mail-fwd.sbc-webhosting.com[161.58.18.5] said: 554 Validating Sender (in reply to RCPT TO command))
only a couple servers do this, but they always do it.
I disabled the filter and it no longer happened, however without the filter our incomming mail is also unfiltered.
So, how can I make the filter only work on mail not sent by one of the valid local e-mail addresses? FYI the people using this server connect using ms outlook over smtp and pop3, so outgoing mail is also sent using smtp from other systems.