Postfix-spamassassin mail loop problem
I have Postfix and Spamassassin configured exactly the way the tutorials say to, with the proper entries in master.cf and what I thought was the correct settings in main.cf. When I send a message at the postfix server, it correctly sends the message through the postfixfilter.sh script and if it's spam, it is labeled as such. Here is the problem. After spamassassin checks the message, it sends it back to postfix, who immediatly rejects it as an authentication error, and the log shows the message bouncing back and forth between postfix and spamassassin until it reaches the maximum hops and dies. Can anyone tell me what setting in Postfix controls authentication errors?
|
any clues in the mail logs as to why you're getting the bounce?
|
I get "Authentication Warning: spamassassin changed the from field to user@foo" telling me that spamassassin changed the from to its original state before sending the message back to postfix. Then it goes looping back and forth 27 times and fails. .
|
I Got It!!!!
I finally figured it out. It turns out that the spamassassin script "postfixfilter" has a line that looks like this by default
/usr/bin/spamc | /usr/sbin/sendmail -i "$@" That tells sendmail (yes sendmail) to reinsert the message into the queue. I don't use sendmail on this machine, so I changed it to point at the sendmail compatible postfix program /usr/bin/spamc | /usr/sbin/sendmail.postfix -i "$@" And now my postfix server is filtering the crap out of my email. Woohoo!. Thanks for your help in this and the other threads Unspawn.. LQ rules as always... |
hmm. you may wan to consider renaming your original sendmail binary to something like sendmail.old and then doing a chmod 000 on it. Then create a symlink from postfix.sendmail -> sendmail
This way other apps that depend on sendmail will use your properly configured postfix instead. |
I would except we don't run anything else on this machine except postfix and spamassassin. I am actually uninstalling sendmail as we type. sendmail.postfix comes with postfix and is a compatible script for queue re-entry.
I definently would do as you said if I were running other services.. |
A thousand thanks!
Wow, this thread is more than 10 years old, and it still solved my problem!
I was running into a loop, for the same reason mentioned. changed to sendmail.postfix and it worked as a charm! Thanks pcghost, and thanks to Internet :) |
It Works! It really really works!
Man I have spent countless hours spanning many days to fix this problem. The solution here fixed it good. However, the solution here was a little vague for me, my first time setting up a server, so be gentle.
It took me some time to realize where Quote:
I fixed mine in postfix master configuration Quote:
Code:
spamassassin unix - n n - - pipe flags=R user=spamd argv=/usr/bin/spamc -e /usr/sbin/sendmail -oi -f ${sender} ${recipient} Code:
spamassassin unix - n n - - pipe flags=R user=spamd argv=/usr/bin/spamc -e /usr/sbin/sendmail.postfix -oi -f ${sender} ${recipient} |
All times are GMT -5. The time now is 11:56 PM. |