Is it possible to use send-hook to 'edit' a header

Chris Green cl at isbd.net
Wed Nov 25 09:26:32 UTC 2020


Is there some sort of action/command I can run from send-hook that
would allow 'editing' of a header?

E.g. for the case I was recently enquiring about where groups.io munge
certain senders' addresses the requirement would be to have a
send-hook match on "via groups.io" in the From:  header and would then
change <first.name=my.domain at groups.io> to <first.name at my.domain>.

It's a fairly easy sort of search/replace but I can't see any obvious
way to implement it in mutt.

It can be done for specific From: addresses by matching the address
with a send-hook and using my_hdr to write a new From: (will that
remove the orginal From: ?).  However this would require a send-hook
for every individual address.

-- 
Chris Green


More information about the Mutt-users mailing list