[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] contrib to select mail server based on From: in draft
From: |
Ken Hornstein |
Subject: |
Re: [Nmh-workers] contrib to select mail server based on From: in draft |
Date: |
Tue, 31 May 2016 13:11:33 -0400 |
>Do you have anything set up to automatically alter From addresses when
>replying? I've a hacked-up editor script that alters them according to
>various things, such as the originator or recipient address. Maybe
>there's a more nmh-y way to do that nowadays though..?
We've discussed this on the mailing list in the past, although I guess
we never sat down and spelled out the steps. But yes, I do this.
The magic is all in replcomps; basically, that needs to be modified so
the "right" header is chosen based on some criteria in the original message.
Here's part of what I use, to give you an idea:
%<{delivered-to}%<(match address@hidden)\
From: Ken Hornstein <address@hidden>
%|\
From: Ken Hornstein <address@hidden>
%>\
That means, "If the Delivered-To header matches "address@hidden", put
a From header of address@hidden, otherwise use my work address. This
assumes you have some mechanism to decide on the From header based on
the message headers, and that the mh-profile language is powerful enough
to make use of it.
--Ken