Trevor Astrope writes:
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
}
Ok, read up on sendmail's -f option. There is a possible problem,
though: newer versions of sendmail will add an X-Authentication-Warning:
header with the sender's email if the sender is not a trusted user (the
T configuration line in sendmail.cf, or Ft/file/name). Older versions,
like SMI, let you get away with it (although the man pag says differently;
please correct me if I'm wrong).