nmh-workers
[Top] [All Lists]

[Nmh-workers] (n)mh tip of the day

2015-10-20 12:56:52
I just came up with this, and I thought it might be useful to people.

I put in my components file the following line:

%<{from}%?(getenv MH_FROM)%|%(void(localmbox))%>%(void(width))%(putaddr From: )

That lets me, in priority order, set my From: header as the following:

- The -from switch to comp(1)
- The value of the MH_FROM environment variable
- Nmh's idea of my local mailbox (configured via Local-Mailbox, or if
  that's missing taking a guess based on the local username and hostname).

I have a few shell aliases which set MH_FROM to useful values.  I find
myself juggling multiple identities more and more, and I finally got tired
of editing my From: header by hand.  That's not the only piece of the
puzzle, though ... I have a postproc which submits the email to the
'correct' SMTP server and my replcomps has a number of contortions to
choose the correct From: header (that works actually surprisingly well
in practice).

As a question to everyone else: how do others who juggle multiple email
identities make it work?

--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>