procmail
[Top] [All Lists]

Re: formail -rt bug in 3.11pre7 ???

1997-10-15 13:13:29
Excerpts from mail: (15-Oct-97) Re: formail -rt bug in 3.11pre7 ???
So why is Resent-From considered higher priority? In this case the
resent-From lies in the middle. Below you see full headers of the message.

The ordering of headers in an e-mail has absolutely nothing to do with their
priority.

As you know, `formail -rt' is for composing a response to the address from
which an e-mail was sent. Let's say you are on vacation and have set up a
procmail recipe to autorespond to all e-mail you receive. Furthermore, let's
say Joe sends me an e-mail and I re-send it to you. If you wanted to respond
to the sender of the e-mail that you received, would you e-mail me or Joe?
You better e-mail me because I was the one who sent it to you. Joe may not
even know you. Imagine if you did send your response to Joe. It would
probably cause him considerable confusion as to why you are sending him
e-mail informing him that you are vacation.

`formail -rt' uses a heuristic algorithm to determine who it should respond
to, based on the presence of various headers and their contents. If you look
at the formail.c source code, you'll see a graphical representation of this
algorithm.

/*
 *      sender determination fields in order of importance/reliability
 *      reply-address determination fields (wrepl specifies the weight
 *      for regular replies, wtrepl specifies the weight for trusted users)
 *
 *      I bet this is the first time you see a bar graph in C-source-code :-)
 */
static const struct {const char*head;int len,wrepl,wtrepl;}sest[]=
{ sslbar(replyto        ,"******"       ,"********"     ),
  sslbar(Fromm          ,"*"            ,"*******"      ),
  sslbar(retreceiptto   ,"********"     ,"*****"        ),
  sslbar(sender         ,"*****"        ,"******"       ),
  sslbar(res_replyto    ,"***********"  ,"***********"  ),
  sslbar(res_from       ,"***foo***"    ,"***bar****"   ),
  sslbar(res_sender     ,"**********"   ,"*********"    ),
  sslbar(errorsto       ,"*******"      ,"****"         ),
  sslbar(path           ,"**"           ,"*"            ),
  sslbar(returnpath     ,"***"          ,"***"          ),
  sslbar(From_          ,"****"         ,"**"           )
};

This code also graphically shows the difference between the results of
`formail -r' and `formail -rt'. The bar graph on the right shows the relative
importance/reliability of header fields for determining the logical sender
for `formail -rt'. As you can see, Resent-Reply-To: has the highest relative
importance/reliability of all header fields. Next is Resent-From: and
Resent-Sender, followed by Reply-To:, From:, Sender:, et al.

Later,
Ed

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