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

Full log


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




This bug report was last modified 1 year and 145 days ago.

Previous Next


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