Mails in active queue are never tried to be sent

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Mails in active queue are never tried to be sent

PeterDaem


Hello everybody!!

i am trying to run a filter relay with Postfix  and i have a doubt about active queues i need help with, please...

Postfix documentation states clearly that:

"Messages in the active queue are ready to be sent (runnable), but are not necessarily in the process of being sent (running)."

In my server i have some emails in active queue that are never tried to be sent...  after some time they go to the deferred queue with no error message/indication of any type anywhere!

When i try to force resend them via postqueue -i they go to active queue again but smtp process never tries to send them!!!

There is absolutelly no log about them except when i restart postfix where i just see a qmgr log telling that that email is in active queue... (but again, no smtp log at all even i increase debug level)


The weird thing is that it only happens with email from a specific domain (domainA) sent to a specific domain (domainZ) so..

mails from domainA -> domainZ   PROBLEM!!
mails from domainA -> any_other_domain   NO PROBLEM!
mails from any_other_domain -> domainZ    NO PROBLEM!

domainZ is using a symantec gateway after a F5 load balancer (just in case this info may help)


how does postifx work at this regard? when do they go from "runnable" to "running"??
is there any way to FORCE mails in active queue to change from "runnable" to effectively "run" and force smtp to try to send them??

Thanks in advance!

David.




Reply | Threaded
Open this post in threaded view
|

Re: Mails in active queue are never tried to be sent

Wietse Venema
Pedro David Marco:

>
>
> Hello everybody!!
>
> i am trying to run a filter relay with Postfix  and i have a doubt about active queues i need help with, please...
>
> Postfix documentation states clearly that:
>
> "Messages in the active queue are ready to be sent (runnable), but
> are not necessarily in the process of being sent (running)."

Show ALL non-debug logging for a problem message.

    grep name-of-queue-id /the/maillog/file

You may anonymize domain names per instructions in
http://www.postfix.org/DEBUG_README.html#mail

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Mails in active queue are never tried to be sent

PeterDaem
In reply to this post by PeterDaem
Thanks a lot Wietse...

here they are:

Mar 13 06:37:24 serverA postfix/qmgr[19283]: 80844160065: from=<[hidden email]>, size=64276, nrcpt=1 (queue active)
Mar 13 06:47:22 serverA postfix/error[17720]: 80844160065: to=<[hidden email]>, relay=none, delay=235656, delays=235058/597/0/0.01, dsn=4.3.0, status=deferred (unknown mail transport error)
Mar 13 07:57:24 serverA postfix/qmgr[19283]: 80844160065: from=<[hidden email]>, size=64276, nrcpt=1 (queue active)
Mar 13 08:07:13 serverA postfix/error[22030]: 80844160065: to=<[hidden email]>, relay=none, delay=240447, delays=239858/590/0/0.01, dsn=4.3.0, status=deferred (unknown mail transport error)
Mar 13 09:17:29 serverA postfix/qmgr[23376]: 80844160065: from=<[hidden email]>, size=64276, nrcpt=1 (queue active)
Mar 13 09:27:25 serverA postfix/error[26367]: 80844160065: to=<[hidden email]>, relay=none, delay=245259, delays=244663/596/0/0.02, dsn=4.3.0, status=deferred (unknown mail transport error)
Mar 13 10:37:29 serverA postfix/qmgr[23376]: 80844160065: from=<[hidden email]>, size=64276, nrcpt=1 (queue active)
Mar 13 10:47:29 serverA postfix/qmgr[23376]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
Mar 13 10:47:33 serverA postfix/qmgr[30730]: 80844160065: from=<[hidden email]>, size=64276, nrcpt=1 (queue active)
Mar 13 10:57:33 serverA postfix/qmgr[30730]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
Mar 13 10:57:35 serverA postfix/qmgr[31274]: 80844160065: from=<[hidden email]>, size=64276, nrcpt=1 (queue active)
Mar 13 11:07:35 serverA postfix/qmgr[31274]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
Mar 13 11:07:36 serverA postfix/qmgr[31830]: 80844160065: skipped, still being delivered
Mar 13 11:08:35 serverA postfix/qmgr[31830]: 80844160065: from=<[hidden email]>, size=64276, nrcpt=1 (queue active)
Mar 13 11:18:35 serverA postfix/qmgr[31830]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
Mar 13 11:18:37 serverA postfix/qmgr[32431]: 80844160065: from=<[hidden email]>, size=64276, nrcpt=1 (queue active)
Mar 13 11:28:37 serverA postfix/qmgr[32431]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
Mar 13 11:28:38 serverA postfix/qmgr[507]: 80844160065: from=<[hidden email]>, size=64276, nrcpt=1 (queue active)
Mar 13 11:38:38 serverA postfix/qmgr[507]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
Mar 13 11:38:39 serverA postfix/qmgr[1051]: 80844160065: skipped, still being delivered
Mar 13 11:39:44 serverA postfix/qmgr[1051]: 80844160065: from=<[hidden email]>, size=64276, nrcpt=1 (queue active)
Mar 13 11:39:44 serverA postfix/smtp[1061]: 80844160065: host mailclean.destination.xyz[DDD.DDD.DDD.DDD] refused to talk to me: 450 4.3.2 try again later
Mar 13 11:49:37 serverA postfix/error[1643]: 80844160065: to=<[hidden email]>, relay=none, delay=253791, delays=253198/593/0/0.01, dsn=4.3.0, status=deferred (unknown mail transport error)
Mar 13 12:57:46 serverA postfix/qmgr[1798]: 80844160065: from=<[hidden email]>, size=64276, nrcpt=1 (queue active)
Mar 13 13:07:33 serverA postfix/error[5936]: 80844160065: to=<[hidden email]>, relay=none, delay=258467, delays=257880/588/0/0.02, dsn=4.3.0, status=deferred (unknown mail transport error)
Mar 13 14:17:49 serverA postfix/qmgr[6744]: 80844160065: from=<[hidden email]>, size=64276, nrcpt=1 (queue active)
Mar 13 14:27:49 serverA postfix/qmgr[6744]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
Mar 13 14:27:52 serverA postfix/qmgr[10293]: 80844160065: from=<[hidden email]>, size=64276, nrcpt=1 (queue active)
Mar 13 14:37:52 serverA postfix/qmgr[10293]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
Mar 13 14:37:53 serverA postfix/qmgr[10838]: 80844160065: from=<[hidden email]>, size=64276, nrcpt=1 (queue active)
Mar 13 14:47:49 serverA postfix/error[11375]: 80844160065: to=<[hidden email]>, relay=none, delay=264483, delays=263887/596/0/0.01, dsn=4.3.0, status=deferred (unknown mail transport error)
Mar 13 15:57:53 serverA postfix/qmgr[10838]: 80844160065: from=<[hidden email]>, size=64276, nrcpt=1 (queue active)
Mar 13 16:07:50 serverA postfix/error[15711]: 80844160065: to=<[hidden email]>, relay=none, delay=269284, delays=268687/598/0/0.01, dsn=4.3.0, status=deferred (unknown mail transport error)
Mar 13 17:17:53 serverA postfix/qmgr[10838]: 80844160065: from=<[hidden email]>, size=64276, nrcpt=1 (queue active)
Mar 13 17:27:39 serverA postfix/error[20030]: 80844160065: to=<[hidden email]>, relay=none, delay=274073, delays=273487/585/0/0.02, dsn=4.3.0, status=deferred (unknown mail transport error)
Mar 13 18:37:53 serverA postfix/qmgr[10838]: 80844160065: from=<[hidden email]>, size=64276, nrcpt=1 (queue active)
Mar 13 18:47:28 serverA postfix/error[24370]: 80844160065: to=<[hidden email]>, relay=none, delay=278862, delays=278287/575/0/0.01, dsn=4.3.0, status=deferred (unknown mail transport error)
Mar 13 19:57:55 serverA postfix/qmgr[24640]: 80844160065: from=<[hidden email]>, size=64276, nrcpt=1 (queue active)
Mar 13 20:07:54 serverA postfix/error[28732]: 80844160065: to=<[hidden email]>, relay=none, delay=283688, delays=283089/599/0/0.01, dsn=4.3.0, status=deferred (unknown mail transport error)
Mar 13 21:18:02 serverA postfix/qmgr[29531]: 80844160065: from=<[hidden email]>, size=64276, nrcpt=1 (queue active)
Mar 13 21:18:02 serverA postfix/smtp[32423]: 80844160065: host mailclean.destination.xyz[DDD.DDD.DDD.DDD] refused to talk to me: 450 4.3.2 try again later
Mar 13 21:18:02 serverA postfix/smtp[32423]: 80844160065: host mailclean.destination.xyz[DDD.DDD.DDD.DD2] refused to talk to me: 450 4.3.2 try again later

trying to investigate i have found this:

Mar 13 08:07:13 serverA postfix/qmgr[19283]: warning: private/smtp socket: malformed response
Mar 13 08:07:13 serverA postfix/qmgr[19283]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Mar 13 08:07:13 serverA postfix/master[7926]: warning: process /usr/lib/postfix/smtp pid 20310 exit status 1
Mar 13 08:32:23 serverA postfix/smtp[22279]: fatal: watchdog timeout
Mar 13 08:32:24 serverA postfix/qmgr[19283]: fatal: A3FD8160067: timeout receiving delivery status from transport: smtp
Mar 13 08:32:24 serverA postfix/master[7926]: warning: process /usr/lib/postfix/smtp pid 22279 exit status 1
Mar 13 08:32:25 serverA postfix/master[7926]: warning: process /usr/lib/postfix/qmgr pid 19283 exit status 1
Mar 13 08:42:20 serverA postfix/smtp[22278]: fatal: watchdog timeout
Mar 13 08:42:21 serverA postfix/qmgr[23376]: warning: private/smtp socket: malformed response
Mar 13 08:42:21 serverA postfix/qmgr[23376]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Mar 13 08:42:21 serverA postfix/master[7926]: warning: process /usr/lib/postfix/smtp pid 22278 exit status 1
Mar 13 09:27:24 serverA postfix/smtp[25826]: fatal: watchdog timeout
Mar 13 09:27:25 serverA postfix/qmgr[23376]: warning: private/smtp socket: malformed response
Mar 13 09:27:25 serverA postfix/qmgr[23376]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Mar 13 09:27:25 serverA postfix/master[7926]: warning: process /usr/lib/postfix/smtp pid 25826 exit status 1
Mar 13 10:02:21 serverA postfix/smtp[27627]: fatal: watchdog timeout
Mar 13 10:02:22 serverA postfix/qmgr[23376]: warning: private/smtp socket: malformed response
Mar 13 10:02:22 serverA postfix/qmgr[23376]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Mar 13 10:02:22 serverA postfix/master[7926]: warning: process /usr/lib/postfix/smtp pid 27627 exit status 1
Mar 13 10:47:28 serverA postfix/smtp[28796]: fatal: watchdog timeout
Mar 13 10:47:29 serverA postfix/qmgr[23376]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
Mar 13 10:47:29 serverA postfix/master[7926]: warning: process /usr/lib/postfix/smtp pid 28796 exit status 1
Mar 13 10:47:30 serverA postfix/master[7926]: warning: process /usr/lib/postfix/qmgr pid 23376 exit status 1
Mar 13 10:57:33 serverA postfix/qmgr[30730]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
Mar 13 10:57:33 serverA postfix/smtp[29817]: fatal: watchdog timeout
Mar 13 10:57:34 serverA postfix/master[7926]: warning: process /usr/lib/postfix/qmgr pid 30730 exit status 1
Mar 13 10:57:34 serverA postfix/master[7926]: warning: process /usr/lib/postfix/smtp pid 29817 exit status 1
Mar 13 11:07:35 serverA postfix/qmgr[31274]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
Mar 13 11:07:35 serverA postfix/smtp[30750]: fatal: watchdog timeout
Mar 13 11:07:36 serverA postfix/master[7926]: warning: process /usr/lib/postfix/qmgr pid 31274 exit status 1
Mar 13 11:07:36 serverA postfix/master[7926]: warning: process /usr/lib/postfix/smtp pid 30750 exit status 1
Mar 13 11:18:35 serverA postfix/smtp[31462]: fatal: watchdog timeout
Mar 13 11:18:35 serverA postfix/qmgr[31830]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
Mar 13 11:18:36 serverA postfix/master[7926]: warning: process /usr/lib/postfix/smtp pid 31462 exit status 1
Mar 13 11:18:36 serverA postfix/master[7926]: warning: process /usr/lib/postfix/qmgr pid 31830 exit status 1
Mar 13 11:22:32 serverA postfix/smtp[31461]: fatal: watchdog timeout
Mar 13 11:22:33 serverA postfix/master[7926]: warning: process /usr/lib/postfix/smtp pid 31461 exit status 1
Mar 13 11:28:37 serverA postfix/smtp[31456]: fatal: watchdog timeout
Mar 13 11:28:37 serverA postfix/qmgr[32431]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
Mar 13 11:28:38 serverA postfix/master[7926]: warning: process /usr/lib/postfix/smtp pid 31456 exit status 1
Mar 13 11:28:38 serverA postfix/master[7926]: warning: process /usr/lib/postfix/qmgr pid 32431 exit status 1
Mar 13 11:32:35 serverA postfix/smtp[31458]: fatal: watchdog timeout
Mar 13 11:32:36 serverA postfix/master[7926]: warning: process /usr/lib/postfix/smtp pid 31458 exit status 1
Mar 13 11:38:38 serverA postfix/qmgr[507]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
Mar 13 11:38:38 serverA postfix/smtp[32617]: fatal: watchdog timeout
Mar 13 11:38:39 serverA postfix/master[7926]: warning: process /usr/lib/postfix/qmgr pid 507 exit status 1
Mar 13 11:38:39 serverA postfix/master[7926]: warning: process /usr/lib/postfix/smtp pid 32617 exit status 1
Mar 13 11:42:42 serverA postfix/smtp[32133]: fatal: watchdog timeout
Mar 13 11:42:43 serverA postfix/master[7926]: warning: process /usr/lib/postfix/smtp pid 32133 exit status 1
Mar 13 11:49:36 serverA postfix/smtp[1061]: fatal: watchdog timeout
Mar 13 11:49:37 serverA postfix/qmgr[1051]: warning: private/smtp socket: malformed response
Mar 13 11:49:37 serverA postfix/qmgr[1051]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Mar 13 11:49:37 serverA postfix/master[7926]: warning: process /usr/lib/postfix/smtp pid 1061 exit status 1
Mar 13 11:52:44 serverA postfix/smtp[32674]: fatal: watchdog timeout
Mar 13 11:52:45 serverA postfix/qmgr[1051]: fatal: A3FD8160067: timeout receiving delivery status from transport: smtp
Mar 13 11:52:45 serverA postfix/master[7926]: warning: process /usr/lib/postfix/smtp pid 32674 exit status 1




Any idea, please??????????????


Thanks again in advance!

David.





--------------------------------------------
On Tue, 3/15/16, Wietse Venema <[hidden email]> wrote:

 Subject: Re: Mails in active queue are never tried to be sent
 To: "Postfix users" <[hidden email]>
 Date: Tuesday, March 15, 2016, 11:20 AM
 
 >
 
 >
 > Hello
 everybody!!
 >
 > i am
 trying to run a filter relay with Postfix  and i have a
 doubt about active queues i need help with, please...
 >
 > Postfix
 documentation states clearly that:
 >
 > "Messages in the active queue are
 ready to be sent (runnable), but
 > are
 not necessarily in the process of being sent
 (running)."
 
 Show
 ALL non-debug logging for a problem message.
 
     grep name-of-queue-id
 /the/maillog/file
 
 You may
 anonymize domain names per instructions in
 http://www.postfix.org/DEBUG_README.html#mail
 
     Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Mails in active queue are never tried to be sent

PeterDaem
In reply to this post by PeterDaem
By the way, Wietse...

nothing is running chrooted in master.cf

David.


--------------------------------------------
On Tue, 3/15/16, Pedro David Marco <[hidden email]> wrote:

 Subject: Re: Mails in active queue are never tried to be sent
 To: "Postfix users" <[hidden email]>
 Date: Tuesday, March 15, 2016, 7:50 PM
 
 Thanks a lot Wietse...
 
 here they are:
 
 Mar 13 06:37:24 serverA postfix/qmgr[19283]: 80844160065:
 from=<[hidden email]>,
 size=64276, nrcpt=1 (queue active)
 Mar 13 06:47:22 serverA postfix/error[17720]: 80844160065:
 to=<[hidden email]>,
 relay=none, delay=235656, delays=235058/597/0/0.01,
 dsn=4.3.0, status=deferred (unknown mail transport error)
 Mar 13 07:57:24 serverA postfix/qmgr[19283]: 80844160065:
 from=<[hidden email]>,
 size=64276, nrcpt=1 (queue active)
 Mar 13 08:07:13 serverA postfix/error[22030]: 80844160065:
 to=<[hidden email]>,
 relay=none, delay=240447, delays=239858/590/0/0.01,
 dsn=4.3.0, status=deferred (unknown mail transport error)
 Mar 13 09:17:29 serverA postfix/qmgr[23376]: 80844160065:
 from=<[hidden email]>,
 size=64276, nrcpt=1 (queue active)
 Mar 13 09:27:25 serverA postfix/error[26367]: 80844160065:
 to=<[hidden email]>,
 relay=none, delay=245259, delays=244663/596/0/0.02,
 dsn=4.3.0, status=deferred (unknown mail transport error)
 Mar 13 10:37:29 serverA postfix/qmgr[23376]: 80844160065:
 from=<[hidden email]>,
 size=64276, nrcpt=1 (queue active)
 Mar 13 10:47:29 serverA postfix/qmgr[23376]: fatal:
 80844160065: timeout receiving delivery status from
 transport: smtp
 Mar 13 10:47:33 serverA postfix/qmgr[30730]: 80844160065:
 from=<[hidden email]>,
 size=64276, nrcpt=1 (queue active)
 Mar 13 10:57:33 serverA postfix/qmgr[30730]: fatal:
 80844160065: timeout receiving delivery status from
 transport: smtp
 Mar 13 10:57:35 serverA postfix/qmgr[31274]: 80844160065:
 from=<[hidden email]>,
 size=64276, nrcpt=1 (queue active)
 Mar 13 11:07:35 serverA postfix/qmgr[31274]: fatal:
 80844160065: timeout receiving delivery status from
 transport: smtp
 Mar 13 11:07:36 serverA postfix/qmgr[31830]: 80844160065:
 skipped, still being delivered
 Mar 13 11:08:35 serverA postfix/qmgr[31830]: 80844160065:
 from=<[hidden email]>,
 size=64276, nrcpt=1 (queue active)
 Mar 13 11:18:35 serverA postfix/qmgr[31830]: fatal:
 80844160065: timeout receiving delivery status from
 transport: smtp
 Mar 13 11:18:37 serverA postfix/qmgr[32431]: 80844160065:
 from=<[hidden email]>,
 size=64276, nrcpt=1 (queue active)
 Mar 13 11:28:37 serverA postfix/qmgr[32431]: fatal:
 80844160065: timeout receiving delivery status from
 transport: smtp
 Mar 13 11:28:38 serverA postfix/qmgr[507]: 80844160065:
 from=<[hidden email]>,
 size=64276, nrcpt=1 (queue active)
 Mar 13 11:38:38 serverA postfix/qmgr[507]: fatal:
 80844160065: timeout receiving delivery status from
 transport: smtp
 Mar 13 11:38:39 serverA postfix/qmgr[1051]: 80844160065:
 skipped, still being delivered
 Mar 13 11:39:44 serverA postfix/qmgr[1051]: 80844160065:
 from=<[hidden email]>,
 size=64276, nrcpt=1 (queue active)
 Mar 13 11:39:44 serverA postfix/smtp[1061]: 80844160065:
 host mailclean.destination.xyz[DDD.DDD.DDD.DDD] refused to
 talk to me: 450 4.3.2 try again later
 Mar 13 11:49:37 serverA postfix/error[1643]: 80844160065:
 to=<[hidden email]>,
 relay=none, delay=253791, delays=253198/593/0/0.01,
 dsn=4.3.0, status=deferred (unknown mail transport error)
 Mar 13 12:57:46 serverA postfix/qmgr[1798]: 80844160065:
 from=<[hidden email]>,
 size=64276, nrcpt=1 (queue active)
 Mar 13 13:07:33 serverA postfix/error[5936]: 80844160065:
 to=<[hidden email]>,
 relay=none, delay=258467, delays=257880/588/0/0.02,
 dsn=4.3.0, status=deferred (unknown mail transport error)
 Mar 13 14:17:49 serverA postfix/qmgr[6744]: 80844160065:
 from=<[hidden email]>,
 size=64276, nrcpt=1 (queue active)
 Mar 13 14:27:49 serverA postfix/qmgr[6744]: fatal:
 80844160065: timeout receiving delivery status from
 transport: smtp
 Mar 13 14:27:52 serverA postfix/qmgr[10293]: 80844160065:
 from=<[hidden email]>,
 size=64276, nrcpt=1 (queue active)
 Mar 13 14:37:52 serverA postfix/qmgr[10293]: fatal:
 80844160065: timeout receiving delivery status from
 transport: smtp
 Mar 13 14:37:53 serverA postfix/qmgr[10838]: 80844160065:
 from=<[hidden email]>,
 size=64276, nrcpt=1 (queue active)
 Mar 13 14:47:49 serverA postfix/error[11375]: 80844160065:
 to=<[hidden email]>,
 relay=none, delay=264483, delays=263887/596/0/0.01,
 dsn=4.3.0, status=deferred (unknown mail transport error)
 Mar 13 15:57:53 serverA postfix/qmgr[10838]: 80844160065:
 from=<[hidden email]>,
 size=64276, nrcpt=1 (queue active)
 Mar 13 16:07:50 serverA postfix/error[15711]: 80844160065:
 to=<[hidden email]>,
 relay=none, delay=269284, delays=268687/598/0/0.01,
 dsn=4.3.0, status=deferred (unknown mail transport error)
 Mar 13 17:17:53 serverA postfix/qmgr[10838]: 80844160065:
 from=<[hidden email]>,
 size=64276, nrcpt=1 (queue active)
 Mar 13 17:27:39 serverA postfix/error[20030]: 80844160065:
 to=<[hidden email]>,
 relay=none, delay=274073, delays=273487/585/0/0.02,
 dsn=4.3.0, status=deferred (unknown mail transport error)
 Mar 13 18:37:53 serverA postfix/qmgr[10838]: 80844160065:
 from=<[hidden email]>,
 size=64276, nrcpt=1 (queue active)
 Mar 13 18:47:28 serverA postfix/error[24370]: 80844160065:
 to=<[hidden email]>,
 relay=none, delay=278862, delays=278287/575/0/0.01,
 dsn=4.3.0, status=deferred (unknown mail transport error)
 Mar 13 19:57:55 serverA postfix/qmgr[24640]: 80844160065:
 from=<[hidden email]>,
 size=64276, nrcpt=1 (queue active)
 Mar 13 20:07:54 serverA postfix/error[28732]: 80844160065:
 to=<[hidden email]>,
 relay=none, delay=283688, delays=283089/599/0/0.01,
 dsn=4.3.0, status=deferred (unknown mail transport error)
 Mar 13 21:18:02 serverA postfix/qmgr[29531]: 80844160065:
 from=<[hidden email]>,
 size=64276, nrcpt=1 (queue active)
 Mar 13 21:18:02 serverA postfix/smtp[32423]: 80844160065:
 host mailclean.destination.xyz[DDD.DDD.DDD.DDD] refused to
 talk to me: 450 4.3.2 try again later
 Mar 13 21:18:02 serverA postfix/smtp[32423]: 80844160065:
 host mailclean.destination.xyz[DDD.DDD.DDD.DD2] refused to
 talk to me: 450 4.3.2 try again later
 
 trying to investigate i have found this:
 
 Mar 13 08:07:13 serverA postfix/qmgr[19283]: warning:
 private/smtp socket: malformed response
 Mar 13 08:07:13 serverA postfix/qmgr[19283]: warning:
 transport smtp failure -- see a previous warning/fatal/panic
 logfile record for the problem description
 Mar 13 08:07:13 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/smtp pid 20310 exit status 1
 Mar 13 08:32:23 serverA postfix/smtp[22279]: fatal: watchdog
 timeout
 Mar 13 08:32:24 serverA postfix/qmgr[19283]: fatal:
 A3FD8160067: timeout receiving delivery status from
 transport: smtp
 Mar 13 08:32:24 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/smtp pid 22279 exit status 1
 Mar 13 08:32:25 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/qmgr pid 19283 exit status 1
 Mar 13 08:42:20 serverA postfix/smtp[22278]: fatal: watchdog
 timeout
 Mar 13 08:42:21 serverA postfix/qmgr[23376]: warning:
 private/smtp socket: malformed response
 Mar 13 08:42:21 serverA postfix/qmgr[23376]: warning:
 transport smtp failure -- see a previous warning/fatal/panic
 logfile record for the problem description
 Mar 13 08:42:21 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/smtp pid 22278 exit status 1
 Mar 13 09:27:24 serverA postfix/smtp[25826]: fatal: watchdog
 timeout
 Mar 13 09:27:25 serverA postfix/qmgr[23376]: warning:
 private/smtp socket: malformed response
 Mar 13 09:27:25 serverA postfix/qmgr[23376]: warning:
 transport smtp failure -- see a previous warning/fatal/panic
 logfile record for the problem description
 Mar 13 09:27:25 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/smtp pid 25826 exit status 1
 Mar 13 10:02:21 serverA postfix/smtp[27627]: fatal: watchdog
 timeout
 Mar 13 10:02:22 serverA postfix/qmgr[23376]: warning:
 private/smtp socket: malformed response
 Mar 13 10:02:22 serverA postfix/qmgr[23376]: warning:
 transport smtp failure -- see a previous warning/fatal/panic
 logfile record for the problem description
 Mar 13 10:02:22 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/smtp pid 27627 exit status 1
 Mar 13 10:47:28 serverA postfix/smtp[28796]: fatal: watchdog
 timeout
 Mar 13 10:47:29 serverA postfix/qmgr[23376]: fatal:
 80844160065: timeout receiving delivery status from
 transport: smtp
 Mar 13 10:47:29 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/smtp pid 28796 exit status 1
 Mar 13 10:47:30 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/qmgr pid 23376 exit status 1
 Mar 13 10:57:33 serverA postfix/qmgr[30730]: fatal:
 80844160065: timeout receiving delivery status from
 transport: smtp
 Mar 13 10:57:33 serverA postfix/smtp[29817]: fatal: watchdog
 timeout
 Mar 13 10:57:34 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/qmgr pid 30730 exit status 1
 Mar 13 10:57:34 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/smtp pid 29817 exit status 1
 Mar 13 11:07:35 serverA postfix/qmgr[31274]: fatal:
 80844160065: timeout receiving delivery status from
 transport: smtp
 Mar 13 11:07:35 serverA postfix/smtp[30750]: fatal: watchdog
 timeout
 Mar 13 11:07:36 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/qmgr pid 31274 exit status 1
 Mar 13 11:07:36 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/smtp pid 30750 exit status 1
 Mar 13 11:18:35 serverA postfix/smtp[31462]: fatal: watchdog
 timeout
 Mar 13 11:18:35 serverA postfix/qmgr[31830]: fatal:
 80844160065: timeout receiving delivery status from
 transport: smtp
 Mar 13 11:18:36 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/smtp pid 31462 exit status 1
 Mar 13 11:18:36 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/qmgr pid 31830 exit status 1
 Mar 13 11:22:32 serverA postfix/smtp[31461]: fatal: watchdog
 timeout
 Mar 13 11:22:33 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/smtp pid 31461 exit status 1
 Mar 13 11:28:37 serverA postfix/smtp[31456]: fatal: watchdog
 timeout
 Mar 13 11:28:37 serverA postfix/qmgr[32431]: fatal:
 80844160065: timeout receiving delivery status from
 transport: smtp
 Mar 13 11:28:38 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/smtp pid 31456 exit status 1
 Mar 13 11:28:38 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/qmgr pid 32431 exit status 1
 Mar 13 11:32:35 serverA postfix/smtp[31458]: fatal: watchdog
 timeout
 Mar 13 11:32:36 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/smtp pid 31458 exit status 1
 Mar 13 11:38:38 serverA postfix/qmgr[507]: fatal:
 80844160065: timeout receiving delivery status from
 transport: smtp
 Mar 13 11:38:38 serverA postfix/smtp[32617]: fatal: watchdog
 timeout
 Mar 13 11:38:39 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/qmgr pid 507 exit status 1
 Mar 13 11:38:39 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/smtp pid 32617 exit status 1
 Mar 13 11:42:42 serverA postfix/smtp[32133]: fatal: watchdog
 timeout
 Mar 13 11:42:43 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/smtp pid 32133 exit status 1
 Mar 13 11:49:36 serverA postfix/smtp[1061]: fatal: watchdog
 timeout
 Mar 13 11:49:37 serverA postfix/qmgr[1051]: warning:
 private/smtp socket: malformed response
 Mar 13 11:49:37 serverA postfix/qmgr[1051]: warning:
 transport smtp failure -- see a previous warning/fatal/panic
 logfile record for the problem description
 Mar 13 11:49:37 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/smtp pid 1061 exit status 1
 Mar 13 11:52:44 serverA postfix/smtp[32674]: fatal: watchdog
 timeout
 Mar 13 11:52:45 serverA postfix/qmgr[1051]: fatal:
 A3FD8160067: timeout receiving delivery status from
 transport: smtp
 Mar 13 11:52:45 serverA postfix/master[7926]: warning:
 process /usr/lib/postfix/smtp pid 32674 exit status 1
 
 
 
 
 Any idea, please??????????????
 
 
 Thanks again in advance!
 
 David.
 
 
 
 
 
 --------------------------------------------
 On Tue, 3/15/16, Wietse Venema <[hidden email]>
 wrote:
 
  Subject: Re: Mails in active queue are never tried to be
 sent
  To: "Postfix users" <[hidden email]>
  Date: Tuesday, March 15, 2016, 11:20 AM
 
  >
 
  >
  > Hello
  everybody!!
  >
  > i am
  trying to run a filter relay with Postfix  and i have a
  doubt about active queues i need help with, please...
  >
  > Postfix
  documentation states clearly that:
  >
  > "Messages in the active queue are
  ready to be sent (runnable), but
  > are
  not necessarily in the process of being sent
  (running)."
 
  Show
  ALL non-debug logging for a problem message.
 
      grep name-of-queue-id
  /the/maillog/file
 
  You may
  anonymize domain names per instructions in
  http://www.postfix.org/DEBUG_README.html#mail
 
      Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Mails in active queue are never tried to be sent

Wietse Venema
Pedro David Marco:
>  Mar 13 06:47:22 serverA postfix/error[17720]: 80844160065:
>  to=<[hidden email]>,
>  relay=none, delay=235656, delays=235058/597/0/0.01,
>  dsn=4.3.0, status=deferred (unknown mail transport error)

Well there is your problem.

For follow-up investigation see:
http://www.postfix.org/DEBUG_README.html#logging

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Mails in active queue are never tried to be sent

Wietse Venema
In reply to this post by PeterDaem
Pedro David Marco:
> Thanks a lot Wietse...
>
> here they are:

Your Postfix SMTP clients are hanging (resulting in watchdog
timeouts).  Are you running in a VM, or some other hosting setup?

        Wietse

> Mar 13 10:47:29 serverA postfix/qmgr[23376]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
> Mar 13 10:57:33 serverA postfix/qmgr[30730]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
> Mar 13 11:07:35 serverA postfix/qmgr[31274]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
> Mar 13 11:18:35 serverA postfix/qmgr[31830]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
> Mar 13 11:28:37 serverA postfix/qmgr[32431]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
> Mar 13 11:38:38 serverA postfix/qmgr[507]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
> Mar 13 14:27:49 serverA postfix/qmgr[6744]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
> Mar 13 14:37:52 serverA postfix/qmgr[10293]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
> Mar 13 08:07:13 serverA postfix/qmgr[19283]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
> Mar 13 08:32:23 serverA postfix/smtp[22279]: fatal: watchdog timeout
> Mar 13 08:32:24 serverA postfix/qmgr[19283]: fatal: A3FD8160067: timeout receiving delivery status from transport: smtp
> Mar 13 08:42:20 serverA postfix/smtp[22278]: fatal: watchdog timeout
> Mar 13 08:42:21 serverA postfix/qmgr[23376]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
> Mar 13 09:27:24 serverA postfix/smtp[25826]: fatal: watchdog timeout
> Mar 13 09:27:25 serverA postfix/qmgr[23376]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
> Mar 13 10:02:21 serverA postfix/smtp[27627]: fatal: watchdog timeout
> Mar 13 10:02:22 serverA postfix/qmgr[23376]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
> Mar 13 10:47:28 serverA postfix/smtp[28796]: fatal: watchdog timeout
> Mar 13 10:47:29 serverA postfix/qmgr[23376]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
> Mar 13 10:57:33 serverA postfix/qmgr[30730]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
> Mar 13 10:57:33 serverA postfix/smtp[29817]: fatal: watchdog timeout
> Mar 13 11:07:35 serverA postfix/qmgr[31274]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
> Mar 13 11:07:35 serverA postfix/smtp[30750]: fatal: watchdog timeout
> Mar 13 11:18:35 serverA postfix/smtp[31462]: fatal: watchdog timeout
> Mar 13 11:18:35 serverA postfix/qmgr[31830]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
> Mar 13 11:22:32 serverA postfix/smtp[31461]: fatal: watchdog timeout
> Mar 13 11:28:37 serverA postfix/smtp[31456]: fatal: watchdog timeout
> Mar 13 11:28:37 serverA postfix/qmgr[32431]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
> Mar 13 11:32:35 serverA postfix/smtp[31458]: fatal: watchdog timeout
> Mar 13 11:38:38 serverA postfix/qmgr[507]: fatal: 80844160065: timeout receiving delivery status from transport: smtp
> Mar 13 11:38:38 serverA postfix/smtp[32617]: fatal: watchdog timeout
> Mar 13 11:42:42 serverA postfix/smtp[32133]: fatal: watchdog timeout
> Mar 13 11:49:36 serverA postfix/smtp[1061]: fatal: watchdog timeout
> Mar 13 11:49:37 serverA postfix/qmgr[1051]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
> Mar 13 11:52:44 serverA postfix/smtp[32674]: fatal: watchdog timeout
> Mar 13 11:52:45 serverA postfix/qmgr[1051]: fatal: A3FD8160067: timeout receiving delivery status from transport: smtp
Reply | Threaded
Open this post in threaded view
|

Re: Mails in active queue are never tried to be sent

PeterDaem
In reply to this post by PeterDaem
Hi!!

no Wietse...  i have studied the traffic with tcpdump and  it does not seem a Postfix issue... i see lots of TCP retransmissions
from postfix that do not have their correspioding ACK..

I am suspecting of a but in the Symantec appliancce used at destination...

Thanks!

David.



--------------------------------------------
On Tue, 3/15/16, Wietse Venema <[hidden email]> wrote:

 Subject: Re: Mails in active queue are never tried to be sent
 To: "Postfix users" <[hidden email]>
 Date: Tuesday, March 15, 2016, 8:48 PM
 
 Pedro David Marco:
 > Thanks a lot Wietse...
 >
 > here they are:
 
 Your Postfix SMTP clients are
 hanging (resulting in watchdog
 timeouts). 
 Are you running in a VM, or some other hosting setup?
 
     Wietse
 
 > Mar 13 10:47:29 serverA
 postfix/qmgr[23376]: fatal: 80844160065: timeout receiving
 delivery status from transport: smtp
 >
 Mar 13 10:57:33 serverA postfix/qmgr[30730]: fatal:
 80844160065: timeout receiving delivery status from
 transport: smtp
 > Mar 13 11:07:35 serverA
 postfix/qmgr[31274]: fatal: 80844160065: timeout receiving
 delivery status from transport: smtp
 >
 Mar 13 11:18:35 serverA postfix/qmgr[31830]: fatal:
 80844160065: timeout receiving delivery status from
 transport: smtp
 > Mar 13 11:28:37 serverA
 postfix/qmgr[32431]: fatal: 80844160065: timeout receiving
 delivery status from transport: smtp
 >
 Mar 13 11:38:38 serverA postfix/qmgr[507]: fatal:
 80844160065: timeout receiving delivery status from
 transport: smtp
 > Mar 13 14:27:49 serverA
 postfix/qmgr[6744]: fatal: 80844160065: timeout receiving
 delivery status from transport: smtp
 >
 Mar 13 14:37:52 serverA postfix/qmgr[10293]: fatal:
 80844160065: timeout receiving delivery status from
 transport: smtp
 > Mar 13 08:07:13 serverA
 postfix/qmgr[19283]: warning: transport smtp failure -- see
 a previous warning/fatal/panic logfile record for the
 problem description
 > Mar 13 08:32:23
 serverA postfix/smtp[22279]: fatal: watchdog timeout
 > Mar 13 08:32:24 serverA
 postfix/qmgr[19283]: fatal: A3FD8160067: timeout receiving
 delivery status from transport: smtp
 >
 Mar 13 08:42:20 serverA postfix/smtp[22278]: fatal: watchdog
 timeout
 > Mar 13 08:42:21 serverA
 postfix/qmgr[23376]: warning: transport smtp failure -- see
 a previous warning/fatal/panic logfile record for the
 problem description
 > Mar 13 09:27:24
 serverA postfix/smtp[25826]: fatal: watchdog timeout
 > Mar 13 09:27:25 serverA
 postfix/qmgr[23376]: warning: transport smtp failure -- see
 a previous warning/fatal/panic logfile record for the
 problem description
 > Mar 13 10:02:21
 serverA postfix/smtp[27627]: fatal: watchdog timeout
 > Mar 13 10:02:22 serverA
 postfix/qmgr[23376]: warning: transport smtp failure -- see
 a previous warning/fatal/panic logfile record for the
 problem description
 > Mar 13 10:47:28
 serverA postfix/smtp[28796]: fatal: watchdog timeout
 > Mar 13 10:47:29 serverA
 postfix/qmgr[23376]: fatal: 80844160065: timeout receiving
 delivery status from transport: smtp
 >
 Mar 13 10:57:33 serverA postfix/qmgr[30730]: fatal:
 80844160065: timeout receiving delivery status from
 transport: smtp
 > Mar 13 10:57:33 serverA
 postfix/smtp[29817]: fatal: watchdog timeout
 > Mar 13 11:07:35 serverA
 postfix/qmgr[31274]: fatal: 80844160065: timeout receiving
 delivery status from transport: smtp
 >
 Mar 13 11:07:35 serverA postfix/smtp[30750]: fatal: watchdog
 timeout
 > Mar 13 11:18:35 serverA
 postfix/smtp[31462]: fatal: watchdog timeout
 > Mar 13 11:18:35 serverA
 postfix/qmgr[31830]: fatal: 80844160065: timeout receiving
 delivery status from transport: smtp
 >
 Mar 13 11:22:32 serverA postfix/smtp[31461]: fatal: watchdog
 timeout
 > Mar 13 11:28:37 serverA
 postfix/smtp[31456]: fatal: watchdog timeout
 > Mar 13 11:28:37 serverA
 postfix/qmgr[32431]: fatal: 80844160065: timeout receiving
 delivery status from transport: smtp
 >
 Mar 13 11:32:35 serverA postfix/smtp[31458]: fatal: watchdog
 timeout
 > Mar 13 11:38:38 serverA
 postfix/qmgr[507]: fatal: 80844160065: timeout receiving
 delivery status from transport: smtp
 >
 Mar 13 11:38:38 serverA postfix/smtp[32617]: fatal: watchdog
 timeout
 > Mar 13 11:42:42 serverA
 postfix/smtp[32133]: fatal: watchdog timeout
 > Mar 13 11:49:36 serverA
 postfix/smtp[1061]: fatal: watchdog timeout
 > Mar 13 11:49:37 serverA
 postfix/qmgr[1051]: warning: transport smtp failure -- see a
 previous warning/fatal/panic logfile record for the problem
 description
 > Mar 13 11:52:44 serverA
 postfix/smtp[32674]: fatal: watchdog timeout
 > Mar 13 11:52:45 serverA
 postfix/qmgr[1051]: fatal: A3FD8160067: timeout receiving
 delivery status from transport: smtp
Reply | Threaded
Open this post in threaded view
|

Re: Mails in active queue are never tried to be sent

Wietse Venema
Pedro David Marco:
> Mar 13 08:32:23 serverA postfix/smtp[22279]: fatal: watchdog timeout
> ...
> Mar 13 11:32:35 serverA postfix/smtp[31458]: fatal: watchdog timeout

Wietse:
>  Your Postfix SMTP clients are hanging (resulting in watchdog
>  timeouts).  Are you running in a VM, or some other hosting setup?
 
Pedro David Marco:
> no Wietse...  i have studied the traffic with tcpdump and  it does
> not seem a Postfix issue... i see lots of TCP retransmissions from
> postfix that do not have their correspioding ACK..

This may come as a surprise, but Postfix is designed to deal with
errors in TCP connections.

Specifically, Postfix uses poll() or select() to determine that a
TCP a send or receive operation is taking too much time.

On your system, these poll() or select() calls do not time out.
Maybe your system does not get the hardware resources to that are
needed to implement those time limits. That's why I asked if you
run Postfix in a VM or some other hosting setup.

The Postfix watchdog timer is a safety mechanism for kernels with
a broken implementation of poll() or select(). Postfix requires
that these functions work. You need to find out why they don't.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Inserting a unique ID into the email header with Postfix alone

Istvan Prosinger
In reply to this post by Wietse Venema
Hello Everyone!

I need to insert something like

X-MY-ID-some-unique-ID

into each email's header for local tracking purposes.

The unique ID doesn't have to be some complicated hash, it can be
something like the <message-id>+<date> or <date><time> ... which would
be mostly unique.

Any ideas if such a thing could be done with just prepending in header
checks, without external filtering?

Reply | Threaded
Open this post in threaded view
|

Re: Inserting a unique ID into the email header with Postfix alone

Noel Jones-2
On 3/18/2016 6:20 AM, Istvan Prosinger wrote:

> Hello Everyone!
>
> I need to insert something like
>
> X-MY-ID-some-unique-ID
>
> into each email's header for local tracking purposes.
>
> The unique ID doesn't have to be some complicated hash, it can be
> something like the <message-id>+<date> or <date><time> ... which
> would be mostly unique.
>
> Any ideas if such a thing could be done with just prepending in
> header checks, without external filtering?
>

You can't do this with postfix alone.
You would not need a full external filter, but you could use a
policy service or a tcp table, either of which are fairly simple and
lightweight.

Or you could just use the Message-ID as your mostly-unique identifier.


  -- Noel Jones
Reply | Threaded
Open this post in threaded view
|

Re: Inserting a unique ID into the email header with Postfix alone

/dev/rob0
On Fri, Mar 18, 2016 at 09:05:51AM -0500, Noel Jones wrote:
> On 3/18/2016 6:20 AM, Istvan Prosinger wrote:
> > Hello Everyone!
> >
> > I need to insert something like
> >
> > X-MY-ID-some-unique-ID
> >
> > into each email's header for local tracking purposes.

Why a separate header, why not just:

enable_long_queue_ids = yes

and use the queue ID that's already in your top Received: header?

(Legacy note: that option was introduced in the now-EOL Postfix
version 2.9.  If you're not on 2.10 or later you should be.)

> > The unique ID doesn't have to be some complicated hash, it can be
> > something like the <message-id>+<date> or <date><time> ... which
> > would be mostly unique.
> >
> > Any ideas if such a thing could be done with just prepending in
> > header checks, without external filtering?
> >
>
> You can't do this with postfix alone.
> You would not need a full external filter, but you could use a
> policy service or a tcp table, either of which are fairly simple and
> lightweight.
>
> Or you could just use the Message-ID as your mostly-unique identifier.
--
  http://rob0.nodns4.us/
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:
Reply | Threaded
Open this post in threaded view
|

Re: Inserting a unique ID into the email header with Postfix alone

Wietse Venema
/dev/rob0:

> On Fri, Mar 18, 2016 at 09:05:51AM -0500, Noel Jones wrote:
> > On 3/18/2016 6:20 AM, Istvan Prosinger wrote:
> > > Hello Everyone!
> > >
> > > I need to insert something like
> > >
> > > X-MY-ID-some-unique-ID
> > >
> > > into each email's header for local tracking purposes.
>
> Why a separate header, why not just:
>
> enable_long_queue_ids = yes
>
> and use the queue ID that's already in your top Received: header?

I would use a header_checks PREPEND action that prepends a header
with the long queue ID from the Received: header.

Sorry, no time to write out a complete example.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Inserting a unique ID into the email header with Postfix alone

btb-2
In reply to this post by Istvan Prosinger
On Mar 18, 2016, at 07.20, Istvan Prosinger <[hidden email]> wrote:

>
> Hello Everyone!
>
> I need to insert something like
>
> X-MY-ID-some-unique-ID
>
> into each email's header for local tracking purposes.
>
> The unique ID doesn't have to be some complicated hash, it can be something like the <message-id>+<date> or <date><time> ... which would be mostly unique.
>
> Any ideas if such a thing could be done with just prepending in header checks, without external filtering?
others have already answered the question, but as an aside, it's my understanding that rfc 6648 discourages/deprecates use of the "X-" prefix in, among a number of things, email headers.

-ben

smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Inserting a unique ID into the email header with Postfix alone

Istvan Prosinger
Thanks Ben. It was a generic example

On 18.3.2016 21:14, [hidden email] wrote:

> On Mar 18, 2016, at 07.20, Istvan Prosinger <[hidden email]> wrote:
>>
>> Hello Everyone!
>>
>> I need to insert something like
>>
>> X-MY-ID-some-unique-ID
>>
>> into each email's header for local tracking purposes.
>>
>> The unique ID doesn't have to be some complicated hash, it can be something like the <message-id>+<date> or <date><time> ... which would be mostly unique.
>>
>> Any ideas if such a thing could be done with just prepending in header checks, without external filtering?
>
> others have already answered the question, but as an aside, it's my understanding that rfc 6648 discourages/deprecates use of the "X-" prefix in, among a number of things, email headers.
>
> -ben
>
Reply | Threaded
Open this post in threaded view
|

Re: Inserting a unique ID into the email header with Postfix alone

Istvan Prosinger
In reply to this post by Wietse Venema


On 18.3.2016 17:27, Wietse Venema wrote:

> /dev/rob0:
>> On Fri, Mar 18, 2016 at 09:05:51AM -0500, Noel Jones wrote:
>>> On 3/18/2016 6:20 AM, Istvan Prosinger wrote:
>>>> Hello Everyone!
>>>>
>>>> I need to insert something like
>>>>
>>>> X-MY-ID-some-unique-ID
>>>>
>>>> into each email's header for local tracking purposes.
>>
>> Why a separate header, why not just:
>>
>> enable_long_queue_ids = yes
>>
>> and use the queue ID that's already in your top Received: header?
>
> I would use a header_checks PREPEND action that prepends a header
> with the long queue ID from the Received: header.
>
> Sorry, no time to write out a complete example.
>
> Wietse
>

Thanks.

Ok, I was thinking of this, but wasn't sure how to "pass" the (long or
not) queue ID (or anything else) in header_checks. Another thought is to
copy one that is already there, but not sure how to do it or how far can
I go in a "one-liner".

If I'm on a right track, a link to some document would also do, as I've
spent some time diging on this and I'm probabbly "googling" the wrong
keywords/thoughts

No need to write me a code.

Regards,
Istvan
Reply | Threaded
Open this post in threaded view
|

Re: Inserting a unique ID into the email header with Postfix alone

Istvan Prosinger
In reply to this post by /dev/rob0


On 18.3.2016 15:42, /dev/rob0 wrote:

> On Fri, Mar 18, 2016 at 09:05:51AM -0500, Noel Jones wrote:
>> On 3/18/2016 6:20 AM, Istvan Prosinger wrote:
>>> Hello Everyone!
>>>
>>> I need to insert something like
>>>
>>> X-MY-ID-some-unique-ID
>>>
>>> into each email's header for local tracking purposes.
>
> Why a separate header, why not just:
>
> enable_long_queue_ids = yes
>
> and use the queue ID that's already in your top Received: header?
>
> (Legacy note: that option was introduced in the now-EOL Postfix
> version 2.9.  If you're not on 2.10 or later you should be.)

I have v3.1 running on that box. A long queue was in my mind all day,
but as I need that header in a specific format (I don't have control
over that as that part is not my work), I was thinking of copying it,
but still digging on that matter.

Thanks

>
>>> The unique ID doesn't have to be some complicated hash, it can be
>>> something like the <message-id>+<date> or <date><time> ... which
>>> would be mostly unique.
>>>
>>> Any ideas if such a thing could be done with just prepending in
>>> header checks, without external filtering?
>>>
>>
>> You can't do this with postfix alone.
>> You would not need a full external filter, but you could use a
>> policy service or a tcp table, either of which are fairly simple and
>> lightweight.
>>
>> Or you could just use the Message-ID as your mostly-unique identifier.
Reply | Threaded
Open this post in threaded view
|

Re: Inserting a unique ID into the email header with Postfix alone

Wietse Venema
In reply to this post by Istvan Prosinger
Istvan Prosinger:

> >> Why a separate header, why not just:
> >>
> >> enable_long_queue_ids = yes
> >>
> >> and use the queue ID that's already in your top Received: header?
> >
> > I would use a header_checks PREPEND action that prepends a header
> > with the long queue ID from the Received: header.
> >
> > Sorry, no time to write out a complete example.
>
> Thanks.
>
> Ok, I was thinking of this, but wasn't sure how to "pass" the (long or
> not) queue ID (or anything else) in header_checks. Another thought is to
> copy one that is already there, but not sure how to do it or how far can
> I go in a "one-liner".

/etc/postfix/main.cf:
    enable_long_queue_ids = yes
    header_checks = /etc/postfix/stamp.pcre

/etc/postfix/stamp.pcre:
    # Pattern for /usr/sbin/sendmail submission
    /^Received:\sby\sserver\.example\.com\s\S+\s\S+\s\S+\s+id\s(\S+);/ Prepend X-ID $1.server.example.com

    # Pattern for SMTP submission
    /^Received:\sfrom\s\S+\.example\.com\s\S+\s\S+\s+by\sserver\.example\.com\s\S+\s\S+\s\S+\s+id\s(\S+);/ Prepend X-ID $1.server.example.com

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Inserting a unique ID into the email header with Postfix alone

Istvan Prosinger
On 19.3.2016 1:18, Wietse Venema wrote:

> Istvan Prosinger:
>>>> Why a separate header, why not just:
>>>>
>>>> enable_long_queue_ids = yes
>>>>
>>>> and use the queue ID that's already in your top Received: header?
>>>
>>> I would use a header_checks PREPEND action that prepends a header
>>> with the long queue ID from the Received: header.
>>>
>>> Sorry, no time to write out a complete example.
>>
>> Thanks.
>>
>> Ok, I was thinking of this, but wasn't sure how to "pass" the (long or
>> not) queue ID (or anything else) in header_checks. Another thought is to
>> copy one that is already there, but not sure how to do it or how far can
>> I go in a "one-liner"
>
> /etc/postfix/main.cf:
>      enable_long_queue_ids = yes
>      header_checks = /etc/postfix/stamp.pcre
>
> /etc/postfix/stamp.pcre:
>      # Pattern for /usr/sbin/sendmail submission
>      /^Received:\sby\sserver\.example\.com\s\S+\s\S+\s\S+\s+id\s(\S+);/ Prepend X-ID $1.server.example.com
>
>      # Pattern for SMTP submission
>      /^Received:\sfrom\s\S+\.example\.com\s\S+\s\S+\s+by\sserver\.example\.com\s\S+\s\S+\s\S+\s+id\s(\S+);/ Prepend X-ID $1.server.example.com
>
> Wietse
>


Thanks for the ideas. I need to mark the incomming mails for local
storage tracking, not submission, so anyway, I ended up with a shorter
version

/name\.server\.com\s\S+\s\S+\s\S+\s+id\s(\S+)/ Prepend X-DIYL-$1

And added to
smtpd_recipient_restrictions =  check_recipient_access
pcre:/etc/postfix/stamp.pcre

I'm quite sure that I have a match on the queue id, but the Prepend has
no effect on the header. What am I missing?
Reply | Threaded
Open this post in threaded view
|

Re: Inserting a unique ID into the email header with Postfix alone

Wietse Venema
Istvan Prosinger:
[ Charset windows-1252 converted... ]

> On 19.3.2016 1:18, Wietse Venema wrote:
> > Istvan Prosinger:
> >>>> Why a separate header, why not just:
> >>>>
> >>>> enable_long_queue_ids = yes
> >>>>
> >>>> and use the queue ID that's already in your top Received: header?
> >>>
> >>> I would use a header_checks PREPEND action that prepends a header
> >>> with the long queue ID from the Received: header.
> >>>
> >>> Sorry, no time to write out a complete example.
> >>
> >> Thanks.
> >>
> >> Ok, I was thinking of this, but wasn't sure how to "pass" the (long or
> >> not) queue ID (or anything else) in header_checks. Another thought is to
> >> copy one that is already there, but not sure how to do it or how far can
> >> I go in a "one-liner"
> >
> > /etc/postfix/main.cf:
> >      enable_long_queue_ids = yes
> >      header_checks = /etc/postfix/stamp.pcre
> >
> > /etc/postfix/stamp.pcre:
> >      # Pattern for /usr/sbin/sendmail submission
> >      /^Received:\sby\sserver\.example\.com\s\S+\s\S+\s\S+\s+id\s(\S+);/ Prepend X-ID $1.server.example.com
> >
> >      # Pattern for SMTP submission
> >      /^Received:\sfrom\s\S+\.example\.com\s\S+\s\S+\s+by\sserver\.example\.com\s\S+\s\S+\s\S+\s+id\s(\S+);/ Prepend X-ID $1.server.example.com
> >
> > Wietse
> >
>
>
> Thanks for the ideas. I need to mark the incomming mails for local
> storage tracking, not submission, so anyway, I ended up with a shorter
> version
>
> /name\.server\.com\s\S+\s\S+\s\S+\s+id\s(\S+)/ Prepend X-DIYL-$1

I recommend starting the pattern with /^Received:.*by name\.server\.com.../
That way it won't have to inspect non-"Received:" headers.

> And added to
> smtpd_recipient_restrictions =  check_recipient_access
> pcre:/etc/postfix/stamp.pcre
>
> I'm quite sure that I have a match on the queue id, but the Prepend has
> no effect on the header. What am I missing?

Test with:

    postmap -h pcre:/etc/postfix/stamp.pcre < file

where the file contains an email message with Received: headers.

        Wietse

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Inserting a unique ID into the email header with Postfix alone

Istvan Prosinger


On 19.3.2016 15:13, Wietse Venema wrote:

> Istvan Prosinger:
> [ Charset windows-1252 converted... ]
>> On 19.3.2016 1:18, Wietse Venema wrote:
>>> Istvan Prosinger:
>>>>>> Why a separate header, why not just:
>>>>>>
>>>>>> enable_long_queue_ids = yes
>>>>>>
>>>>>> and use the queue ID that's already in your top Received: header?
>>>>>
>>>>> I would use a header_checks PREPEND action that prepends a header
>>>>> with the long queue ID from the Received: header.
>>>>>
>>>>> Sorry, no time to write out a complete example.
>>>>
>>>> Thanks.
>>>>
>>>> Ok, I was thinking of this, but wasn't sure how to "pass" the (long or
>>>> not) queue ID (or anything else) in header_checks. Another thought is to
>>>> copy one that is already there, but not sure how to do it or how far can
>>>> I go in a "one-liner"
>>>
>>> /etc/postfix/main.cf:
>>>       enable_long_queue_ids = yes
>>>       header_checks = /etc/postfix/stamp.pcre
>>>
>>> /etc/postfix/stamp.pcre:
>>>       # Pattern for /usr/sbin/sendmail submission
>>>       /^Received:\sby\sserver\.example\.com\s\S+\s\S+\s\S+\s+id\s(\S+);/ Prepend X-ID $1.server.example.com
>>>
>>>       # Pattern for SMTP submission
>>>       /^Received:\sfrom\s\S+\.example\.com\s\S+\s\S+\s+by\sserver\.example\.com\s\S+\s\S+\s\S+\s+id\s(\S+);/ Prepend X-ID $1.server.example.com
>>>
>>> Wietse
>>>
>>
>>
>> Thanks for the ideas. I need to mark the incomming mails for local
>> storage tracking, not submission, so anyway, I ended up with a shorter
>> version
>>
>> /name\.server\.com\s\S+\s\S+\s\S+\s+id\s(\S+)/ Prepend X-DIYL-$1
>
> I recommend starting the pattern with /^Received:.*by name\.server\.com.../
> That way it won't have to inspect non-"Received:" headers.
>
>> And added to
>> smtpd_recipient_restrictions =  check_recipient_access
>> pcre:/etc/postfix/stamp.pcre
>>
>> I'm quite sure that I have a match on the queue id, but the Prepend has
>> no effect on the header. What am I missing?
>
> Test with:
>
>      postmap -h pcre:/etc/postfix/stamp.pcre < file
>
> where the file contains an email message with Received: headers.
>
> Wietse
>
> Wietse
>

Thanks,

I'll make the pattern search detailed as you suggested.

I've tried what you ask, this is what I got:

[root@email ~]# postmap -h -q - pcre:/etc/postfix/stamp.pcre < testheader

Received: from localhost (localhost [127.0.0.1])
         by email-test.server.com (Postfix) with ESMTP id 3qRyhf4pqCzKmYs
         for <[hidden email]>; Sat, 19 Mar 2016 06:17:54
-0400 (EDT) Prepend X-DIYL-3qRyhf4pqCzKmYs
Received: from knox.prosinger.net (knox.prosinger.net [5.44.101.107])
         by email-test.server.com (Postfix) with ESMTPS id 3qRyhf0ChgzKmYq
         for <[hidden email]>; Sat, 19 Mar 2016 06:17:52
-0400 (EDT) Prepend X-DIYL-3qRyhf0ChgzKmYq


I think that this means two hits. If so, what comes to my mind is that
these headers are not there yet, in the moment when the stamper.pcre is
called.

12