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 6FDC06DE0F42 for ; Tue, 3 Dec 2019 14:22:53 -0800 (PST) Authentication-Results: arlo.cworth.org; dkim=pass (2048-bit key; unprotected) header.d=dme-org.20150623.gappssmtp.com header.i=@dme-org.20150623.gappssmtp.com header.b="v06Cd6u1"; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.265 X-Spam-Level: X-Spam-Status: No, score=0.265 tagged_above=-999 required=5 tests=[AWL=-0.387, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_NEUTRAL=0.652, UNPARSEABLE_RELAY=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 So3q778KZbzZ for ; Tue, 3 Dec 2019 14:22:52 -0800 (PST) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by arlo.cworth.org (Postfix) with ESMTPS id 54E526DE0F3E for ; Tue, 3 Dec 2019 14:22:52 -0800 (PST) Received: by mail-wr1-f66.google.com with SMTP id b18so5899131wrj.8 for ; Tue, 03 Dec 2019 14:22:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dme-org.20150623.gappssmtp.com; s=20150623; h=to:cc:subject:in-reply-to:references:from:date:message-id :mime-version; bh=AN8FilXzYOFKu7SSBy/4aIHF/Lha82kcFA4HknS4wHY=; b=v06Cd6u18RXnu1lPvlty5M/54DJpUbM9hHBRfVk7rhRo6rKH0kBXAvm6af152WX1/1 +fwyyuxUpgEDFEQCHsS0Vtx3aUeaErVWMhCoZzocKhcEsE4nmvIUJfNg2cV0Uj4izR9r 2xJpBWPoQLX7A50/eR5lecP0iZB+KTmcFaHi3k3ME/covTt6BjC57iDaHfuvphRgaRnp srNU7QR0/sIZFrSSBP4DLT1kfp4QN/Vy4+/r5Gd4NdmW/WWVg58QMeBMbd6/t9acz/Qn lCuarnJxgOYjZigZTN8DpouLMzE4duT6hj/2rXeJiDrXqeE5N187w4w+HVAMIQlIOAUb ZpTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:subject:in-reply-to:references:from:date :message-id:mime-version; bh=AN8FilXzYOFKu7SSBy/4aIHF/Lha82kcFA4HknS4wHY=; b=IVHZ9nthGYevOgGL9sIsKhQZ84ATAMTZVVa+UYnORZ1UdUmU98rMgNgMT0jv1CtHZY DwcVdR706Z6PzPbhftwYzLcOINlVOm2Uhc9/x9P5ihcK8n5QAv6DNExPZpMA6Xr2JNOm YjYoq2L2vhVnPcy/u1nLpLYzfuOTj4X3+wYQwvtczIN8EyflNLcxSo3xCr93t3sMZGOU TNPLtcHYZTqXVoGXKnF+GJheCs/tF9RHXdOun4yCrV9ZQSCkxNG37FhAGRQBfoQrsfH5 fgIuUZJwT+Tzkm6Ykgu3A1QBqhYI7ncWbG8vy/lwrBv7RmFrDC2YrXNQHpa62kIjCuhW kcvg== X-Gm-Message-State: APjAAAWsgkzdFsWBPsuD4WO5aiXm30jB847V10BSoNeFg7qgvFVlfUph rQZFy5+32NqpWmNwXtK4n7pJUQ== X-Google-Smtp-Source: APXvYqwDzSiKPGGK4BQzVXdIlqdLw91WQMJzdx97CY2f6epw3LsNiVLCRli4FA1tvlpo+sOvOwP8HQ== X-Received: by 2002:adf:f70b:: with SMTP id r11mr383349wrp.388.1575411770477; Tue, 03 Dec 2019 14:22:50 -0800 (PST) Received: from disaster-area.hh.sledj.net (disaster-area.hh.sledj.net. [81.149.164.25]) by smtp.gmail.com with ESMTPSA id n188sm5211129wme.14.2019.12.03.14.22.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Dec 2019 14:22:49 -0800 (PST) Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 67d38aca; Tue, 3 Dec 2019 22:22:48 +0000 (UTC) To: Stefan Monnier Cc: Gregor Zattler , notmuch Subject: Re: [BUG] notmuch-emacs: spoils sendmail -f with emacs 27 commit 3a59cc84069376802ba8fd731b524d78db58262c and later In-Reply-To: References: <87wobggee4.fsf@len.workgroup> X-HGTTG: zarniwoop From: David Edmondson Date: Tue, 03 Dec 2019 22:22:48 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain 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: Tue, 03 Dec 2019 22:22:53 -0000 On Tuesday, 2019-12-03 at 15:39:47 -05, Stefan Monnier wrote: >> disaster-area ~/s/emacs % ./src/emacs -Q -nw -batch --eval "(progn (require >> 'message) (setq mail-specify-envelope-from t mail-envelope-from 'header) >> (message \"%s\" message-sendmail-envelope-from))" >> nil >> disaster-area ~/s/emacs % > > Ha! Thanks for tracking it down. > > I installed the patch below into `master` to try and avoid this problem. > > > Stefan > > > diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el > index f33454e704..e60ea4f0e8 100644 > --- a/lisp/gnus/message.el > +++ b/lisp/gnus/message.el > @@ -854,18 +854,24 @@ message-sendmail-f-is-evil > :type 'boolean) > > (defcustom message-sendmail-envelope-from > - ;; `mail-envelope-from' is unavailable unless sendmail.el is loaded. > - (if (boundp 'mail-envelope-from) mail-envelope-from) > + 'obey-mail-envelope-from > "Envelope-from when sending mail with sendmail. > If this is nil, use `user-mail-address'. If it is the symbol > `header', use the From: header of the message." > - :version "23.2" > + :version "27.1" > :type '(choice (string :tag "From name") > (const :tag "Use From: header from message" header) > + (const :tag "Obey `sendmail-envelope-from'" `sendmail-envelope-from' here should be `mail-envelope-from'. > + obey-mail-envelope-from) > (const :tag "Use `user-mail-address'" nil)) > :link '(custom-manual "(message)Mail Variables") > :group 'message-sending) > > +(defun message--sendmail-envelope-from () > + (if (eq message-sendmail-envelope-from 'obey-mail-envelope-from) > + (if (boundp 'mail-envelope-from) mail-envelope-from) > + message-sendmail-envelope-from)) > + > (defcustom message-sendmail-extra-arguments nil > "Additional arguments to `sendmail-program'." > ;; E.g. '("-a" "account") for msmtp > @@ -5884,11 +5890,11 @@ message-user-mail-address > > (defun message-sendmail-envelope-from () > "Return the envelope from." > - (cond ((eq message-sendmail-envelope-from 'header) > + (cond ((eq (message--sendmail-envelope-from) 'header) > (nth 1 (mail-extract-address-components > (message-fetch-field "from")))) > - ((stringp message-sendmail-envelope-from) > - message-sendmail-envelope-from) > + ((stringp (message--sendmail-envelope-from)) > + (message--sendmail-envelope-from)) > (t > (message-make-address)))) > > diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el > index 1c2f11680b..fea7619b50 100644 > --- a/lisp/mail/emacsbug.el > +++ b/lisp/mail/emacsbug.el > @@ -239,8 +239,8 @@ report-emacs-bug > ;; Stop message-mode stealing the properties we will add. > (set (make-local-variable 'message-strip-special-text-properties) nil) > ;; Make sure we default to the From: address as envelope when sending > - ;; through sendmail. > - (when (and (not message-sendmail-envelope-from) > + ;; through sendmail. FIXME: Why? > + (when (and (not (message--sendmail-envelope-from)) > (message-bogus-recipient-p (message-make-address))) > (set (make-local-variable 'message-sendmail-envelope-from) 'header))) > (rfc822-goto-eoh) dme. -- But are you safe Miss Gradenko?