LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Postfix-spamassassin mail loop problem (https://www.linuxquestions.org/questions/linux-software-2/postfix-spamassassin-mail-loop-problem-66045/)

Pcghost 06-16-2003 08:17 PM

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?

mcleodnine 06-17-2003 02:23 AM

any clues in the mail logs as to why you're getting the bounce?

Pcghost 06-17-2003 09:06 AM

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. .

Pcghost 06-17-2003 05:35 PM

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...

mcleodnine 06-17-2003 05:52 PM

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.

Pcghost 06-17-2003 05:55 PM

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..

peergum 01-09-2016 05:06 PM

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 :)

DuckMann 09-25-2016 12:38 PM

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:

spamassassin script "postfixfilter"
was located. I'm running CentOS 6.8 with Postfix and Dovecot. I'm not using Sendmail.

I fixed mine in postfix master configuration
Quote:

/etc/postfix/master.cf
I changed this line from
Code:

spamassassin unix - n n - - pipe flags=R user=spamd argv=/usr/bin/spamc -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
to
Code:

spamassassin unix - n n - - pipe flags=R user=spamd argv=/usr/bin/spamc -e /usr/sbin/sendmail.postfix -oi -f ${sender} ${recipient}
Thanks


All times are GMT -5. The time now is 11:56 PM.