postfix/qmgr warning: connect to transport spamassassin: Connection refused

While setting up a postfix/spamassassin/spamc combo, I got everything up and running but was being harried by log messages like so:

postfix/qmgr[547]: warning: connect to transport spamassassin: Connection refused

It turns out that this message isn’t necessarily indicative of continued problems of messages being delivered through postfix and spamassassin, but rather of messages in the queue when the setup was screwy. I found this post about bad mail stuck in qmgr with a one-line reply with the clue that pointed me in the right direction.

During the course of the setup, I fat-fingered some stuff, made some minor mistakes etc. On each iteration, of course, I was sending myself test emails. So again, the log message noted above was showing up in my mail.log. When I got everything working, it persisted.

The cause? Mail in the queue sent previously that was still trying to do Bad Things. In my case, this manifested itself like so on a run of `sudo postqueue -p`:

AFEDB98077      495 Sat Jan 19 17:56:56  rwoodrum@domain.net
                                                  (mail transport unavailable)
                                         rwoodrum@domain.com

The solution? Delete those messages from the queue (or requeue them) with postsuper and restart postfix. Log messages gone, mail being delivered through spamc/spamd combo. Now, of course, this is only to get rid of the log message after you’ve got everything setup correctly. If your config is still borked, the message is obviously going to persist. ^_^

Comments

One Response to “postfix/qmgr warning: connect to transport spamassassin: Connection refused”

  1. Nick on March 25th, 2010 4:40 am

    I had the same thing happen on CentOS 5 (CentOS 5.3) -

    postfix/qmgr[11075]: warning: connect to transport spamassassin: No such file or directory

    I ran “postsuper -d ALL” and restarted postfix and this seems have fixed the issue. Thanks for the good information helping me get this resolved.

Leave a Reply