On Tue, Oct 18, 2005 at 09:39:55PM -0700, David Sun wrote:
I'm trying to put together a recipe that will take an
e-mail matching my filter criteria, replace the From:
line with another address, and forward it on to a
different address unchanged.
I put together this recipe:
:0 h c
| (formail -k -X Subject:) | $SENDMAIL
and the formail part seems to work fine from command
line but when invoked within the recipe, I do NOT get
the body of the message, only the header. Any ideas?
You have invoked the 'h' flag. The 'h' flag says,
"throw away the body and use only the head"! Get rid
of the 'h' flag.
You also probably want to guard against looping mail,
e.g., via an X-Loop header. (See man pages.)
For bonus points, I'd like to get the original From:
line (or at least the sender address) prepended to the
body so people can see where the message originally
If the body is ever MIME, this is going to be tough.
If the body is ever only text, we can do it, but I
need more coffee. :-)
Also, I get a warning in the message header when
recieved by another system. Any ideas of this will
cause messages to be dropped?
Use the -f switch with $SENDMAIL, assuming you system
supports it -- assuming that's the warning you're talking
about. "Dropped" would depend on the other system's
setup, wouldn't it? I see nothing to imply default
dropping, if I've understood you correctly about the
procmail mailing list Procmail homepage: http://www.procmail.org/