Connexer Ltd. Masthead

Redeliver the Contents of an mbox

Revision History

Revision Date Revised by Comments
0.1 20131217 RCS Updated and improved content; added CC license
0.0 20041221 RCS Initial draft

Copyright

This article is copyright © 2004,2013 Connexer Ltd.


Licensing

Creative Commons License
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
 ! recipient@example.com

Replace recipient@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.

Articles


- Name and Email Validation: You Are Doing It Wrong - How to Ship Your Own Self-Signed Certificate Authority - Improve the Security of Your OpenPGP Key by Using Subkeys - Redeliver the Contents of an mbox - Customizing Debian Packages - Setting up a Debian Package Repository
More useful content ...

Top of Page