unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Guess 'From:' when doing notmuch reply
@ 2017-09-18 17:39 Damien Cassou
  2017-09-18 19:25 ` David Bremner
  0 siblings, 1 reply; 6+ messages in thread
From: Damien Cassou @ 2017-09-18 17:39 UTC (permalink / raw)
  To: notmuch

Hi,

notmuch-always-prompt-for-sender is a variable defined in
‘notmuch-mua.el’ whose documentation is

  > Always prompt for the From: address when composing or forwarding a
  > message. This is not taken into account when replying to a message,
  > because in that case the From: header is already filled in by
  > notmuch.

Unfortunately, notmuch always got the From: field wrong when replying to
a (microsoft-exchange hosted) mailing list. The result of this is that I
always answer with the incorrect email address resulting in an error
message from the mailing list a few minutes after.

Is there anything I can do to make notmuch properly guess the From:
field?

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guess 'From:' when doing notmuch reply
  2017-09-18 17:39 Guess 'From:' when doing notmuch reply Damien Cassou
@ 2017-09-18 19:25 ` David Bremner
  2017-09-19  8:07   ` Damien Cassou
  0 siblings, 1 reply; 6+ messages in thread
From: David Bremner @ 2017-09-18 19:25 UTC (permalink / raw)
  To: Damien Cassou, notmuch

Damien Cassou <damien@cassou.me> writes:

> Hi,
>
> notmuch-always-prompt-for-sender is a variable defined in
> ‘notmuch-mua.el’ whose documentation is
>
>   > Always prompt for the From: address when composing or forwarding a
>   > message. This is not taken into account when replying to a message,
>   > because in that case the From: header is already filled in by
>   > notmuch.
>
> Unfortunately, notmuch always got the From: field wrong when replying to
> a (microsoft-exchange hosted) mailing list. The result of this is that I
> always answer with the incorrect email address resulting in an error
> message from the mailing list a few minutes after.
>
> Is there anything I can do to make notmuch properly guess the From:
> field?
>

I think we'll need more information, ideally a sample message where
notmuch-reply (on the command line) guesses the reply address
incorrectly.

d

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guess 'From:' when doing notmuch reply
  2017-09-18 19:25 ` David Bremner
@ 2017-09-19  8:07   ` Damien Cassou
  2017-09-20 11:38     ` David Bremner
  0 siblings, 1 reply; 6+ messages in thread
From: Damien Cassou @ 2017-09-19  8:07 UTC (permalink / raw)
  To: David Bremner, notmuch

> Damien Cassou <damien@cassou.me> writes:
>> Unfortunately, notmuch always got the From: field wrong when replying to
>> a (microsoft-exchange hosted) mailing list. The result of this is that I
>> always answer with the incorrect email address resulting in an error
>> message from the mailing list a few minutes after.
>>
>> Is there anything I can do to make notmuch properly guess the From:
>> field?

David Bremner <david@tethera.net> writes:
> I think we'll need more information, ideally a sample message where
> notmuch-reply (on the command line) guesses the reply address
> incorrectly.


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.

Would it be possible to guess the From: field from "Received: from
<domain>"?

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guess 'From:' when doing notmuch reply
  2017-09-19  8:07   ` Damien Cassou
@ 2017-09-20 11:38     ` David Bremner
  2017-09-20 13:03       ` Damien Cassou
  2017-09-30  6:59       ` Mark Walters
  0 siblings, 2 replies; 6+ messages in thread
From: David Bremner @ 2017-09-20 11:38 UTC (permalink / raw)
  To: Damien Cassou, notmuch

Damien Cassou <damien@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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guess 'From:' when doing notmuch reply
  2017-09-20 11:38     ` David Bremner
@ 2017-09-20 13:03       ` Damien Cassou
  2017-09-30  6:59       ` Mark Walters
  1 sibling, 0 replies; 6+ messages in thread
From: Damien Cassou @ 2017-09-20 13:03 UTC (permalink / raw)
  To: David Bremner, notmuch

David Bremner <david@tethera.net> writes:
> 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)


I'm using borg, so that's not a problem for me.


> 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


The code is great and this looks like something worth using. Thank
you. I will try it.


> There may well be better tools for message-mode.


If anyone knows anything about that, I'm all ears!

Thank you

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guess 'From:' when doing notmuch reply
  2017-09-20 11:38     ` David Bremner
  2017-09-20 13:03       ` Damien Cassou
@ 2017-09-30  6:59       ` Mark Walters
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Walters @ 2017-09-30  6:59 UTC (permalink / raw)
  To: David Bremner, Damien Cassou, notmuch


> 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

Just a thought: would it be worth including this in contrib?

Best wishes

Mark


>
> There may well be better tools for message-mode.
>
> d
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-30  6:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-18 17:39 Guess 'From:' when doing notmuch reply Damien Cassou
2017-09-18 19:25 ` David Bremner
2017-09-19  8:07   ` Damien Cassou
2017-09-20 11:38     ` David Bremner
2017-09-20 13:03       ` Damien Cassou
2017-09-30  6:59       ` Mark Walters

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).