Re: [PATCH v2] send-email: add --smtp-outlook-id-tweak option
Show 34 quoted lines
> On 29 Apr 2025, at 2:17 AM, Junio C Hamano <gitster@pobox.com> wrote:
>
> Aditya Garg <gargaditya08@live.com> writes:
>
>> 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 ;-)
>
>> +--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::
I am trying to implement this feature, since a boolean makes sense.
But, I feel the parameter is too long, and will have to rewrite the whole sub usage due to this.
Show 19 quoted lines
>
> 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.