From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id bbqgJFOd5WIf6gAAbAwnHQ (envelope-from ) for ; Sat, 30 Jul 2022 23:06:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id sN6JI1Od5WLaDQEA9RJhRA (envelope-from ) for ; Sat, 30 Jul 2022 23:06:27 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6CB0044AC for ; Sat, 30 Jul 2022 23:06:27 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id C94235F387; Sat, 30 Jul 2022 21:06:24 +0000 (UTC) Received: from harrington.uberspace.de (harrington.uberspace.de [185.26.156.85]) by mail.notmuchmail.org (Postfix) with ESMTPS id 885415F026 for ; Sat, 30 Jul 2022 21:06:21 +0000 (UTC) Received: (qmail 4330 invoked by uid 500); 30 Jul 2022 21:06:21 -0000 From: Justus Winter To: David Bremner , notmuch@notmuchmail.org Subject: Re: Sending mail succeeded but signaled failure In-Reply-To: <87bktc3r2t.fsf@tethera.net> References: <87k080jgx8.fsf@thinkbox> <87bktc3r2t.fsf@tethera.net> Date: Sat, 30 Jul 2022 23:06:01 +0200 Message-ID: <87edy2ia4m.fsf@thinkbox> MIME-Version: 1.0 X-Rspamd-Bar: -- X-Rspamd-Report: MIME_GOOD(-0.1) MID_RHS_NOT_FQDN(0.5) BAYES_HAM(-2.70788) X-Rspamd-Score: -2.30788 Received: from unknown (HELO unkown) (::1) by harrington.uberspace.de (Haraka/2.8.28) with ESMTPSA; Sat, 30 Jul 2022 23:06:20 +0200 Message-ID-Hash: OKB5WFWPTBPJVA232BBYK4UMY2WW4OBD X-Message-ID-Hash: OKB5WFWPTBPJVA232BBYK4UMY2WW4OBD X-MailFrom: justus@sequoia-pgp.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1659215187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=hzkSOa3gt7uCU2j9u+91Lchmvw55yGwzOoXtwI89Z1w=; b=j0haQa7mVxeJLbYbhQbM98iuWa/fhnljcGpBZe4XBuGO6mL73VP+GIG2pEa/ZsNFLoVBNA YT0vintGApeYrJQZFLa7P661l8atZkMKQ4oAWkBbsxGhB3APFZ0IsJy9WGYRO3qc0pO1Lj 3DpMva2vPW1dUWui6xdJo44kHrNrcczQicxSpi9/n9JZWDB/QK5+8tMdJhWzKZoKhHoxnz KiPSxjSMsZfXkxn6OGx7rXk397P8O4nQM0QeqxCH0sdPd0oAvptOm9QdBVcy4TMxMPrO0K AOXVY40wfGAjoSPmLQjU/os8Oro9C5NSh9IG17wsYh1o+fGN8xy0zL+cXbWlvQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659215187; a=rsa-sha256; cv=none; b=Kkty/1EG++Yg90Ja+YfDSHaXNTx7DrlGYOr6o2BI0CZ6yM0U0FtBI5om8Z+fAz26K0bx8l lAdgMheu5xdUPta1HKOLPQIVl51Bm0kNGnCGvZEctF2op6OeTdvVELUE44Le37TAZnNQNO cyl+06W6RTEiV+4MHKsl4VZzuPfZxsKG/8FEFbkLX3ifbRTTXyJGQdjCgtxW3J0l7ukNKk 1dbKfJyQOZeK653PudxN8Z9v5V9d3UM4LsKMtCI9piZq8avCfd475hdUJ7qFmNpmQ3d0Zk dWpsRngpPc5AdtfKFetYDlFSBTbD/A9M/YQtEXOblDBuv3KN4IJ3SUkhJ6184Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -2.59 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 6CB0044AC X-Spam-Score: -2.59 X-Migadu-Scanner: scn0.migadu.com X-TUID: UN+soIHyWYCb David Bremner writes: > Justus Winter 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 guess the first step is to see if you can duplicate the problem with > plain M-x message-mode. The mechanics of sending should be identical in > notmuch-message-mode unless (surprise!) I misremember something. It does indeed happen with the plain message mode. And I think I have identified the code in emacs that turns any output, stdout and stderr, into errors: % cat -n emacs/lisp/mail/sendmail.el [...] 1343 (exit-value (apply #'call-process-region args))) 1344 (cond ((or (null exit-value) (eq 0 exit-value))) 1345 ((numberp exit-value) 1346 (setq error t) 1347 (error "Sending...failed with exit value %d" exit-value)) 1348 ((stringp exit-value) 1349 (setq error t) 1350 (error "Sending...terminated by signal: %s" exit-value)) 1351 (t 1352 (setq error t) 1353 (error "SENDMAIL-SEND-IT -- fall through: %S" exit-value)))) 1354 (or fcc-was-found 1355 (error "No recipients"))) 1356 (if mail-interactive 1357 (with-current-buffer errbuf 1358 (goto-char (point-min)) 1359 (while (re-search-forward "\n\n* *" nil t) 1360 (replace-match "; ")) 1361 (unless (zerop (buffer-size)) 1362 (setq error t) 1363 (error "Sending...failed to %s" 1364 (buffer-substring (point-min) (point-max))))))) Apparently, that behavior goes back to the initial checkin of that file. I refuse to believe that Dan and me are the only ones having problems with that in 30 years... I'll report it upstream. Best, Justus