On 7/29/25 12:39 PM, Wietse Venema via Postfix-users wrote:
Emmett Culley via Postfix-users:
We have a web app we use to find bad email addresses after a
newsletter goes out.  We read the mail queue using postqueue -p,
the parse the output of that command to get a list of emails that
failed to successfully send.

That will only give you *SOME* of the failed addresses.

To get information about ALL delivery attempts, you MUST process
the MAIL LOG FILE.

     https://www.postfix.org/DEBUG_README.html#logging

The output of the postqueue command:

- Does not show the recipients that have an invalid address (user
   unknown) or that are over quota, etc. Those failed recipients are
   NOT kept in the queue.

- Does not show a 'reason' for a failing recipient while Postfix is
   busy trying to deliver the message to that recipient.

You really should look in the log.

        Wietse
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org
After sending this I realized I hadn't searched very hard for answers.  I just 
read the postqueue doc, and wonders of wonders I found that I didn't have to 
parse the queue and instead could get the info a JSON object.

RTFM...

I'll be rewriting that code and will do as you suggest and use the log to get 
additional information about a queued email.  I can see that I'll need to rely 
on the log for virtually all the info I need.

Thanks

Emmett
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to