Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Fedora, Debian, OpenSuSE and Android
Posts: 1,820
Rep:
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?
Distribution: Fedora, Debian, OpenSuSE and Android
Posts: 1,820
Original Poster
Rep:
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. .
Distribution: Fedora, Debian, OpenSuSE and Android
Posts: 1,820
Original Poster
Rep:
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
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.
Distribution: Fedora, Debian, OpenSuSE and Android
Posts: 1,820
Original Poster
Rep:
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..
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}
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.