You are hereReloading mail from a unix mail file

Reloading mail from a unix mail file

By steve - Posted on 17 July 2006

I had to replace a client's mail server that crashed. The mainboard was shot. That meant I had all the data and config files, so recovery was easy. However, I had trouble finding a way to recover unchecked mail sitting in the unix mail file format.

It turned out to be pretty simple, once I remembered the old formail command.

Mail was stored in a unix mail file format where all the mail is in one file. It is placed there by the MTA (happened to be postfix) and delivered by the pop3 daemon (happened to be dovecot).

So, I used the following to re-spool/re-send the mail in the mail file:

# formail -s sendmail <userid.mailfile

The formail command reads the file of emails (userid.mailfile in my example) and sends it using the sendmail command.


Did this help you? You can help me!

Did you find this information helpful? You can help me back by linking to this page, purchasing from my sponsors, or posting a comment!

+One me on Google:

Follow me on twitter:

Affiliation Badges