GNU bug report logs - #68685
[BUG] default From: when composing new messages ignores user-mail-address (part1) and uses message-user-fqdn (part2)!

Previous Next

Package: emacs;

Reported by: rameiko87 <at> posteo.net

Date: Wed, 24 Jan 2024 12:43:02 UTC

Severity: normal

To reply to this bug, email your comments to 68685 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#68685; Package emacs. (Wed, 24 Jan 2024 12:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to rameiko87 <at> posteo.net:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 24 Jan 2024 12:43:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: rameiko87 <at> posteo.net
To: bug-gnu-emacs <at> gnu.org
Subject: [BUG] default From: when composing new messages ignores
 user-mail-address (part1) and uses message-user-fqdn (part2)!
Date: Wed, 24 Jan 2024 12:42:13 +0000
Initial disclaimer: I use Emacs, Rmail, and Message-Mode.


Bug Part 1:

Actual behaviour:

When user-mail-address is not set and therefore defaults (at least in my 
case) to user <at> hostmachine (in my case user <at> fedora), then the default 
email address when composing a new message somehow ignores this and 
becomes user <at> message-user-fqdn, which should instead only be reserved 
for message-id's (as the description of this variable says).

Expected behaviour:

The From: header when composing new messages should default to the value 
of user-mail-address regardless to whether this later variable was 
previously customized by the user or not (in the later case defaults to 
the standard value). Note that when user-mail-address is customized by 
the user, then composing a new message rightfully defaults the From: 
header the the value of user-mail-address.


Bug Part 2:

message-user-fqdn should only used for message-ID's as the description 
of this variable prescribes. It's not the case because it intervenes in 
the From: header (see Bug Part 1 above). Is there other bits where 
message-user-fqdn intervenes except for message-ID's (and shouldn't, 
because as I said its desciption says that its value intervenes in 
message-ID's).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68685; Package emacs. (Wed, 24 Jan 2024 13:26:02 GMT) Full text and rfc822 format available.

Message #8 received at 68685 <at> debbugs.gnu.org (full text, mbox):

From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: rameiko87 <at> posteo.net
Cc: 68685 <at> debbugs.gnu.org
Subject: Re: bug#68685: [BUG] default From: when composing new messages
 ignores user-mail-address (part1) and uses message-user-fqdn (part2)!
Date: Wed, 24 Jan 2024 14:25:43 +0100
Hi again,

Ok, so I have a look at it and it seems to me that this behaviour comes
from 'message-user-mail-address' from message.el:

--8<---------------cut here---------------start------------->8---
(defun message-user-mail-address ()
  "Return the pertinent part of `user-mail-address'."
  (when (and user-mail-address
	     (string-match "@.*\\." user-mail-address))
    (if (string-search " " user-mail-address)
	(nth 1 (mail-extract-address-components user-mail-address))
      user-mail-address)))
--8<---------------cut here---------------end--------------->8---

The 'string-match' call checks that there is at least one dot in the
mail host part.  Otherwise, message will build a user mail address using
'message-user-fqdn'.

I think it is more a bug in the documentation of 'message-user-fqdn' or
'user-mail-address' because from the point of view of creating a message
to be *sent* it makes sense to require a FQDN.
-- 
Manuel Giraud




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68685; Package emacs. (Wed, 24 Jan 2024 14:11:02 GMT) Full text and rfc822 format available.

Message #11 received at 68685 <at> debbugs.gnu.org (full text, mbox):

From: rameiko87 <at> posteo.net
To: Manuel Giraud <manuel <at> ledu-giraud.fr>
Cc: 68685 <at> debbugs.gnu.org
Subject: Re: bug#68685: [BUG] default From: when composing new messages
 ignores user-mail-address (part1) and uses message-user-fqdn (part2)!
Date: Wed, 24 Jan 2024 14:09:54 +0000
> The 'string-match' call checks that there is at least one dot in the 
> mail host part.  Otherwise, message will build a user mail address 
> using 'message-user-fqdn'.

Thanks for looking into this; before I can assess what is the best way 
to solve this unexpected behaviour and how to modify the documentation, 
I would also need to know why instead the procedure which you explained 
and I am quoting as the first line of this email does not intervene when 
the message is sent after having been queued.

As for whether to modify the docs rather than the behaviour, I'm 
inclined to think that it's a possibility to allow for this automatic 
building of valid email address as long as it's documented and it 
doesn't happen while sending, but before the user can review the message 
prior to sending the email.  Which brings us back to the question in the 
paragraph above...




This bug report was last modified 100 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.