On Mon, Nov 22, 2021 at 10:09:16AM -0600, Aaron Poffenberger wrote:
Lastly, the patch updates the documentation and changes the default message_id_format from "<%z@%f>", to "<%z@%F>" so that Message-IDs are always generated using the fqdn of the From address.
I'm against changing the default. The behavior you're describing by AT&T is insane, and I don't believe Mutt's LHS randomization is strong enough to support the from address domain by default.
diff --git a/messageid.c b/messageid.c
index e4ac4410..2ab63288 100644
--- a/messageid.c
+++ b/messageid.c
@@ -30,6 +30,7 @@ typedef struct msg_id_data
time_t now;
struct tm tm;
const char *fqdn;
+ const char *from_fqdn;
} MSG_ID_DATA;
-char *mutt_gen_msgid (void)
+char *mutt_gen_msgid (const char *from)
{
MSG_ID_DATA id_data;
BUFFER *buf, *tmp;
@@ -124,9 +129,17 @@ char *mutt_gen_msgid (void)
if (!(id_data.fqdn = mutt_fqdn(0)))
id_data.fqdn = NONULL(Hostname);
+ /* from should be a fully-formatted email address,
+ * nevertheless, handle cases where the caller
+ * sends just the fqdn or NULL. */
+ if (!from)
+ id_data.from_fqdn = id_data.fqdn;
+ else if (!(id_data.from_fqdn = strchr (from, '@') + 1))
If there is no '@' in from, it looks like id_data.from_fqdn would have value (NULL + 1).
+ id_data.from_fqdn = from; +
-- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
signature.asc
Description: PGP signature
