0

Our server was reconfigured and a lot of email as failed to be delivered.

I found a thread to resend email from /var/mail/root here :

https://serverfault.com/questions/90023/how-can-i-send-var-mail-root-again#=

But this command resend the bounce email.

I would like to extract the email attached to the bounce email and send it. (The original email).

Here is the command to resend the bounce email.

formail -s /usr/sbin/sendmail -oi -t < /var/mail/root

1 Answer 1

1

The Emails that you are seeing in the Systems root inbox are not the Original Emails. They are Postmaster Notifications.
You receive a Copy of the Original Email as Attachment with this Notification. But this Notification isn't an Email anymore. It is rather a Text File of what the Original Email was.
If you recent this Attachment it would get to the Destination as another Email coming from another Sender.

Actually a Script could process this Text File and build from there a new Email but it would always reach the Receiver as coming from a new Sender.

Nowadays most Email Provider do a very strictly check that would reject this rebuilt Email as Fake Email.


If your really want to extract and process the attached Email the Email Boundary might help you.

Content-Type: multipart/report; report-type=delivery-status;
    boundary="w5S0flL1016282.1530146508/mail01.server.com"
Subject: Postmaster notify: see transcript for details
Auto-Submitted: auto-generated (postmaster-notification)

This is a MIME-encapsulated message

--w5S0flL1016282.1530146508/mail01.server.com

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .