all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: rameiko87@posteo.net
To: Manuel Giraud <manuel@ledu-giraud.fr>
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 01:09:19 +0000	[thread overview]
Message-ID: <7a703be21678dd05c33bf3c151bfb982@posteo.net> (raw)
In-Reply-To: <871qa4xfzy.fsf@ledu-giraud.fr>

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. Because I don't want the envelopes which I prescribed 
above to insert a header X-Authentication-Warning in my message, then I 
set '(message-sendmail-f-is-evil t), and looking at the description of 
this variable I discover it mentions bug#36937 which is very similar to 
the strange behaviour I described.

I will try to explore, with more calm and over the next few weeks, what 
is going on. But this is really a fishy business!





  reply	other threads:[~2024-01-27  1:09 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 [this message]
2024-01-27 11:25                 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=7a703be21678dd05c33bf3c151bfb982@posteo.net \
    --to=rameiko87@posteo.net \
    --cc=68686@debbugs.gnu.org \
    --cc=manuel@ledu-giraud.fr \
    /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.