From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 460216DE0B36 for ; Sun, 1 Dec 2019 09:11:16 -0800 (PST) Authentication-Results: arlo.cworth.org; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="hBXlvK63"; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.728 X-Spam-Level: X-Spam-Status: No, score=-0.728 tagged_above=-999 required=5 tests=[AWL=0.172, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iuB2HaAaDKRP for ; Sun, 1 Dec 2019 09:11:15 -0800 (PST) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by arlo.cworth.org (Postfix) with ESMTPS id 168AC6DE01FC for ; Sun, 1 Dec 2019 09:11:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1575220264; bh=gXgH7GEd9LhKBrwLzPNfrVYrSAeBluAgCLQ/8lVHi40=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=hBXlvK63mtIYznFsFfOmQ+mP8onSPGxlvnP7J76WI9HKpi5tqRKayOe/P+OdQn3ve J5GK1xkZuQ1tSEf+NLGQrhqhbvgFvyZetRLHZtsDiKMqiUB9XBxric3vy2MU9dTcSi JUKhFb27I4dTrqaPC9lZBPJIC4YHWAzpEGDTVQZ4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from len.workgroup ([84.185.105.239]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MiaYJ-1i6mhb3AEZ-00fhfe; Sun, 01 Dec 2019 18:11:04 +0100 From: Gregor Zattler To: notmuch Cc: Stefan Monnier Subject: [BUG] notmuch-emacs: spoils sendmail -f with emacs 27 commit 3a59cc84069376802ba8fd731b524d78db58262c and later Mail-Followup-To: notmuch , Stefan Monnier Date: Sun, 01 Dec 2019 18:10:59 +0100 Message-ID: <87wobggee4.fsf@len.workgroup> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:xKV9MwSTjT3jSIkoDwOfiXlv8Asijo8KHnR8cEaZqqOfquhWN3K barSQS7NTuACuQXFaOqv4c+Z14jsxO0q5hfwP/VWozsg2CO7mBnzQM8yAIVpb3XG31+XFSy I1VNbgaXFZpqFJRfJjeRM2tlnCcRDi/B1rf+yhTxkoa5gubcwS5uVkyTonMiEis0I92IHV/ /9nvgydPU6BAuV81x+lUQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:R+78Wavtjtc=:b9z56+gTReeR8oXjhekzwO AvPzOsp2srBLdomMtzzdFw2iGjSq0vO54X7Uu+u8l9MoyLstFuEaVbUOJLQUByXyoHtcPMhr8 ExcdQXmY/qaSqZtLyVGKbmzVKJ8yciMQL4mSKXC5c3ykCKstI2mGz9i17W/CPel9H5puonJZd Xrs0WWrTRvHh1Pfu2dqsihWFhrt6mfjeT+lDWO8bdbK0R43cGudYL2EvqBMkRqFc9cGK/Jf8x tq+azriGHQ8COCb6YMP2Li/Vjo1M79Ni3gjfTykd8X/fP4B62VctfBLDGq7Fzf3StR6cIcpnP MRfxPNgiBig5Unoi6OA1a4MLldgqYr66v37vyDiQvZb/dzCPAPuTgdoQqh8b9uz2ES8khjMF7 t67zFwWGfMUER7MM27zEsV7rx6k3mfcYpXew7M6nKbIUXbV1+KfmIyy2mZnmZvFVG/F/BdSyB tBkXr4DmSqlMkCxVGlPioUV/0lBv0dwmRWJS4Arl1TP2trkDDrXuoQPW8epskQanEsujmrpcZ KjZ/P5t1gXx496UVGyAPZmuPgKgwR+iKwQvTpuUYnlF6RhWpipL1N6ECAxKURNUuDFFoP00a8 S7742PRGX9cg5ArlINFt8kz9s9hL7yGHaLt2JuZ3NxGNMVyFql21Ibwarf3QTH8qRV2N8Chap GDyOSRFDPyS4Z1giY3nmt18zGbWTM3RanQ1XaWVZCn68nEeJo0oRAvqqdbWBILI1Zbw+aKKA5 aewWEyFirhNaH0tfWWkjNN5zYAQp5u/KG3cxcEwOAbCWn2PODX1CfaBNMVl1EaryQE9RWi7h/ FtH78dj1jkXFXNAs8NS2Q6aNjGBiUrAcDWc7Q9klFurYAQxMnVeGKNUyU5mLGjbeqg0kJM9wU uA5znoOz42ifmdxQDOAGNhJ3LwzKRPaa0HK+ON0p3ZM6SUclwspzeNsWOsHpkoLsRA/aay/oz oxj8DEPQWKaRkLpstjwHTrmZxm4y3lN/YU3vxmNPBM7v02rUSkYHy1e+pepTfkYeudt8ga3jm wO9c/dvHaVRKZGohLh7prQPlV2waF9x5pIrZZ0XRXrNQc5arVPoK/Rip01T97c6OsMx9XgTzd gShAuD08gTZDdcuPTHkuTpiFLJ4EcpWenFmPjYeeFL/l6DvZfulkucOkP5oJXB6q7CRD8KHs+ fPBQSs0ZU/LzhapsqTPBGIdvIr86GGYNQmPtbU1ny5i6VETQtgvj949i4ZVRyp7QNmjSPkj+W DMz13vEDotH12mp0KaLUvz/9XcG02YsYL+vdP4A== X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2019 17:11:16 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable [@Stefan: FYI] Dear notmuch developers, I use notmuch-emacs configured with (setq mail-specify-envelope-from t) (setq mail-envelope-from 'header) (setq send-mail-function 'sendmail-send-it) this should/used to invoke sendmail (in my case exim4) with the email address given in the From: header of the message buffer as argument to sendmails -f option. Since emacs 27 commit 3a59cc84069376802ba8fd731b524d78db58262c 3a59cc84069376802ba8fd731b524d78db58262c Author: Stefan Monnier AuthorDate: Tue Jul 30 16:37:01 2019 -0400 Commit: Stefan Monnier CommitDate: Tue Jul 30 16:37:01 2019 -0400 Parent: add146f09f * lisp/bindings.el (mode-line-defining-kbd-mac= ro): New defvar. Contained: master Follows: emacs-26.1 (6691) * lisp/gnus/message.el: Reduce redundancy with send-mail-function (message-send-mail-function) : Remove `local-library` tests for libs distributed with Emacs. (message-use-send-mail-function): New function. (message-default-send-mail-function): Default to it, and remove cases already handled by it. (message--default-send-mail-function): New function. (message-send-mail-function) : Use it as new default. (message-sendmail-f-is-evil): Obey mail-specify-envelope-from if avai= lable. (message-check, message-with-reply-buffer): Use `declare`. (message-smtpmail-send-it): smtpmail accepts mail-header-separator, so simplify and declare obsolete. (message-send-mail-with-mailclient): Declare obsolete. (message-check-news-body-syntax): Don't presume that the checksum is a fixnum. this actually invokes sendmail -f with an address derived from the EMAIL environment variable. It took me some time to understand, that there is no problem with compose-mail/message-send-and-exit which are bound to ^X m and ^C ^C respectively within a barely configured emacs which I used for testing. If instead notmuch is loaded compose-mail/message-send-and-exit and notmuch-mua-new-mail/notmuch-mua-send behave different. With this command (with test.el as attached): ~/src/emacs/src/emacs -Q -nw -l /tmp/test.el compose-mail/message-send-and-exit rightly show -f example@example.org in the file /tmp/result (and then there is an error because the notmuch commands are not known). While this command ~/src/emacs/src/emacs -Q -nw -L ~/src/notmuch/emacs/ --eval "(require 'not= much)" -f notmuch -l /tmp/test.el wrongly show some other value for -f, depending on your EMAIL environment variable, for both compose-mail/message-send-and-exit and notmuch-mua-new-mail/notmuch-mua-send. I read the code but I have no idea why and how to debug this. Ciao; Gregor =2D- -... --- .-. . -.. ..--.. ...-.- --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=test.el Content-Transfer-Encoding: quoted-printable (find-file "/tmp/sent") (insert "empty") (kill-region (point-min) (point-max)) (write-file "/tmp/sent") (kill-buffer) (find-file "/tmp/result") (kill-region (point-min) (point-max)) (write-file "/tmp/result") (kill-buffer) (find-file "/tmp/show-sendmail-args.sh") (kill-region (point-min) (point-max)) (insert "#!/bin/sh echo $* >> /tmp/result") (write-file "/tmp/show-sendmail-args.sh") (chmod "/tmp/show-sendmail-args.sh" 448) (setq sendmail-program "/tmp/show-sendmail-args.sh") (setq mail-specify-envelope-from t) (setq mail-envelope-from 'header) (setq send-mail-function 'sendmail-send-it) (compose-mail "Echo Mail Server " "test" '((From: . "example@example.org"))) (message-send-and-exit) (notmuch-mua-mail "Echo Mail Server " "test" '((From: . "example@example.org"))) (notmuch-mua-send-and-exit) (save-buffers-kill-terminal) --=-=-=--