From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Justus Winter Newsgroups: gmane.emacs.bugs Subject: bug#56855: 27.1; sendmail-send-it considers it an error if sendmail wrote to stdout/stderr Date: Sun, 31 Jul 2022 15:08:28 +0200 Message-ID: <87wnbtig4z.fsf@thinkbox> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40249"; mail-complaints-to="usenet@ciao.gmane.io" To: 56855@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 31 15:09:11 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oI8gx-000AH5-MM for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 31 Jul 2022 15:09:11 +0200 Original-Received: from localhost ([::1]:41614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oI8gw-0000Y7-QU for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 31 Jul 2022 09:09:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oI8go-0000Wl-M2 for bug-gnu-emacs@gnu.org; Sun, 31 Jul 2022 09:09:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46792) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oI8go-0005Ff-C7 for bug-gnu-emacs@gnu.org; Sun, 31 Jul 2022 09:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oI8go-0007Lx-3Y for bug-gnu-emacs@gnu.org; Sun, 31 Jul 2022 09:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Justus Winter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 31 Jul 2022 13:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56855 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165927293828250 (code B ref -1); Sun, 31 Jul 2022 13:09:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 31 Jul 2022 13:08:58 +0000 Original-Received: from localhost ([127.0.0.1]:36541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oI8gd-0007LT-5N for submit@debbugs.gnu.org; Sun, 31 Jul 2022 09:08:58 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:56692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oI8ga-0007LK-6c for submit@debbugs.gnu.org; Sun, 31 Jul 2022 09:08:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oI8gZ-0000C6-OR for bug-gnu-emacs@gnu.org; Sun, 31 Jul 2022 09:08:48 -0400 Original-Received: from harrington.uberspace.de ([185.26.156.85]:59556) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oI8gX-0005Dv-Rw for bug-gnu-emacs@gnu.org; Sun, 31 Jul 2022 09:08:47 -0400 Original-Received: (qmail 14611 invoked by uid 500); 31 Jul 2022 13:08:37 -0000 Authentication-Results: harrington.uberspace.de; auth=pass (plain) X-Rspamd-Bar: -- X-Rspamd-Report: MIME_GOOD(-0.1) MID_RHS_NOT_FQDN(0.5) BAYES_HAM(-2.909661) X-Rspamd-Score: -2.509661 Original-Received: from unknown (HELO unkown) (::1) by harrington.uberspace.de (Haraka/2.8.28) with ESMTPSA; Sun, 31 Jul 2022 15:08:37 +0200 Received-SPF: none client-ip=185.26.156.85; envelope-from=justus@sequoia-pgp.org; helo=harrington.uberspace.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:238341 Archived-At: sendmail-send-it considers it an error if sendmail wrote to stdout/stderr, despite the fact that the process returned success. 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 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. Note that despite this, the message has been sent successfully, while emacs indicates that the sending has failed. I wrote to the notmuch mailing list before investigating further, and at least one other person hat a similar problem. The thread is here: https://nmbug.notmuchmail.org/nmweb/show/87k080jgx8.fsf%40thinkbox I dug into emacs, and discovered that indeed sendmail-send-it considers any output from the sendmail process to be an indication of an error, even if the process returned 0. I read documentation of various sendmail implementations, and all agreed that returning success meant that the operation succeeded. I found no justification for emacs thinking that the operation failed if the process printed to stdout or stderr. Best, Justus