[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nmh-workers] (n)mh tip of the day
From: |
Ken Hornstein |
Subject: |
[Nmh-workers] (n)mh tip of the day |
Date: |
Tue, 20 Oct 2015 13:56:32 -0400 |
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] (n)mh tip of the day,
Ken Hornstein <=
- Re: [Nmh-workers] (n)mh tip of the day, Kevin Cosgrove, 2015/10/20
- Re: [Nmh-workers] (n)mh tip of the day, Paul Fox, 2015/10/20
- Re: [Nmh-workers] (n)mh tip of the day, Bob Carragher, 2015/10/20
- Re: [Nmh-workers] (n)mh tip of the day, Robert Elz, 2015/10/20
- Re: [Nmh-workers] (n)mh tip of the day, bergman, 2015/10/20
- Message not available
- Re: [Nmh-workers] (n)mh tip of the day, Andy Bradford, 2015/10/22