nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Applying alias file , to Reply-To: and From: components of a draft

2014-11-13 12:54:56
Did you deduce that from the source, or from the documentation?
The only documentation I can find, is the man page for mh-alias.

Well, I looked at the source for that.

It says:

  1)     Build a list of all addresses from the message to be delivered...

But what what is an "address from the message to be delivered". Certainly it
excludes strings not in a header. So, does it know what headers to look at? If
so, what are those headers. If not, then what does it do? This is probably all
obvious to you. but it's not obvious to me.

So, the "message to be delivered" is obviously the draft that's fed to
"post".  And yes, post has always read the headers for addresses; that's
how it knows where to send things.  It also has to read the From: header
so it can know what to send the SMTP envelope to.  The exact list of
headers that post knows about is:

static struct headers NHeaders[] = {
    { "Return-Path",   HBAD,                0 },
    { "Received",      HBAD,                0 },
    { "Reply-To",      HADR|HNGR,           0 },
    { "From",          HADR|HNGR,           MFRM },
    { "Sender",        HADR|HNGR|HONE,      MSND },
    { "Date",          HBAD,                0 },
    { "Subject",       HSUB,                0 },
    { "To",            HADR|HTRY,           MVIS },
    { "cc",            HADR|HTRY,           MVIS },
    { "Bcc",           HADR|HTRY|HBCC|HNIL, MINV },
    { "Dcc",           HADR|HTRY|HDCC|HNIL, MVIS },     /* sorta cc & bcc combin
ed */
    { "Message-ID",    HBAD,                0 },
    { "Fcc",           HFCC,                0 },
    { "Envelope-From", HADR|HONE|HEFM,      MEFM },
    { NULL,            0,                   0 }
};

Anything with the HADR flag is a header that has an address in it, and
those will be subject to alias expansion.  Okay, there's a longer list
that post knows about if the draft is being sent via "dist", but if you
care you can look at the source code yourself.  So the documentation was
correct, but very terse :-/

--Ken

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

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