Can't find answer to (queue active)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't find answer to (queue active)

local-mail-courier
Hi Postfix Users,

I have scoured the web for an answer to this.  Sometimes in the postfix log,
when a message does not send right away, the log will say "(queue active)".

When I use the QUEUE ID to search the mail log for all associated logs for
the message, there often isn't any further information.  But, I do see that
"postfix/qmgr" is the process.

I posted about this here:

https://serverfault.com/questions/722483/postfix-sending-delay-many-queue-active-messages-in-log

However, I don't have a satisfactory answer.  Is there any specific reason
why this happens?  Or is it just multiple things?  If it is multiple things,
I think those causes may be:

1) system load too heavy for efficient message delivery

2) current mail queue busy

3) DNS lookup for recipient mail servers not giving a fast response

4) The recipient mail server is tarpitting the connections

Hopefully there is some additional information out there that can help.

Thanks! :-)



--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
Reply | Threaded
Open this post in threaded view
|

Re: Can't find answer to (queue active)

Viktor Dukhovni
On Fri, Jan 03, 2020 at 01:50:36PM -0700, local-mail-courier wrote:

> I have scoured the web for an answer to this.  Sometimes in the postfix log,
> when a message does not send right away, the log will say "(queue active)".

This happens for *every* message, every time (typically just once) that
a message enters the active queue.  The message recipients are then
queued for delivery via a given transport to a particular nexthop.

> When I use the QUEUE ID to search the mail log for all associated logs
> for the message, there often isn't any further information.  But, I do
> see that "postfix/qmgr" is the process.

Further logging happens once a delivery agent has completed or
failed a delivery attempt.  This can take some time.

> However, I don't have a satisfactory answer.  Is there any specific reason
> why this happens?  Or is it just multiple things?  If it is multiple things,

Delivery is not instantaneous.  Also, with Linux systemd, on busy
systems logging has become rather lo[us]sy.  You may need to raise
message rate limits for systemd-journald.

> Hopefully there is some additional information out there that can help.

Once a message is delivered, the delays=a/b/c/d numbers tell the story.
You'll need to analyze these.

    http://www.postfix.org/postconf.5.html#delay_logging_resolution_limit
    http://www.postfix.org/QSHAPE_README.html

--
    Viktor.
Reply | Threaded
Open this post in threaded view
|

Re: Can't find answer to (queue active)

Wietse Venema
In reply to this post by local-mail-courier
local-mail-courier:
> Hi Postfix Users,
>
> I have scoured the web for an answer to this.  Sometimes in the postfix log,
> when a message does not send right away, the log will say "(queue active)".

Actually, it says something like:

Jan  3 hh:mm:ss hostname postfix/qmgr[pid]: QUEUEID: from=<sender>, size=x, nrcpt=y (queue active)

> When I use the QUEUE ID to search the mail log for all associated logs for
> the message, there often isn't any further information.  But, I do see that
> "postfix/qmgr" is the process.

Normally, some delivery process will report "status=delivered",
status=bounced", or "status=deferred".

If that information is missing, then either your delivery process
is failing (and you are missing its warning/fatal/panic logfile
message), or your logging is busted.

To fix an invisible failing delivery process, you need to find out
where its warning/fatal/panic log records are written, read what
the records say, and correct that problem.

To fix busted logging:

1 - Disable SeLinux or AppArmor or whatever and see if that makes
    a differerence.

2 - system-effing-d-based versions of Linux lose logs under high load.

3 - Recent versions of MacOS have an unusable logging system.

To fix [1], update your SeLinux or AppArmor or whatever policies.

To fix [2] or [3], Postfix 3.4 comes with its own postlogd logging daemon.
http://www.postfix.org/postconf.5.html#maillog_file
http://www.postfix.org/postlogd.8.html

        Wietse


> I posted about this here:
>
> https://serverfault.com/questions/722483/postfix-sending-delay-many-queue-active-messages-in-log
>
> However, I don't have a satisfactory answer.  Is there any specific reason
> why this happens?  Or is it just multiple things?  If it is multiple things,
> I think those causes may be:
>
> 1) system load too heavy for efficient message delivery
>
> 2) current mail queue busy
>
> 3) DNS lookup for recipient mail servers not giving a fast response
>
> 4) The recipient mail server is tarpitting the connections
>
> Hopefully there is some additional information out there that can help.
>
> Thanks! :-)
>
>
>
> --
> Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
>