Discussion:
Expired mail log
(too old to reply)
Diego Roccia
2016-07-18 12:26:38 UTC
Permalink
Hello Guys
I can't find any log of postfix deleting messages that have been in queue too long ( > max_queue_lifetime )
I also checked in the source code but I didn't find any trace of these actions. I'm sure it's happening (a lot)
Do you know how can I track expired messages?

Thank you
Wietse Venema
2016-07-18 14:33:06 UTC
Permalink
Post by Diego Roccia
Hello Guys
I can't find any log of postfix deleting messages that have been in queue too long ( > max_queue_lifetime )
I also checked in the source code but I didn't find any trace of these actions. I'm sure it's happening (a lot)
Do you know how can I track expired messages?
In qmgr_active.c, an expired message is logged as 'status=expired,
returned to sender' with all Postfix versions, and in addition it
is logged as 'removed' starting with Postfix version 2.1.0.

Both records are logged with the queue ID; that is sufficient to
follow a message from the point where it enters the mail queue to
the point where it is deleted.

Wietse
Diego Roccia
2016-07-18 16:00:42 UTC
Permalink
Post by Wietse Venema
Post by Diego Roccia
Hello Guys
I can't find any log of postfix deleting messages that have been in queue
too long ( > max_queue_lifetime )
I also checked in the source code but I didn't find any trace of these
actions. I'm sure it's happening (a lot)
Do you know how can I track expired messages?
In qmgr_active.c, an expired message is logged as 'status=expired,
returned to sender' with all Postfix versions, and in addition it
is logged as 'removed' starting with Postfix version 2.1.0.
Both records are logged with the queue ID; that is sufficient to
follow a message from the point where it enters the mail queue to
the point where it is deleted.
Wietse
Thank you Wietse
I checked the code and I found the msginfo you talk about. Problem is, I don't have any expired log in my mail system.

My configuration is

maximal_queue_lifetime = 3h
bounce_queue_lifetime = 3h
qmgr_message_active_limit = 80000
qmgr_message_recipient_limit = 80000

and the master.cf qmgr entry:

qmgr fifo n - n 300 1 qmgr -o syslog_facility=local5

I just also added in rsyslog.conf

:msg,contains,"expired" -/var/log/mail/expired

in order to be sure to catch it, but nothing.

My postfix server is configured with multi_instance, and the main instance has a fallback_relay on the second , rate-limited, one
Diego Roccia
2016-07-18 16:09:09 UTC
Permalink
Post by Diego Roccia
Post by Wietse Venema
Post by Diego Roccia
Hello Guys
I can't find any log of postfix deleting messages that have been in queue
too long ( > max_queue_lifetime )
I also checked in the source code but I didn't find any trace of these
actions. I'm sure it's happening (a lot)
Do you know how can I track expired messages?
In qmgr_active.c, an expired message is logged as 'status=expired,
returned to sender' with all Postfix versions, and in addition it
is logged as 'removed' starting with Postfix version 2.1.0.
Both records are logged with the queue ID; that is sufficient to
follow a message from the point where it enters the mail queue to
the point where it is deleted.
Wietse
Thank you Wietse
I checked the code and I found the msginfo you talk about. Problem is, I
don't have any expired log in my mail system.
My configuration is
maximal_queue_lifetime = 3h
bounce_queue_lifetime = 3h
qmgr_message_active_limit = 80000
qmgr_message_recipient_limit = 80000
qmgr fifo n - n 300 1 qmgr -o
syslog_facility=local5
I just also added in rsyslog.conf
:msg,contains,"expired" -/var/log/mail/expired
in order to be sure to catch it, but nothing.
My postfix server is configured with multi_instance, and the main instance
has a fallback_relay on the second , rate-limited, one
found them! with the rsyslog "catchall" I was able to find the entries.
Now I will find out why they're not being logged

thank you for your time

Continue reading on narkive:
Loading...