Discussion:
Handle failed deliveries
(too old to reply)
Vlad GURDIGA
2 years ago
Permalink
Hello! 👋🙂

I want to be able to handle the failed deliveries (like the one below) in a special way, like record them into a database and display them in the UI somewhere.

What would be the most natural way to get this? 🤔

Thank you!

Here is an example failed delivery from the log:

2023-03-26T07:02:23.272898+00:00 INFO postfix/smtp[20799]: F16D317B65D: to=<***@me.com>, relay=mx01.mail.icloud.com[17.57.156.30]:25, delay=4.3, delays=0.1/0.02/0.74/3.4, dsn=5.7.1, status=bounced (host mx01.mail.icloud.com[17.57.156.30] said: 554 5.7.1 [HM08] Message rejected due to local policy. Please visit https://support.apple.com/en-us/HT204137 (in reply to end of DATA command))
Jonathan N. Little
2 years ago
Permalink
Post by Vlad GURDIGA
Hello! 👋🙂
I want to be able to handle the failed deliveries (like the one below) in a special way, like record them into a database and display them in the UI somewhere.
What would be the most natural way to get this? 🤔
Thank you!
install package pflogsumm

I created cronjobs to create a report hourly updated for today and one
for previous day. Reports are plain txt files and use PHP to parse the
reports to create web page for me to review...
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Vlad GURDIGA
2 years ago
Permalink
Thank you Jonathan. 🙂

I guess pflogsumm would work in a non-real-time context. 🤔

In my case though, I need the updates to be recorded in real-time.

I ended up using `tail -f`, and then piping it into a script that does the recording.
Loading...