unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: "Dan Čermák" <dan.cermak@posteo.net>
To: Justus Winter <justus@sequoia-pgp.org>
Cc: notmuch@notmuchmail.org
Subject: Re: Sending mail succeeded but signaled failure
Date: Tue, 26 Jul 2022 17:18:57 +0000	[thread overview]
Message-ID: <87mtcvu70e.fsf@cgc-instruments.com> (raw)
In-Reply-To: <87k080jgx8.fsf@thinkbox>

Hi Justus,

Justus Winter <justus@sequoia-pgp.org> writes:

> Hello,
>
> I just embarrassed myself a little by sending the same mail over and
> over again.  The reason for that is that notmuch-emacs signaled failure,
> i.e. it displayed an error message in the status buffer and didn't close
> the compose buffer, yet it did in fact send the mail.
>
> I suspect that my configuration has to do with that and someone is
> trying to be helpful.  So I use msmtp with the authentication password
> encrypted using OpenPGP.  Then, I use 'gpg --no-tty -q -d ...' as
> msmtp's passwordeval function.  Now, my OpenPGP key has expired, but
> that doesn't stop GnuPG from decrypting the secret, and in fact it
> returns the status code 0.  It also prints
>
>   gpg: Note: secret key 08CC70F8D8CC765A expired at Mon 25 Jul 2022 05:31:26 PM CEST
>
> to stderr, which is picked up by notmuch-emacs, it says
>
>   sending...failed to gpg: Note: secret key 08CC70F8D8CC765A expired at Mon 25 Jul 2022 05:31:26 PM CEST
>
> in the status buffer while the compose buffer stays open.
>
> I suspect that this is not notmuch's fault, but I don't know where else
> to turn to with this bug report.

I think this is msmtp's "fault". Afaik if msmtp receives something on
stderr for the passwordeval, then it considers that a failure, however
it will still take the password and send your mail.

I have run into exactly the same problem when gpg started to print
--8<---------------cut here---------------start------------->8---
gpg: all values passed to '--default-key' ignored
--8<---------------cut here---------------end--------------->8---
stderr and msmtp took that as failure. I have "fixed" that issue by
adding a
--8<---------------cut here---------------start------------->8---
2> /dev/null
--8<---------------cut here---------------end--------------->8---
at the end of each passwordeval in ~/.msmtprc.


Hope this helps,

Dan

  parent reply	other threads:[~2022-07-26 17:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26 10:40 Sending mail succeeded but signaled failure Justus Winter
2022-07-26 14:07 ` David Bremner
2022-07-30 21:06   ` Justus Winter
2022-08-01  8:17     ` Dan Čermák
2022-08-01  9:21       ` Justus Winter
2022-07-26 17:18 ` Dan Čermák [this message]
2022-07-30 14:53   ` Justus Winter
  -- strict thread matches above, loose matches on Subject: below --
2022-07-26 10:34 Justus Winter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mtcvu70e.fsf@cgc-instruments.com \
    --to=dan.cermak@posteo.net \
    --cc=justus@sequoia-pgp.org \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).