all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: rameiko87@posteo.net
Cc: 68686@debbugs.gnu.org
Subject: bug#68686: [Bug] smtpmail-send-queued-mail ignores some headers of the message it's sending!
Date: Sat, 27 Jan 2024 12:25:56 +0100	[thread overview]
Message-ID: <875xzf9fwb.fsf@ledu-giraud.fr> (raw)
In-Reply-To: <7a703be21678dd05c33bf3c151bfb982@posteo.net> (rameiko's message of "Sat, 27 Jan 2024 01:09:19 +0000")

rameiko87@posteo.net writes:

> On 26.01.2024 16:37, Manuel Giraud wrote:
>> 
>>> Please do, because 29.2 is not packaged for guix, so I don't know how
>>> to install it. Otherwise I would test myself with 29.2...
>> Hi,
>> So I did the following test on 29.1 (built from source from the
>> emacs-29.1 branch):
>>       - emacs -Q
>>       - M-: (setq send-mail-function 'smtpmail-send-it
>>                   smtpmail-queue-mail t
>>                   smtpmail-smtp-server "ledu-giraud.fr")
>>       - M-: (compose-mail)
>>       [ manually change "To:" and "From:" to manuel@ledu-giraud.fr ]
>>       - C-c C-c
>>       - M-: (smtpmail-send-queued-mail)
>> And this mail is correctly delivered.  The only trace left of the
>> local
>> hostname is in "Message-ID:" which was set to
>> <87dvxoapt1.fsf@computer.mail-host-address-is-not-set>
>> So, I cannot see evidence of a bug in Emacs here.
>
> Ok I think I solved the conundrum! It has to do with the "envelope
> From", and I think the reason why you can't reproduce the error is
> because your smtp server allows envelope-from which are different from
> the From: header (and my smtp server doesn't). So you don't _see_ the
> bug. Let's keep start emacs -Q and let's set the parameters we
> discussed.
>
> For some reason, the envelope-from when sending via
> smtpmail-send-queued-mail is assigned to the value of
> user-mail-address (which for me was user@fedora) independently of the
> From: header. But with "immediate sending" this doesn't happen (I
> wonder if it's assigned to the same value as the header, or is not
> assigned at all and the smtp server assigns it? I don't know much
> about how these protocols work). In fact, if I just set a valid email
> for user-mail-address, then I get a different error, that is
> "envelope-from mismatches the From: header". Now, I could solve it by
> fiddling with
>
> '(mail-envelope-from 'header)
> '(mail-specify-envelope-from t)
>
> and at this point I can send queued email, but this is really a fishy
> business and this fact that the value assigned to envelope-from
> changes between using "immediate sending" and queued-sending I think
> is the real core of the bug.

Good.  It seems that you have tracked this issue down.  You're right
that the behaviour between "queued sending" and "immediate sending"
should not diverge here.  But on this matter it seems that there is a
lot of possible customization: for example, in message.el, there is also
'message-sendmail-envelope-from'.
-- 
Manuel Giraud





      reply	other threads:[~2024-01-27 11:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24 12:50 bug#68686: [Bug] smtpmail-send-queued-mail ignores some headers of the message it's sending! rameiko87
2024-01-24 16:01 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-24 17:25   ` rameiko87
2024-01-25  8:31     ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-25  9:58       ` rameiko87
2024-01-25 10:48         ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-26 11:21           ` rameiko87
2024-01-26 15:37             ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-27  1:09               ` rameiko87
2024-01-27 11:25                 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]

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

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

  git send-email \
    --in-reply-to=875xzf9fwb.fsf@ledu-giraud.fr \
    --to=bug-gnu-emacs@gnu.org \
    --cc=68686@debbugs.gnu.org \
    --cc=manuel@ledu-giraud.fr \
    --cc=rameiko87@posteo.net \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.