* Q: notmuch emacs, fcc, maildir, notmuch insert and message-kill-buffer-on-exit
@ 2017-01-25 11:51 Vishal Belsare
2017-01-25 13:03 ` David Bremner
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Vishal Belsare @ 2017-01-25 11:51 UTC (permalink / raw)
To: notmuch
I have the following setup:-
* isync / mbsync to sync with Gmail's IMAP
* notmuch to index/tag/search
* notmuch emacs as the interface to notmuch
* msmtp / msmtpq to SMTP
User-Agent: Notmuch/0.23.5 (https://notmuchmail.org) Emacs/25.1.1
(x86_64-unknown-linux-gnu)
notmuch database path is '~/.mail', with '~/.mail/gmail/' being the
directory for maildir folders for the gmail
account. i.e. ~/.mail/gmail/Inbox, ~/.mail/gmail/Sent, ~/.mail/gmail/Drafts
Now while I can read, tag, and send mail from notmuch emacs, I can't
get notmuch to insert the sent messages into the local maildir 'Sent'
folder. Syncing with Gmail's IMAP, the local maildir reflects the
messages I have sent after the next sync with the IMAP server after
updating the 'Sent Mail' folder on Gmail's IMAP.
I'd rather have notmuch to insert the sent message into the local
maildir 'Sent' directory when the message is successfully
sent/queued through msmtp / msmtpq.
Another thing I cannot get to work is killing the message buffer on
successfully sending a message.
I get this message when doing 'C-c C-c' in a Notmuch Message
buffer:
"Sending via mail...
message-send-mail-with-sendmail: Sending...failed to mail for [ -oi -t
] : send was successful; "
I have tried reading notmuch-mua.el, notmuch-maildir-fcc.el,
notmuch-message.el, but I cannot figure out what I am missing.
The relevant section of my init file is below.
-------
(require 'notmuch)
;;(autoload 'notmuch "notmuch" "notmuch mail" t)
;;(setq mm-sign-option 'guided)
;;(setq mm-encrypt-option 'guided)
(setq mm-text-html-renderer 'shr)
(setq shr-color-visible-luminance-min 70)
(setq notmuch-search-oldest-first nil
notmuch-show-all-multipart/alternative-parts nil
notmuch-always-prompt-for-sender t
notmuch-fcc-dirs "gmail/Sent/ +sent -new"
notmuch-show-indent-messages-width 4
notmuch-crypto-process-mime t
notmuch-maildir-use-notmuch-insert t
notmuch-mua-compose-in 'new-frame
notmuch-mua-user-agent-function 'notmuch-mua-user-agent-full
mml-default-encrypt-method 'pgpmime
mml-default-sign-method 'pgpmime
mml-secure-openpgp-encrypt-to-self t
;;mail-user-agent 'message-user-agent
mail-specify-envelope-from 'header
mail-envelope-from 'header
mail-interactive t
sendmail-program "/usr/local/bin/msmtpq"
message-send-mail-function 'message-send-mail-with-sendmail
message-sendmail-f-is-evil t
message-sendmail-envelope-from 'header
message-kill-buffer-on-exit t
;;message-directory "gmail" ; stores postponed messages to the specified directory
message-default-mail-headers "Cc: \nBcc: \n"
message-fcc-handler-function 'message-do-fcc
message-fill-column 72
user-full-name "Vishal Belsare"
user-mail-address "myname@gmail.com"
)
-------
Keen to know what I am doing wrong and how to fix. Thanks.
--
Vishal Belsare
GPG Fingerprint: 9ACC F873 D04E CF71 11DD 4598 28FD 5DF6 BCC8 CB43
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Q: notmuch emacs, fcc, maildir, notmuch insert and message-kill-buffer-on-exit
2017-01-25 11:51 Q: notmuch emacs, fcc, maildir, notmuch insert and message-kill-buffer-on-exit Vishal Belsare
@ 2017-01-25 13:03 ` David Bremner
2017-01-25 14:49 ` Vishal Belsare
2017-01-25 13:03 ` Mark Walters
2017-01-25 13:08 ` David Bremner
2 siblings, 1 reply; 8+ messages in thread
From: David Bremner @ 2017-01-25 13:03 UTC (permalink / raw)
To: Vishal Belsare, notmuch
Vishal Belsare <vishal.belsare@gmail.com> writes:
>
> I get this message when doing 'C-c C-c' in a Notmuch Message
> buffer:
> "Sending via mail...
> message-send-mail-with-sendmail: Sending...failed to mail for [ -oi -t
> ] : send was successful; "
That looks kindof like interleaved output. Is that from *Messages* ?
d
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Q: notmuch emacs, fcc, maildir, notmuch insert and message-kill-buffer-on-exit
2017-01-25 11:51 Q: notmuch emacs, fcc, maildir, notmuch insert and message-kill-buffer-on-exit Vishal Belsare
2017-01-25 13:03 ` David Bremner
@ 2017-01-25 13:03 ` Mark Walters
2017-01-25 15:14 ` Vishal Belsare
2017-01-25 13:08 ` David Bremner
2 siblings, 1 reply; 8+ messages in thread
From: Mark Walters @ 2017-01-25 13:03 UTC (permalink / raw)
To: Vishal Belsare, notmuch
Hi
I am not sure what the full problem is (I will try and have a better
look later), but I think the main problem is that the sending mail part
is returning an error. The "Sending...failed to" is coming from emacs,
and I think the "mail for [ -oi -t > ] : send was successful; " from
msmtp/msmptq.
The insert is done after the send, so since this returns an error the
insert is never attempted.
Best wishes
Mark
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Q: notmuch emacs, fcc, maildir, notmuch insert and message-kill-buffer-on-exit
2017-01-25 11:51 Q: notmuch emacs, fcc, maildir, notmuch insert and message-kill-buffer-on-exit Vishal Belsare
2017-01-25 13:03 ` David Bremner
2017-01-25 13:03 ` Mark Walters
@ 2017-01-25 13:08 ` David Bremner
2 siblings, 0 replies; 8+ messages in thread
From: David Bremner @ 2017-01-25 13:08 UTC (permalink / raw)
To: Vishal Belsare, notmuch
Vishal Belsare <vishal.belsare@gmail.com> writes:
>
> The relevant section of my init file is below.
>
> -------
>
> (require 'notmuch)
The other (generic) suggestion is to try with a very minimal
configuration. AFAIK it should be enough to require notmuch and set
sendmail-program.
d
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Q: notmuch emacs, fcc, maildir, notmuch insert and message-kill-buffer-on-exit
2017-01-25 13:03 ` David Bremner
@ 2017-01-25 14:49 ` Vishal Belsare
0 siblings, 0 replies; 8+ messages in thread
From: Vishal Belsare @ 2017-01-25 14:49 UTC (permalink / raw)
To: notmuch
David Bremner <david@tethera.net> writes:
> Vishal Belsare <vishal.belsare@gmail.com> writes:
>
>>
>> I get this message when doing 'C-c C-c' in a Notmuch Message
>> buffer:
>> "Sending via mail...
>> message-send-mail-with-sendmail: Sending...failed to mail for [ -oi -t
>> ] : send was successful; "
>
> That looks kindof like interleaved output. Is that from *Messages* ?
Yes; straight kill-yank from *Messages*. Checked again.
Sending via mail...
message-send-mail-with-sendmail: Sending...failed to mail for [ -oi -t ] : send was successful;
David, your suggestion to minimize the init file makes sense. I did not
start out with all those customizations, but changed incrementally since I started
using notmuch emacs. However, I am returning to doing email in emacs after a long
time, so I may be missing something which might be fairly
straightforward after all.
Vishal
>
> d
--
Vishal Belsare
GPG Fingerprint: 9ACC F873 D04E CF71 11DD 4598 28FD 5DF6 BCC8 CB43
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Q: notmuch emacs, fcc, maildir, notmuch insert and message-kill-buffer-on-exit
2017-01-25 13:03 ` Mark Walters
@ 2017-01-25 15:14 ` Vishal Belsare
2017-01-25 16:04 ` Vishal Belsare
0 siblings, 1 reply; 8+ messages in thread
From: Vishal Belsare @ 2017-01-25 15:14 UTC (permalink / raw)
To: notmuch, Mark Walters
Mark Walters <markwalters1009@gmail.com> writes:
> Hi
>
> I am not sure what the full problem is (I will try and have a better
> look later), but I think the main problem is that the sending mail part
> is returning an error. The "Sending...failed to" is coming from emacs,
> and I think the "mail for [ -oi -t > ] : send was successful; " from
> msmtp/msmptq.
Could it be that because the sent messages get queued to msmtpq, it is
picked up as an 'error'?
If it might help, I can try switching to using msmtp instead of msmtpq
and see whether the fcc notmuch insert works and the message buffer is
killed.
>
> The insert is done after the send, so since this returns an error the
> insert is never attempted.
If that is the case, then perhaps both (1) the insert not happening and
(2) the message buffer not being killed after the message being sent,
are probably tied to the same underlying issue.
Vishal
>
> Best wishes
>
> Mark
>
>
--
Vishal Belsare
GPG Fingerprint: 9ACC F873 D04E CF71 11DD 4598 28FD 5DF6 BCC8 CB43
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Q: notmuch emacs, fcc, maildir, notmuch insert and message-kill-buffer-on-exit
2017-01-25 15:14 ` Vishal Belsare
@ 2017-01-25 16:04 ` Vishal Belsare
2017-01-28 2:23 ` David Bremner
0 siblings, 1 reply; 8+ messages in thread
From: Vishal Belsare @ 2017-01-25 16:04 UTC (permalink / raw)
To: notmuch, Mark Walters
Vishal Belsare <vishal.belsare@gmail.com> writes:
> Mark Walters <markwalters1009@gmail.com> writes:
>
>> Hi
>>
>> I am not sure what the full problem is (I will try and have a better
>> look later), but I think the main problem is that the sending mail part
>> is returning an error. The "Sending...failed to" is coming from emacs,
>> and I think the "mail for [ -oi -t > ] : send was successful; " from
>> msmtp/msmptq.
>
> Could it be that because the sent messages get queued to msmtpq, it is
> picked up as an 'error'?
> If it might help, I can try switching to using msmtp instead of msmtpq
> and see whether the fcc notmuch insert works and the message buffer is
> killed.
OK. So just changed the sendmail-program from msmtpq to msmtp. Both
issues disappear. That is to say, message-buffer-kill-on-exit works and
insert with 'sent' tag also happens as expected.
Now it would be wonderful if this could be made to work with msmtpq. I
think that msmtpq's return value upon successfully enqueuing the message
to send, could be read as 'success' for insert and
message-buffer-kill-on-exit to happen.
I do see problems in using something like this, i.e. if a message is
inserted into 'Sent' folder after being enqueued by msmtpq, but msmtpq
then not actually successfully sending the message. Could be nice if an
intermediate folder like 'Outbox' could be used to insert the message
enqueued by msmtp and then later moving it to 'Sent' after actually
sending it.
Vishal
>>
>> The insert is done after the send, so since this returns an error the
>> insert is never attempted.
>
> If that is the case, then perhaps both (1) the insert not happening and
> (2) the message buffer not being killed after the message being sent,
> are probably tied to the same underlying issue.
>
>
> Vishal
>>
>> Best wishes
>>
>> Mark
>>
>>
>
> --
>
> Vishal Belsare
> GPG Fingerprint: 9ACC F873 D04E CF71 11DD 4598 28FD 5DF6 BCC8 CB43
--
Vishal Belsare
GPG Fingerprint: 9ACC F873 D04E CF71 11DD 4598 28FD 5DF6 BCC8 CB43
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Q: notmuch emacs, fcc, maildir, notmuch insert and message-kill-buffer-on-exit
2017-01-25 16:04 ` Vishal Belsare
@ 2017-01-28 2:23 ` David Bremner
0 siblings, 0 replies; 8+ messages in thread
From: David Bremner @ 2017-01-28 2:23 UTC (permalink / raw)
To: Vishal Belsare, notmuch
Vishal Belsare <vishal.belsare@gmail.com> writes:
> Vishal Belsare <vishal.belsare@gmail.com> writes:
>
> Now it would be wonderful if this could be made to work with msmtpq. I
> think that msmtpq's return value upon successfully enqueuing the message
> to send, could be read as 'success' for insert and
> message-buffer-kill-on-exit to happen.
I suspect this is an upstream bug or missing feature in emacs message
mode. Perhaps there needs to be some emacs lisp specialized to msmtp(q),
or perhaps there is a more drop in replacement for sendmail. I know that
nullmailer, a roughly similar MTA provides a /usr/{sbin,lib}/sendmail
binary that does the right thing.
> I do see problems in using something like this, i.e. if a message is
> inserted into 'Sent' folder after being enqueued by msmtpq, but msmtpq
> then not actually successfully sending the message. Could be nice if an
> intermediate folder like 'Outbox' could be used to insert the message
> enqueued by msmtp and then later moving it to 'Sent' after actually
> sending it.
After it's queued, there's not really any sensible way for the emacs ui
to track it's progress. I don't know if msmtp offers some kind of hooks
to facilitate this, but one possible strategy would be to use BCC _and_
FCC, and have the BCC filed in the sent folder (or tagged equivalently).
d
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-01-28 2:23 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-25 11:51 Q: notmuch emacs, fcc, maildir, notmuch insert and message-kill-buffer-on-exit Vishal Belsare
2017-01-25 13:03 ` David Bremner
2017-01-25 14:49 ` Vishal Belsare
2017-01-25 13:03 ` Mark Walters
2017-01-25 15:14 ` Vishal Belsare
2017-01-25 16:04 ` Vishal Belsare
2017-01-28 2:23 ` David Bremner
2017-01-25 13:08 ` David Bremner
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).