procmail
[Top] [All Lists]

Re: Altering "From " line When Bouncing Messages

1998-03-07 12:19:33
On Fri, 6 Mar 1998, David Hunt wrote:
On Fri, 6 Mar 1998, Trevor Astrope wrote:
Hi, I'm wondering if it is possible to alter the "From " line that gets
appended to messages that my procmail recipes bounce back to the sender.
Right now, the unqualified domain name of my Linux box is sent as the
"From " line and some mail servers refuse these messages. I would like to
put my real email address there instead.

Not hard. But the method used depends on the recipe you're using,
specifically whether or not there is any 'From ' line at all in the mail
as it leaves procmail. Show us your recipe.
David Hunt

Sure. Actually, I have this problem with a few recipes I was hoping to
solve with one fix. Anyway, here goes...

The first is to use with Marek's most excellent text/html and
multipart/alternative bounce recipe:


:0 BH
* !^FROM_DAEMON
* !^X-Loop: astrope(_at_)tabbweb(_dot_)com
* ^Content.Type.+multipart.alternative
* ^Content.Type.+text.html
{
        LOG="$CRLF --TRASH: multi-part HTML content:$CRLF"
        :0
    | (formail -rtk -A"X-Mailer: Procmail Autoreply" \
    -A"X-Loop: astrope(_at_)tabbweb(_dot_)com" ; \
cat $HOME/no_HTML_please) | $SENDMAIL -oi -t
}

The "From " line that gets sent with the bounces is
astrope(_at_)gord(_dot_)tabbnet(_dot_)com and not 
astrope(_at_)tabbweb(_dot_)com(_dot_)

Ok, next is a basic autoresponder script I have set up on a machine with a
fqdn of linux.pacocorp.com which handles mail for pacocorp.com. The return
path gets set to linux.pacocorp.com which again some mail servers don't
like for some unknown reason. I tried setting a Return-Path in the recipe,
but mail still has linux.pacocorp.com in it.

:0
* ^TOsupport
*!^X-Loop: support(_at_)pacocorp(_dot_)com
|(formail -r -A "Precedence: junk"\
-I"Return-Path: <daemon(_at_)pacocorp(_dot_)com>" \
-I"From: Technical Support <support(_at_)pacocorp(_dot_)com>" \
-I"Subject: Confirmation" \
-A "X-Loop: support(_at_)pacocorp(_dot_)com";\
cat $FILEDIR/confirm.txt )|$SENDMAIL -t


Lastly, I have the same problem with the "From " line when using spamgard
on my machine. I believe Spamgard uses perl scripts to generate the
bounces, but I really haven't looked into spamgard at all. I'm just
throwing it in, in case someone else already knows the answer.

Ok, thanks for any help.

Trevor

*       Trevor Astrope         *        TABB Web Services        *
*     astrope(_at_)tabbweb(_dot_)com      *       http://www.tabbweb.com    *
*                                                                *
***              Visit my Tragically Hip web site              ***
***               The Hundredth Meridian                       ***
****              http://www.tabbweb.com/thehip/              ****