Postfix mail transport unavailable only in queue

2.3k Views Asked by At

Yesterday i've tried to configure spamassassin on my debian server through this tutorial: https://www.rosehosting.com/blog/install-and-setup-spamassassin-in-debian-6/. Today i noticed that my e-mail gets queued with this error: mail transport unavailable

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

I've removed all the things from that tutorial and removed spamassassin from my server. Everything is now working, except the mail queue.

When I use postqueue -f, I still get the same error. Is there a way to resend the mail from the queue with the new settings?

In my master.cf nor main.cf from postfix i can find the private/spamassassin directory.

Regards

2

There are 2 best solutions below

0
On BEST ANSWER
postsuper -r ALL
postfix flush

(requeue all mail, flush queue)

0
On

Ralf has Answered the "How" but I like to also understand the "why".

I had a similar problem with postfix. I submitted two test messages to the same address, using port 587. Both were accepted, (because I was authenticated.)

One was delivered locally and the other became stuck in the queue.

# mailq
-Queue ID-  --Size-- ----Arrival Time---- -Sender/Recipient-------
0E77760477     3989 Wed Mar 16 11:09:53  [email protected]
                                                  (mail transport unavailable)
                                         [email protected]

Showed me the Queue ID for the stuck message, so I could grep for that in /var/log/mail.*

Ralf Hildebrandt's answer over on serverfault.com prompted me to grep the line above (using grep -B1)

That was when I realised that the "private/spamassassin" seems to be referring to

grep ^spamassassin /etc/postfix/master.cf

Using the Queue ID, I could search the logs using

grep -B1 0E77760477 /var/log/mail.log|egrep "(error|warning|fatal):"

In my case postfix/smtp logged "warning: connect to private/bounce: No such file or directory"

So it seems that postfix tried to bounce the message after it has been accepted and then found no applicable transport, which left the message stuck in the queue.