procmail
[Top] [All Lists]

Re: forwarding MIME encocded attachments

2000-02-23 13:03:15
Thanks your receipe worked great!

MAILX was simply calling mailx program on a sun; I was having problems
initially in using sendmail with -t option.  But I think it was due to me
not changing the headers to point to gcasey rather than cadadmin who was
the original receipient of the message being forwarded.

I will goto the archive and learn about MATCH; I had used the `` method
for another receipe; and just copied it :-) I'll try to improve my
filtering by using MATCH option.


On Wed, 23 Feb 2000, era eriksson wrote:

On Wed, 23 Feb 2000 12:31:57 -0500 (EST), Errol Casey
<errol(_at_)pobox(_dot_)com> wrote:
 > I have the following recipie in use to forward a copy of all mail
 > received, to another account with the subject changed to have
 > [cadamin] prepended to the subject. Problem is, if email has
 > attachments I'm just getting a message with the subject only.
 >
 > How can I modify the recipie to forward all attachments also.
 >
 > MSGSUBJECT=`/hwtools/bin/formail -zxSubject:`
 > 0 h c
 > | $MAILX -s "[cadadmin]$MSGSUBJECT" 
gcasey(_at_)somehwere(_dot_)in(_dot_)world

You're not telling us what MAILX is set to, but it is readily apparent
that you are only passing in the headers anyhow.


This is the one I have working now, Thanks!

Perhaps like this:

    :0c
    | formail -I Cc: -I Bcc: -I Resent- -I "To: 
gcasey(_at_)somewhere(_dot_)in(_dot_)world" \
        -I "Subject: [cadadmin]$MSGSUBJECT" \
      | $SENDMAIL $SENDMAILFLAGS -t

The extra Cc: and Bcc: and Resent-* voodoo is because we are using
Sendmail's -t flag, which tells it to specifically use the message's
own headers for information about where to send it. That means we
can't leave in any old recipient headers, because then we'd end up
resending the message to people who have already received it once.
(This may seem like a theoretical thing, but trust me, you will regret
it if you fail to cover this right from the start.)


<Prev in Thread] Current Thread [Next in Thread>