Redeliver the Contents of an mbox
|0.1||20131217||RCS||Updated and improved content; added CC license|
This article is copyright © 2004,2013 Connexer Ltd.
This article is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Suppose you have an mbox file and that you want to redeliver all the messages in the mbox file to a particular email address. You might do this, if for instance, you have downloaded a mailing list archive file and want to process the messages through your normal mail delivery mechanism so that filtering rules can be applied. Another application would be to send a bunch of ham or spam messages through a newly configured mail server to see if it is classifying messages appropriately.
The tool you need for this job is procmail. Once you have that, the process is very simple. You create a file, say
fwdprocmailrc that contains the following:
:0 ! firstname.lastname@example.org
email@example.com with whatever email address you want to receive all the messages in the mbox file. Once that is done, execute the following command at a shell prompt:
formail -s procmail /path/to/fwdprocmailrc < /path/to/mbox
Please let me know what you thought, whether it was useful, or if you have any suggestions for improvement.