Re: Messages stuck in queue forever

2010-01-07 Thread Wendigo Thompson
Hi Wietse:

  Answering your first question, the message in question does show up in find:
26701170  872 -rwx--1 _postfix wheel  444689 Aug  4
2008 /var/spool/postfix/maildrop/F423E1976D72

  When I look at the queue message, it is definitely representative of
what I process by the thousands every day -- a message that came from
my clients external mail server and was directed to my mail-drop
alias.  I have about a hundred of these messages and would really like
to get them delivered.  Any ideas?

  I also looked for the other message I pasted this morning and it
looks like it was successfully delivered, so I guess my problem is
these messages that are no longer in the active queue, and how to get
them delivered.

Thanks,
Wendy

On Wed, Jan 6, 2010 at 4:18 PM, Wietse Venema wie...@porcupine.org wrote:
 Wendigo Thompson:
 Hello:

   I maintain a database of e-mail messages for my law firm client -- I
 wrote an application that inserts e-mail messages into a database and
 then used an alias to pipe e-mail to that application, and the clients
 e-mail server forwards all mail for certain litigants to that e-mail
 address.  Nominally this works great, but I've noticed an odd issue:
 some messages get queued and are never released.  I'd like to force
 postfix to redeliver these messages (I've tried postsuper and
 postsuper -r ALL with no luck) -- does anybody have any pointers?
 It's 2.4.3 on Mac OS X Server 10.5.

 Beware, I don't have a Mac, and Apple has made some changes to
 Postfix so I may have to refer you to the vendor if this does not
 work out on the mailing list.

 Sample mailq entries (one has been stuck since August, the other since 
 Monday:
 F423E1976D72   444129 Fri Aug  1 15:23:30  MAILER-DAEMON

 This message has no recipients, and should have been removed from
 the queue long ago.

 Please report results of the following shell command (as root):

    find /var/spool/postfix -name F423E1976D72 -ls

 (instead of /var/spool/postfix, specify the name where Apple
 stores the Postfix queue. That is the output of the command:

    postconf queue_directory

 )

 001F224CE9559*    3080 Wed Jan  6 14:51:58  MAILER-DAEMON
                                          msgrece...@10.188.237.22

 This message is in the active queue. Do you have any qmgr processes
 running? If not, then nothing will happen with this mail. Apple
 has added an automatic shutdown feature to Postfix that may get in
 the way of progress.

 Do you have any mail logfile information for this message? If
 there is none, then that is also a problem that needs to be solved
 before we can find out why these messages are not moving.

        Wietse



Re: Messages stuck in queue forever

2010-01-07 Thread Victor Duchovni
On Thu, Jan 07, 2010 at 11:04:13AM -0600, Wendigo Thompson wrote:

   Answering your first question, the message in question does show up in find:
 26701170  872 -rwx--1 _postfix wheel  444689 Aug  4
 2008 /var/spool/postfix/maildrop/F423E1976D72

Is this larger than your message size limit? If so, pickup(8) may be
unable to hand it off to cleanup(8).

Do you have different message size limits for postdrop(8) and
cleanup(8)? Did you have a larger message size limit in August?

-- 
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
mailto:majord...@postfix.org?body=unsubscribe%20postfix-users

If my response solves your problem, the best way to thank me is to not
send an it worked, thanks follow-up. If you must respond, please put
It worked, thanks in the Subject so I can delete these quickly.


Re: Messages stuck in queue forever

2010-01-07 Thread Wietse Venema
Wendigo Thompson:
 Hi Wietse:
 
   Answering your first question, the message in question does show up in find:
 26701170  872 -rwx--1 _postfix wheel  444689 Aug  4
 2008 /var/spool/postfix/maildrop/F423E1976D72

This is one of two messages that you mentioned.

   When I look at the queue message, it is definitely representative of
 what I process by the thousands every day -- a message that came from
 my clients external mail server and was directed to my mail-drop
 alias.  I have about a hundred of these messages and would really like
 to get them delivered.  Any ideas?

Normally, the Postfix pickup daemon will take mail from the
maildrop directory and feed it into Postfix.

Possibilities:

1) Your Postfix configuration never runs the pickup daemon, therefore
mail stays in the maildrop directory.

2) The pickup daemon asks the kernel for the list of file names in
the maildrop directory, but the listing does not contain the file
named F423E1976D72. This would indicate that your file system is
corrupted. You'd need to find a good time to shutdown the system
and run a file system check.

3) The pickup daemon finds the file F423E1976D72, but the file
content is in error. In this case the pickup daemon would log a
warning message of some kind.

** You still need to find out where all the Postfix logging is
** stored on MacOS. Postfix logs all mail delivery attempts,
** whether successful or not.

4) Apple changed something that I don't know about, which makes
the pickup daemon work in ways that I don't know about. In this
case you need to talk to your vendor.

   I also looked for the other message I pasted this morning and
 it looks like it was successfully delivered, so I guess my problem
 is these messages that are no longer in the active queue, and how
 to get them delivered.

That other message was dated January 6, so it was not stuck in the
mail queue.

Wietse


Re: Messages stuck in queue forever

2010-01-07 Thread Wendigo Thompson
To answer Victor, message_size_limit is so.

For Wietse:

1) Pickup seems enabled, from master.cf:
pickupfifo  n   -   n   60  1   pickup
  -o content_filter=

2) The files are there via ls, so it seems OK

3) Postfix logs under the mail. syslog facility.  What level should I
set to see the pickup errors you are looking for?

Is there an option that defines a date after which messages should no
longer be picked up?  Maybe that's something I'm missing.

Thanks,
Wendy



On Thu, Jan 7, 2010 at 11:24 AM, Wietse Venema wie...@porcupine.org wrote:
 Wendigo Thompson:
 Hi Wietse:

   Answering your first question, the message in question does show up in 
 find:
 26701170      872 -rwx--    1 _postfix wheel      444689 Aug  4
 2008 /var/spool/postfix/maildrop/F423E1976D72

 This is one of two messages that you mentioned.

   When I look at the queue message, it is definitely representative of
 what I process by the thousands every day -- a message that came from
 my clients external mail server and was directed to my mail-drop
 alias.  I have about a hundred of these messages and would really like
 to get them delivered.  Any ideas?

 Normally, the Postfix pickup daemon will take mail from the
 maildrop directory and feed it into Postfix.

 Possibilities:

 1) Your Postfix configuration never runs the pickup daemon, therefore
 mail stays in the maildrop directory.

 2) The pickup daemon asks the kernel for the list of file names in
 the maildrop directory, but the listing does not contain the file
 named F423E1976D72. This would indicate that your file system is
 corrupted. You'd need to find a good time to shutdown the system
 and run a file system check.

 3) The pickup daemon finds the file F423E1976D72, but the file
 content is in error. In this case the pickup daemon would log a
 warning message of some kind.

 ** You still need to find out where all the Postfix logging is
 ** stored on MacOS. Postfix logs all mail delivery attempts,
 ** whether successful or not.

 4) Apple changed something that I don't know about, which makes
 the pickup daemon work in ways that I don't know about. In this
 case you need to talk to your vendor.

   I also looked for the other message I pasted this morning and
 it looks like it was successfully delivered, so I guess my problem
 is these messages that are no longer in the active queue, and how
 to get them delivered.

 That other message was dated January 6, so it was not stuck in the
 mail queue.

        Wietse



Re: Messages stuck in queue forever

2010-01-07 Thread Victor Duchovni
On Thu, Jan 07, 2010 at 12:59:45PM -0600, Wendigo Thompson wrote:

 To answer Victor, message_size_limit is so.

This if far from a complete sentence. What is your current message size
limit? What are the sizes of the stuck messages? What logging is
generated by pickup (and cleanup) when pickup scans the maildrop queue?

# postkick public pickup W

watch the logs.

Do you rely on Apple's OpenDirectory (and related SASL) enhancements
to Postfix? If not, consider building and using the Postfix from
macports.org.

 3) Postfix logs under the mail. syslog facility.  What level should I
 set to see the pickup errors you are looking for?
 
 Is there an option that defines a date after which messages should no
 longer be picked up?  Maybe that's something I'm missing.

No.

-- 
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
mailto:majord...@postfix.org?body=unsubscribe%20postfix-users

If my response solves your problem, the best way to thank me is to not
send an it worked, thanks follow-up. If you must respond, please put
It worked, thanks in the Subject so I can delete these quickly.


Re: Messages stuck in queue forever

2010-01-07 Thread Wietse Venema
Wendigo Thompson:
 To answer Victor, message_size_limit is so.
 
 For Wietse:
 
 1) Pickup seems enabled, from master.cf:
 pickupfifo  n   -   n   60  1   pickup
   -o content_filter=

Does the mail logfile show records of pickup daemon activity?
If there is none, then this is the source of the problem.

 2) The files are there via ls, so it seems OK
 
 3) Postfix logs under the mail. syslog facility.  What level should I
 set to see the pickup errors you are looking for?

Postfix logs normal activity as mail.info, and warnings at mail.warn
and higher levels, depending on the nature of the problem.

 Is there an option that defines a date after which messages should no
 longer be picked up?  Maybe that's something I'm missing.

Nope. As required by Internet mail standards, Postfix returns
undeliverable mail to the sender.

Wietse


Re: Messages stuck in queue forever

2010-01-07 Thread Wendigo Thompson
Woops, I meant to say: message_size_limit is zero.

I went all verbose and looking at pickup logs for the specific queue
ID I mentioned earlier:
Jan  7 13:16:20 se001 postfix/pickup[57270]: warning: C9EBD24E12F23:
message has been queued for 521 days
Jan  7 13:16:20 se001 postfix/pickup[57270]: C9EBD24E12F23: uid=27
from= orig_id=F423E1976D72
Jan  7 13:16:20 se001 postfix/cleanup[75242]: C9EBD24E12F23:
message-id=11eccdf1ff78c949b5011f37ba264e4619d4d...@10.1.1.1

After that all references to the new queue entry cease, and a minute
later the process starts over again with the original queue id
appearing to get a new ID, the warning about the message being queued
(as little as 2 days and as long as 521, depending on the message).  I
never see a delivery message -- which I see plenty of for other
messages coming in in real time.


On Thu, Jan 7, 2010 at 1:10 PM, Victor Duchovni
victor.ducho...@morganstanley.com wrote:
 On Thu, Jan 07, 2010 at 12:59:45PM -0600, Wendigo Thompson wrote:

 To answer Victor, message_size_limit is so.

 This if far from a complete sentence. What is your current message size
 limit? What are the sizes of the stuck messages? What logging is
 generated by pickup (and cleanup) when pickup scans the maildrop queue?

        # postkick public pickup W

        watch the logs.

 Do you rely on Apple's OpenDirectory (and related SASL) enhancements
 to Postfix? If not, consider building and using the Postfix from
 macports.org.

 3) Postfix logs under the mail. syslog facility.  What level should I
 set to see the pickup errors you are looking for?

 Is there an option that defines a date after which messages should no
 longer be picked up?  Maybe that's something I'm missing.

 No.

 --
        Viktor.

 Disclaimer: off-list followups get on-list replies or get ignored.
 Please do not ignore the Reply-To header.

 To unsubscribe from the postfix-users list, visit
 http://www.postfix.org/lists.html or click the link below:
 mailto:majord...@postfix.org?body=unsubscribe%20postfix-users

 If my response solves your problem, the best way to thank me is to not
 send an it worked, thanks follow-up. If you must respond, please put
 It worked, thanks in the Subject so I can delete these quickly.



Re: Messages stuck in queue forever

2010-01-07 Thread Victor Duchovni
On Thu, Jan 07, 2010 at 01:25:01PM -0600, Wendigo Thompson wrote:

 Woops, I meant to say: message_size_limit is zero.
 
 I went all verbose and looking at pickup logs for the specific queue
 ID I mentioned earlier:
 Jan  7 13:16:20 se001 postfix/pickup[57270]: warning: C9EBD24E12F23:
 message has been queued for 521 days
 Jan  7 13:16:20 se001 postfix/pickup[57270]: C9EBD24E12F23: uid=27
 from= orig_id=F423E1976D72
 Jan  7 13:16:20 se001 postfix/cleanup[75242]: C9EBD24E12F23:
 message-id=11eccdf1ff78c949b5011f37ba264e4619d4d...@10.1.1.1
 
 After that all references to the new queue entry cease, and a minute
 later the process starts over again with the original queue id
 appearing to get a new ID, the warning about the message being queued
 (as little as 2 days and as long as 521, depending on the message).  I
 never see a delivery message -- which I see plenty of for other
 messages coming in in real time.

Any subsequent logging from or about process id 75242? What happens
if you also send a few messages via sendmail(1). Does the same
cleanup process handle the new and old mail? In what order?

Can you dtruss -p 57270 and report a slice of the pickup/cleanup
interaction after pickup opens the file F423E1976D72? It looks
like this message has been re-queued, it belongs to _postfix.

Can you show the envelope records (you can mask sender/recipient
addresses if you wish):

# postcat /var/spool/postfix/maildrop/F423E1976D72 |
sed -e '/^\*\*\* MESSAGE CONT/,/^\*\*\* HEADER EXTR/d'

Are there any undelivered recipients left in this queue-file?

-- 
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
mailto:majord...@postfix.org?body=unsubscribe%20postfix-users

If my response solves your problem, the best way to thank me is to not
send an it worked, thanks follow-up. If you must respond, please put
It worked, thanks in the Subject so I can delete these quickly.


Re: Messages stuck in queue forever

2010-01-07 Thread Wietse Venema
Victor Duchovni:
 On Thu, Jan 07, 2010 at 01:25:01PM -0600, Wendigo Thompson wrote:
 
  Woops, I meant to say: message_size_limit is zero.
  
  I went all verbose and looking at pickup logs for the specific queue
  ID I mentioned earlier:
  Jan  7 13:16:20 se001 postfix/pickup[57270]: warning: C9EBD24E12F23:
  message has been queued for 521 days
  Jan  7 13:16:20 se001 postfix/pickup[57270]: C9EBD24E12F23: uid=27
  from= orig_id=F423E1976D72
  Jan  7 13:16:20 se001 postfix/cleanup[75242]: C9EBD24E12F23:
  message-id=11eccdf1ff78c949b5011f37ba264e4619d4d...@10.1.1.1
  
  After that all references to the new queue entry cease, and a minute
  later the process starts over again with the original queue id
  appearing to get a new ID, the warning about the message being queued
  (as little as 2 days and as long as 521, depending on the message).  I
  never see a delivery message -- which I see plenty of for other
  messages coming in in real time.

I recall that this message has no recipient (you moved the message
with postsuper -r back to the maildrop queue).

In that case the message is in error and it should be skipped
and deleted. Since Postfix does accept mail without recipients,
this file probably triggers some anomaly somewhere.

Wietse


Re: Messages stuck in queue forever

2010-01-07 Thread Wietse Venema
Wietse Venema:
 Victor Duchovni:
  On Thu, Jan 07, 2010 at 01:25:01PM -0600, Wendigo Thompson wrote:
  
   Woops, I meant to say: message_size_limit is zero.
   
   I went all verbose and looking at pickup logs for the specific queue
   ID I mentioned earlier:
   Jan  7 13:16:20 se001 postfix/pickup[57270]: warning: C9EBD24E12F23:
   message has been queued for 521 days
   Jan  7 13:16:20 se001 postfix/pickup[57270]: C9EBD24E12F23: uid=27
   from= orig_id=F423E1976D72
   Jan  7 13:16:20 se001 postfix/cleanup[75242]: C9EBD24E12F23:
   message-id=11eccdf1ff78c949b5011f37ba264e4619d4d...@10.1.1.1
   
   After that all references to the new queue entry cease, and a minute
   later the process starts over again with the original queue id
   appearing to get a new ID, the warning about the message being queued
   (as little as 2 days and as long as 521, depending on the message).  I
   never see a delivery message -- which I see plenty of for other
   messages coming in in real time.
 
 I recall that this message has no recipient (you moved the message
 with postsuper -r back to the maildrop queue).
 
 In that case the message is in error and it should be skipped
 and deleted. Since Postfix does accept mail without recipients,
 this file probably triggers some anomaly somewhere.

This patch should deal with messages that are requeued after all
their recipients are already delivered (or bounced).

Wietse

*** ./pickup.c- Fri Apr 17 16:03:58 2009
--- ./pickup.c  Thu Jan  7 15:06:11 2010
***
*** 157,162 
--- 157,163 
  struct stat st;   /* queue file status */
  char   *path; /* name for open/remove */
  char   *sender;   /* sender address */
+ int rcpt_count;   /* todo recipients */
  } PICKUP_INFO;
  
   /*
***
*** 255,260 
--- 256,263 
if (type == REC_TYPE_RDR)
/* Discard REDIRECT record after postsuper -r. */
continue;
+   if (type == REC_TYPE_RCPT)
+   info-rcpt_count++;
}
if (*expected == REC_TYPE_EXTRACT[0]) {
if (type == REC_TYPE_RRTO)
***
*** 384,389 
--- 387,399 
return (status);
  
  /*
+  * If we found no recipients, assume that this was a requeued message
+  * that was not deleted because the queue manager was restarted.
+  */
+ if (info-rcpt_count == 0)
+   return (REMOVE_MESSAGE_FILE);
+ 
+ /*
   * There are no errors. Send the end-of-data marker, and get the cleanup
   * service completion status. XXX Since the pickup service is unable to
   * bounce, the cleanup service can report only soft errors here.
***
*** 486,491 
--- 496,502 
  info-id = 0;
  info-path = 0;
  info-sender = 0;
+ info-rcpt_count = 0;
  }
  
  /* pickup_free - wipe info structure */


Re: Messages stuck in queue forever

2010-01-07 Thread Wietse Venema
Wendigo Thompson:
 *** ENVELOPE RECORDS /var/spool/postfix/maildrop/F423E1976D72 ***
 message_size:  444129 556   1
  2  444129
 message_arrival_time: Fri Aug  1 15:23:30 2008
 create_time: Fri Aug  1 15:23:31 2008
 named_attribute: rewrite_context=remote
 sender:
 named_attribute: log_client_address=10.10.10.1
 named_attribute: log_message_origin=unknown[10.10.10.1]
 named_attribute: log_helo_name=10.10.10.10
 named_attribute: log_protocol_name=ESMTP
 named_attribute: client_name=unknown
 named_attribute: reverse_client_name=unknown
 named_attribute: client_address=10.10.10.10
 named_attribute: helo_name=10.10.10.10
 named_attribute: client_address_type=2
 named_attribute: notify_flags=1
 named_attribute: dsn_orig_rcpt=rfc822;my_delivery_mail...@my_system
 original_recipient: my_delivery_mail...@my_system
 done_recipient: my_delivery_mail...@my_system
 *** MESSAGE FILE END /var/spool/postfix/maildrop/F423E1976D72 ***

Note the done_recipient record.

This message was requeued AFTER all the recipients were delivered
(or bounced).  The pickup daemon should delete such files, because
there os nothing left to deliver. I have posted a patch in my
previous response that dels with this special case.

Wietse


Re: Messages stuck in queue forever

2010-01-07 Thread Victor Duchovni
On Thu, Jan 07, 2010 at 02:08:12PM -0600, Wendigo Thompson wrote:

 Whoooah a lot of output from dtruss (I can't even pipe it to a file)

It writes to standard error, so you incant: dtruss ... 2file.

 so I'm not sure what you want me to do with that.  The output from
 postcat is (its a little anonymized, so if the IP addresses don't look
 right that's why):
 
 *** ENVELOPE RECORDS /var/spool/postfix/maildrop/F423E1976D72 ***
 message_size:  444129 556   1
  2  444129
 message_arrival_time: Fri Aug  1 15:23:30 2008
 create_time: Fri Aug  1 15:23:31 2008
 named_attribute: rewrite_context=remote
 sender:
 named_attribute: log_client_address=10.10.10.1
 named_attribute: log_message_origin=unknown[10.10.10.1]
 named_attribute: log_helo_name=10.10.10.10
 named_attribute: log_protocol_name=ESMTP
 named_attribute: client_name=unknown
 named_attribute: reverse_client_name=unknown
 named_attribute: client_address=10.10.10.10
 named_attribute: helo_name=10.10.10.10
 named_attribute: client_address_type=2
 named_attribute: notify_flags=1
 named_attribute: dsn_orig_rcpt=rfc822;my_delivery_mail...@my_system
 original_recipient: my_delivery_mail...@my_system
 done_recipient: my_delivery_mail...@my_system
 *** MESSAGE FILE END /var/spool/postfix/maildrop/F423E1976D72 ***

Yep, this message has no recipients. Perhaps cleanup(8) does not handle
these quite as gracefully as it should. It would be nice to see
that dtruss output, as we should be able to see the cleanup protoco
response to pickup.

It is a pity that MacOSX no longer provides a usable command-line
system call tracer. dtruss(1m) is still a toy, and can only be
used by root. If anyone can point me at a better CLI for tracing
processes with DTrace, I'd appreciate the pointer. Especially
if it allows non-root users to trace system calls in their own
processes, and has reasonably complete data structure decoding
for the usual set of system calls.

-- 
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
mailto:majord...@postfix.org?body=unsubscribe%20postfix-users

If my response solves your problem, the best way to thank me is to not
send an it worked, thanks follow-up. If you must respond, please put
It worked, thanks in the Subject so I can delete these quickly.


Re: Messages stuck in queue forever

2010-01-07 Thread Wendigo Thompson
Oh!  You believe the messages were already delivered?  That is a
relief -- when I found these messages I was alarmed that my
application was missing them.  That's great news, Wietse -- thanks!

On Thu, Jan 7, 2010 at 2:14 PM, Wietse Venema wie...@porcupine.org wrote:
 Wendigo Thompson:
 *** ENVELOPE RECORDS /var/spool/postfix/maildrop/F423E1976D72 ***
 message_size:          444129             556               1
      2          444129
 message_arrival_time: Fri Aug  1 15:23:30 2008
 create_time: Fri Aug  1 15:23:31 2008
 named_attribute: rewrite_context=remote
 sender:
 named_attribute: log_client_address=10.10.10.1
 named_attribute: log_message_origin=unknown[10.10.10.1]
 named_attribute: log_helo_name=10.10.10.10
 named_attribute: log_protocol_name=ESMTP
 named_attribute: client_name=unknown
 named_attribute: reverse_client_name=unknown
 named_attribute: client_address=10.10.10.10
 named_attribute: helo_name=10.10.10.10
 named_attribute: client_address_type=2
 named_attribute: notify_flags=1
 named_attribute: dsn_orig_rcpt=rfc822;my_delivery_mail...@my_system
 original_recipient: my_delivery_mail...@my_system
 done_recipient: my_delivery_mail...@my_system
 *** MESSAGE FILE END /var/spool/postfix/maildrop/F423E1976D72 ***

 Note the done_recipient record.

 This message was requeued AFTER all the recipients were delivered
 (or bounced).  The pickup daemon should delete such files, because
 there os nothing left to deliver. I have posted a patch in my
 previous response that dels with this special case.

        Wietse



Re: Messages stuck in queue forever

2010-01-07 Thread Wietse Venema
 On Thu, Jan 7, 2010 at 2:14 PM, Wietse Venema wie...@porcupine.org wrote:
  Wendigo Thompson:
  *** ENVELOPE RECORDS /var/spool/postfix/maildrop/F423E1976D72 ***
  message_size: ? ? ? ? ?444129 ? ? ? ? ? ? 556 ? ? ? ? ? ? ? 1
  ? ? ?2 ? ? ? ? ?444129
  message_arrival_time: Fri Aug ?1 15:23:30 2008
  create_time: Fri Aug ?1 15:23:31 2008
  named_attribute: rewrite_context=remote
  sender:
  named_attribute: log_client_address=10.10.10.1
  named_attribute: log_message_origin=unknown[10.10.10.1]
  named_attribute: log_helo_name=10.10.10.10
  named_attribute: log_protocol_name=ESMTP
  named_attribute: client_name=unknown
  named_attribute: reverse_client_name=unknown
  named_attribute: client_address=10.10.10.10
  named_attribute: helo_name=10.10.10.10
  named_attribute: client_address_type=2
  named_attribute: notify_flags=1
  named_attribute: dsn_orig_rcpt=rfc822;my_delivery_mail...@my_system
  original_recipient: my_delivery_mail...@my_system
  done_recipient: my_delivery_mail...@my_system
  *** MESSAGE FILE END /var/spool/postfix/maildrop/F423E1976D72 ***
 
  Note the done_recipient record.
 
  This message was requeued AFTER all the recipients were delivered
  (or bounced). ?The pickup daemon should delete such files, because
  there os nothing left to deliver. I have posted a patch in my
  previous response that dels with this special case.

Wendigo Thompson:
 Oh!  You believe the messages were already delivered?  That is a
 relief -- when I found these messages I was alarmed that my
 application was missing them.  That's great news, Wietse -- thanks!

All the recipients are marked as done, so there is nothing to deliver. 

Most likely, the message was requeued before the queue manager
had a chance to delete it. Obviously, Postfix should handle this
case better, but that requires source code changes as posted a few
messages ago.

Wietse


Messages stuck in queue forever

2010-01-06 Thread Wendigo Thompson
Hello:

  I maintain a database of e-mail messages for my law firm client -- I
wrote an application that inserts e-mail messages into a database and
then used an alias to pipe e-mail to that application, and the clients
e-mail server forwards all mail for certain litigants to that e-mail
address.  Nominally this works great, but I've noticed an odd issue:
some messages get queued and are never released.  I'd like to force
postfix to redeliver these messages (I've tried postsuper and
postsuper -r ALL with no luck) -- does anybody have any pointers?
It's 2.4.3 on Mac OS X Server 10.5.

Sample mailq entries (one has been stuck since August, the other since Monday:
F423E1976D72   444129 Fri Aug  1 15:23:30  MAILER-DAEMON

001F224CE9559*3080 Wed Jan  6 14:51:58  MAILER-DAEMON
 msgrece...@10.188.237.22



Thanks,
Wendy


Re: Messages stuck in queue forever

2010-01-06 Thread Wietse Venema
Wendigo Thompson:
 Hello:
 
   I maintain a database of e-mail messages for my law firm client -- I
 wrote an application that inserts e-mail messages into a database and
 then used an alias to pipe e-mail to that application, and the clients
 e-mail server forwards all mail for certain litigants to that e-mail
 address.  Nominally this works great, but I've noticed an odd issue:
 some messages get queued and are never released.  I'd like to force
 postfix to redeliver these messages (I've tried postsuper and
 postsuper -r ALL with no luck) -- does anybody have any pointers?
 It's 2.4.3 on Mac OS X Server 10.5.

Beware, I don't have a Mac, and Apple has made some changes to
Postfix so I may have to refer you to the vendor if this does not
work out on the mailing list.

 Sample mailq entries (one has been stuck since August, the other since Monday:
 F423E1976D72   444129 Fri Aug  1 15:23:30  MAILER-DAEMON

This message has no recipients, and should have been removed from
the queue long ago.

Please report results of the following shell command (as root): 

find /var/spool/postfix -name F423E1976D72 -ls

(instead of /var/spool/postfix, specify the name where Apple 
stores the Postfix queue. That is the output of the command:

postconf queue_directory

)

 001F224CE9559*3080 Wed Jan  6 14:51:58  MAILER-DAEMON
  msgrece...@10.188.237.22

This message is in the active queue. Do you have any qmgr processes
running? If not, then nothing will happen with this mail. Apple
has added an automatic shutdown feature to Postfix that may get in
the way of progress.

Do you have any mail logfile information for this message? If
there is none, then that is also a problem that needs to be solved
before we can find out why these messages are not moving.

Wietse