Re: [PATCH v2] send-email: add --smtp-outlook-id-tweak option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 28, 2025, 20:47 UTC
- Message-ID
- <xmqqh628au94.fsf@gitster.g>
- In-Reply-To
- <PN3PR01MB9597D897A65B4B59BA6FA93CB8812@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>
Aditya Garg <gargaditya08@live.com> writes:
Show 9 quoted lines
> Add an option to allow users to specifically enable or disable > retrieving the Message-ID from the Outlook SMTP server. This can be used > for other hosts mimicking the behaviour of Outlook, or for users who set > a custom domain to be a CNAME for the Outlook SMTP server. > > Helped-by: Junio C Hamano <gitster@pobox.com> > Signed-off-by: Aditya Garg <gargaditya08@live.com> > --- > v2: Replace tab with spaces in "outlookidtweak" => \$outlook_id_tweak,
Good eyes ;-)
Show 10 quoted lines
> +--smtp-outlook-id-tweak=(always|never|auto):: > + Outlook servers discard the Message-ID sent via email and assign a > + new random Message-ID, thus breaking threads. > ++ > +-- > +- 'auto' will attempt to retrieve the ID from the server only if the SMTP > + server is 'smtp.office365.com' or 'smtp-mail.outlook.com'. > +- 'always' will attempt to retrieve the ID from the server irrespective of > + the SMTP server being used. Use only if Microsoft is your email provider. > +- 'never' will disable this tweak irrespective of theSMTP server being used.
It is a shame that this is not just a simple boolean. Those who expect 'true' to kick in would be disappointed to find that their 'true' means the same thing as 'auto'.
If I were designing this feature, I would rather make it say:
--[no-]outlook-message-id-fix::
Outlook servers [DO THIS]. Giving this option reads the message-id assigned by the Outlook server and use it as the In-Reply-To message ID for subsequent messages. Without the option, connections to only ... and ... automatically gets this tweak. Pass `--no-outlook-message-id-fix` to disable the fix even for these hosts.
and make the implementation behave that way.
Note that this is a command line option that is specific to git-send-email, so I omitted "smtp" from the name and instead replaced 'id' with 'message-id' to make it more explicit what gets munged.
But I do not care too deeply either way. Let me queue the patch as-is for now.
Thanks.