Yes it will allow this. With the command I gave you above, formail will parse the mbox file, split out the separate email messages, and pipe each message to sendmail. Sendmail gets the parameters -oem <dest-address> which will send the mails to that email address. So if you had 5 messages in your mbox file, sendmail will send 5 separate messages.
Here is what the switches do:
- +1 skip the first message in the file (usually a POP3 header)
- -d the file does not have to be in strict mbox format
- -s execute the following command for each message. in this case execute 'sendmail -oem <dest-address>'
A quick search on google found many man pages on formail. They might give some more insight into what it can do. The best way to learn is just to try it out and see.
By the way, I initially said that formail came with sendmail. That was incorrect. It comes as part of the procmail package.
- Cees
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.