Guess 'From:' when doing notmuch reply
David Bremner
david at tethera.net
Wed Sep 20 04:38:26 PDT 2017
Damien Cassou <damien at cassou.me> writes:
> I'm not sure my company would let me send you even headers of the
> email. What I can tell is that my email address does not appear in the
> headers (I had a look at
> notmuch-reply.c/guess_from_in_received_headers()). I can't really blame
> notmuch for not finding it then :-). But, the domain name of my email
> address appears in many occasions:
>
> - in the Received: field (which looks like " from: <domain name here>")
>
> - in the To: field (the mailing list is hosted under the same domain)
>
> - in the From: field (the user who sent the email has an email in the
> same domain)
>
> Unfortunately, there is no Received: field with a " by " matching my
> domain.
It actually looks for " for " first.
>
> Would it be possible to guess the From: field from "Received: from
> <domain>"?
>
I'm not sure about the logic here. "Received: from foo.example.com"
means that foo.example.com is a sender for this message. It doesn't seem
to give reliable information about the receiver.
One option would be for you to customize the output of notmuch-reply in
Emacs. I think the package message-templ (unfortunately only in
marmalade, debian, and my git repo) provides tools that could help with
that. If you want to investigate it's at:
http://pivot.cs.unb.ca/git?p=message-templ.git;a=summary
There may well be better tools for message-mode.
d
More information about the notmuch
mailing list