nmh-workers
[Top] [All Lists]

Re: sendfrom-examplefoo(_at_)gmail(_dot_)com: in ~/.mh_profile side effect -- "from:" aliases no longer expanded by send

2021-03-15 09:47:46
Yeah, that's ugly.  The problem is that post(8) expands aliases, but
sendfrom looks at From: before handing off to post.  Is there a better
fix than amending the sendfrom documentation to say that it doesn't
support a From: that contains an alias?

Yeah, I was thinking that as well.  So the complicated bit is post
expands the aliases _and_ rewrites the header (but it does that during
message submission).  The sendfrom code does not need to do that.  But
it does need to handle the -alias switch.

I had noticed recently that post expands aliases and was going to ask
about it.  Seems that send(1) would be a better place though I don't
think we want to change that now. post does some other things, too, such
as filing FCC's, that might fit better into send if we were to start
from a blank slate.

This is always a tough one, in terms of what layer should do what.  But
... maybe it's not hard to fix?  It _looks_ like to me all you need to
do is call alias() with the alias file name and then call akvalue() on
the address to expand it.  If you just do that before you do sendfrom
matching, maybe that's an easy resolution.

I am wondering that a fix for nmh right now is to just put the aliases
as sendfrom values in .mh_profile?

Ken, IIRC you use a postproc.  Does it replace post or still call it?

It just calls post; basically, it's a slightly fancy sendfrom.

--Ken

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