I have a recipe that looks similar to:
What I'm trying to accomplish is send a copy of the message to myself at
another address while still keeping a copy in the folder called
"Someone". This works but I'd like to improve it a little. Can it be
simplified? Can the "X-Loop:" header be added easily? Thanks!
Remember: the '!' action is simply a shorthand for:
| $SENDMAIL $SENDMAILFLAGS
To stick formail into the chain, expand the shorthand, then insert
the proper formail command.
* ! ^X-Loop: bts8(_at_)netcom\(_dot_)com
| formail -A"X-Loop: bts8(_at_)netcom(_dot_)com" | \
$SENDMAIL $SENDMAILFLAGS address(_at_)otherhost(_dot_)com
Note that you don't need a locallockfile on the first recipe. Indeed,
your logfile should have several lines saying "Extraneous lockfile ignored"
or something like that.