ietf-mta-filters
[Top] [All Lists]

Re: Limitation of editheader

2003-05-03 14:51:29


The draft says:

,----
| 3. Action addheader
|
|    Syntax:
|     "addheader" <name: string> <value: string>
|
|    The addheader action appends a header field to the existing
|    message header.
`----

Prepending would be a better default.

It is problematic that the user cannot control where the header is
inserted.  I mentioned Received: earlier, but apparently that example
wasn't credible, so here is another, different, example.  There are
more headers that are order dependent, in case this isn't a credible
example either.

Consider the following usage:

set mydatestring ...;
set mymsgidstring ...;
if header :contains "Subject" "libidn" {
  addheader "Resent-From" "Simon Josefsson <simon(_at_)josefsson(_dot_)org>";
  addheader "Resent-Date" $mydatestring;
  addheader "Resent-Message-ID" $mymsgidstring;
  redirect "bug-libidn(_at_)gnu(_dot_)org";
}

I'm not sure I think this is legitimate usage, but in any case, I'd argue for
prepend since that's how headers are normally added.

                                Ned

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