Mark Shadley asked,
| This rule sends auto-replies. It works ok, but what can I do to make it
| mail a copy of the original message to ~/Mail/Shadcat ?
You don't want it to "mail" a copy there; you want it to *save* a copy there.
That should be "MAILDIR=$HOME/Mail" without a "$" at the beginning. You use
the dollar sign to interpolate the value of a variable (as with "$HOME"), not
to define one.
| * !^Subject:.*Re:
| * ^Subject:.*get-pgp-key
| | (formail -r ; cat $HOME/.pgpheader $HOME/.pgpkey) | $SENDMAIL -oi -t
| Would ">>Shadcat" at the end of the last line do it?
No. That would write the standard output of the program named in $SENDMAIL
(which usually will be no output at all) to $MAILDIR/Shadcat. This is
what you need (and I'd also recommend checking for !^FROM_DAEMON and adding
some loop detection, but those are both outside your original question):
:0c: # save a copy to $MAILDIR/Shadcat
:0A # and if it meets those same conditions, send out the files
| (formail -r ; cat $HOME/.pgpheader $HOME/.pgpkey) | $SENDMAIL -oi -t