Subject: return addresses with formail -rt vs. -r

From: [email-masked] (Stephen R. van den Berg)
Date: Wed, 21 Jul 1993 21:24:12 +0200

David Tamkin wrote:
>table of contents; for a return address you can leave the comment in.  The
>only caution is that Reply-To: should override From: (in a return address;
>for the table of contents I had to use From:), but formail can take care of
>that with the -t flag.

Formail always strips the return address down to its bare bones (i.e. all
comments will be gone).  This is independent of the headerfield it got
the return-address from.

>formail -rtx To:, as Josh Laff has already said.  Without the -t you'll get
>the contents (possibly a bang path) of the original From_ header instead of
>the From: or Reply-To: header.

Well, not quite.  As it turns out, formail v2.80 till v2.91 contain a bug.
They are using the wrong weight table when just the -r option is specified.

Starting with v2.92, the behaviour (when just -r is specified) will be
correct again; which is:
If just the -r flag is given (no -t), then formail will evaluate the
available header fields with caution.  Keeping in mind that the original
sender of the message might not be in complete control over its headers
and possibly filled in one or the other incorrectly (either on purpose,
or by accident).

If the -t option is given as well, formail assumes the sender knew what he
was doing and is a responsible person.

Which boils down to the fact that formail does indeed give the Reply-To:
field preference both with and without -t (in v2.92 it will again).

FYI, the following tables are used internally by formail:

{ sslbar(replyto        ,"******"       ,"********"     ),
  sslbar(From:          ,"*"            ,"****"         ),
  sslbar(retreceiptto   ,"********"     ,"*******"      ),
  sslbar(sender         ,"*****"        ,"******"       ),
  sslbar(res_replyto    ,"***********"  ,"***********"  ),
  sslbar(res_from       ,"***foo***"    ,"***bar***"    ),
  sslbar(res_sender     ,"**********"   ,"**********"   ),
  sslbar(errorsto       ,"*******"      ,"*****"        ),
  sslbar(path           ,"**"           ,"*"            ),
  sslbar(returnpath     ,"***"          ,"***"          ),
  sslbar(From_          ,"****"         ,"**"           )
};

The order of appearance is the weight for "formail " (to generate a missing
From_ line, ascending weights).

The first bar graph is the weight for "formail -r".
The second bar graph is the weight for "formail -rt" and/or for "formail -t".

These weights are not absolute, some amendments are being made depending on
the format of the address found by formail (.UUCP addresses, local addresses,
and addresses with just a simple hostname tacked on (i.e. joe@host vs.
[email-masked]) are depreciated).

-- 
Sincerely,                                  [email-masked]
           Stephen R. van den Berg (AKA BuGless).    [email-masked]

"I have a *cunning* plan!"