------- start of forwarded message (RFC 934 encapsulation) -------
From: "William J. Evans" <wje(_at_)netcom(_dot_)com>
Errors-To: nobody(_at_)netcom(_dot_)com
Reply-To: wje(_at_)acm(_dot_)org
Errors-To: nobody(_at_)netcom(_dot_)com
To: J(_dot_)Daniel(_dot_)Smith(_at_)WriteMe(_dot_)com
Subject: spamgard(tm) in effect; try again.
Date: Thu, 2 Oct 1997 03:27:38 -0700 (PDT)
} I'm sorry, your message did not go through. To send me a message
} successfully, there is a certain password that you need to place on
[...]
------- end -------
I have to concur with other recent comments about messages like this.
First, some additional heuristics should be added; for example
checking if ^TO matches a subscribed mailing list, or an
In-Reply-To:/References: header. In this particular case, I
intentionally changed the Subject: to more accurately reflect the
contents of the message. Why should I penalized for doing this?
If that isn't enough, at the very least format the bounced email as
message/rfc822. This makes it much easier for decent MUAs to resend
the message altering the Subject: line as you request. Here's some
code to do just that
-----
:0c
* !^FROM_DAEMON
* $!^X-Loop: ${UNIQUE_NAME}
* ... other conditions ...
{
MAILDIR=$HOME/mail/tmp
:0c:
tmp.$$
:0 # if $LASTFOLDER is an absolute path
* LASTFOLDER ?? ^^/
{ FILE=$LASTFOLDER }
:0E # if $LASTFOLDER is a relative path
{ FILE=$MAILDIR/$LASTFOLDER }
# If $MAILDIR is also a relative path, you'll know where to look,
# but if you insist on an absolute path in all cases, use this instead:
#:0 # if $LASTFOLDER is a relative path
#* ! FILE ?? ^^/
#{ FILE=`pwd`/$LASTFOLDER }
TRAP="rm -f $FILE"
:0fi
| formail -rt -I "Precedence: junk" -A "X-Loop: ${UNIQUE_NAME}" \
-I 'MIME-Version: 1.0' \
-I 'Content-Type: multipart/mixed; boundary="-- next item ----"' ;\
echo "This is the preamble of an RFC-2045 encoded, mixed message." ;\
echo "---- next item ----" ;\
echo "Content-Type: text/plain" ;\
echo "" ;\
echo "Your message to ${TO_LINE}" ;\
echo "about ${SUBJECT}" ;\
echo "...additional text..." ;\
echo "Thank you for your understanding and cooperation," ;\
echo " Dan" ;\
cat ${HOME}/.signature ;\
echo "---- next item ----" ;\
echo "Content-Type: message/rfc822" ;\
echo "" ;\
formail -I "From " < $FILE ;\
echo "---- next item ------"
:0
! -oi -t
}
-----
Dan
------------------- message is author's opinion only ------------------
J. Daniel Smith <DanS(_at_)bristol(_dot_)com>
http://www.bristol.com/~DanS
Bristol Technology B.V. +31 33 450 50 50, ...51 (FAX)
Amersfoort, The Netherlands {info,jobs}(_at_)bristol(_dot_)com