git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v5 2/3] send-email: retrieve Message-ID from outlook SMTP server

From
YZYao Zi <ziyao@disroot.org>
Date
Apr 28, 2025, 04:16 UTC
Message-ID
<aA8BAP-4VM84TRmM@pie>
In-Reply-To
<PN0PR01MB95888DC7CF57D9E8376B1985B8862@PN0PR01MB9588.INDPRD01.PROD.OUTLOOK.COM>
On Mon, Apr 28, 2025 at 01:35:32AM +0530, Aditya Garg wrote:
Show 16 quoted lines
> > Not only Outlook comes with such quirk, AFAIK the mail service that
> > Tencent provides for personal usage does as well. I don't think it's a
> > good idea to hardcode the problematic providers.
> > 
> > Not sure whether similar ideas have been proposed earlier: since this
> > quirk affects only following e-mails but not the coverletter which
> > doesn't have a In-reply-to field, is it possible to detect the quirk
> > with the response of sending the coverletter by comparing the desired
> > Message-ID and the one in response? We could throw a warning and
> > automatically fixes following mails if the bad case really happens.
> 
> From what I understand, what you want here is, that
> 
> 1. Irrespective of the email provider, I use the logic I am using for each mail.
> 2. I extract the message-id, and compare it with the intended one.
> 3. Give a warning and fix it.
Yes.
Show 13 quoted lines
> But, no. Outlook luckily shows the message ID in its response, and is there in
> $smtp->message. In fact you can see the whole server response here:
> 
> https://github.com/marlam/msmtp/issues/190#issuecomment-2794784869
> 
> Now say I use this logic with gmail. The $smtp->message in gmail is similar to
> outlook, but has 2 main differences:
> 
> 1. The angular brackets <> are missing.
> 2. There is no message id! Rather it has a random string of numbers and letters
>    that I also am not aware of what they mean.
> 
> So, different providers have different ways, to respond.

Thanks for explaining this, it's really not that simple as my first glance. With the explanation, hardcoding the provider seems pretty reasonable to me.

> What does Tencent do? Have you tried to log the SMTP messages?

Sadly no. I don't really use their services but just have seen guys hit by the same problem.

Show 21 quoted lines
> In any case I don't find any way to automatically determine this. And I certainly
> don't think we can poke into receiver's email to see what message id they got.
> 
> I also don't know how corporates work. Is the SMTP server for them the same ultimately?
> Or are they using some Azure server?
> 
> Tbh Microsoft does not like following standards with Outlook. It doesn't even support
> OAUTHBEARER which is supposed to be the standard, rather uses Google's XOAUTH2. So why
> not hardcode? Do you have any other solution?> 
> > This could avoid a broken thread for newcomers and should play well with
> > an option introduced together for specifying dedicated behaviour.
> > 
> >> thanks,
> >>
> >> greg k-h
> > 
> > Please Cc me on future updates of the series, thank you Aditya.
> > 
> > Best regards,
> > Yao Zi
> 

Thanks for the fix, Yao Zi

Previous: Aditya GargNext: Aditya Garg
Message 24 of 63 in “send-email: add oauth2 support and fix outlook breaking threads”
  1. 0/3 send-email: add oauth2 support and fix outlook breaking threadsAditya Garg, Apr 23, 2025
  2. 1/3 send-email: implement SMTP bearer authenticationAditya Garg, Apr 23, 2025
  3. Junio C HamanoApr 23, 2025
  4. Aditya GargApr 23, 2025
  5. Greg Kroah-HartmanApr 24, 2025
  6. Aditya GargApr 24, 2025
  7. 2/3 send-email: retrieve Message-ID from outlook SMTP serverAditya Garg, Apr 23, 2025
  8. Junio C HamanoApr 23, 2025
  9. brian m. carlsonApr 23, 2025
  10. Aditya GargApr 24, 2025
  11. 3/3 send-email: add option to generate passswords like OAuth2 tokensAditya Garg, Apr 23, 2025
  12. Junio C HamanoApr 23, 2025
  13. Aditya GargApr 24, 2025
  14. Junio C HamanoApr 24, 2025
  15. M HickfordApr 23, 2025
  16. Aditya GargApr 24, 2025
  17. 0/3 send-email: add oauth2 support and fix outlook breaking threadsAditya Garg, Apr 24, 2025
  18. 1/3 send-email: implement SMTP bearer authenticationAditya Garg, Apr 24, 2025
  19. Julian SwagemakersApr 24, 2025
  20. 2/3 send-email: retrieve Message-ID from outlook SMTP serverAditya Garg, Apr 24, 2025
  21. Greg Kroah-HartmanApr 24, 2025
  22. Yao ZiApr 26, 2025
  23. Aditya GargApr 27, 2025
  24. Yao ZiApr 28, 2025
  25. Aditya GargApr 27, 2025
  26. 3/3 send-email: add option to generate passswords like OAuth2 tokensAditya Garg, Apr 24, 2025
  27. Julian SwagemakersApr 24, 2025
  28. Aditya GargApr 24, 2025
  29. Junio C HamanoApr 24, 2025
  30. Aditya GargApr 24, 2025
  31. Junio C HamanoApr 24, 2025
  32. 0/1 send-email: add oauth2 support and fix outlook breaking threadsAditya Garg, Apr 25, 2025
  33. 1/1 send-email: retrieve Message-ID from outlook SMTP serverAditya Garg, Apr 25, 2025
  34. Aditya GargApr 25, 2025
  35. Erik HuelsmannApr 25, 2025
  36. Junio C HamanoApr 25, 2025
  37. Erik HuelsmannApr 25, 2025
  38. Aditya GargApr 25, 2025
  39. Junio C HamanoApr 25, 2025
  40. Aditya GargApr 25, 2025
  41. Aditya GargApr 26, 2025
  42. Eric SunshineApr 26, 2025
  43. Aditya GargApr 26, 2025
  44. Junio C HamanoApr 28, 2025
  45. send-email: add --smtp-outlook-id-tweak optionAditya Garg, Apr 28, 2025
  46. send-email: add --smtp-outlook-id-tweak optionAditya Garg, Apr 28, 2025
  47. Junio C HamanoApr 28, 2025
  48. Aditya GargApr 29, 2025
  49. send-email: add --[no-]outlook-id-fix optionAditya Garg, Apr 29, 2025
  50. Aditya GargApr 29, 2025
  51. Junio C HamanoApr 29, 2025
  52. Junio C HamanoApr 29, 2025
  53. Aditya GargApr 29, 2025
  54. send-email: add --[no-]outlook-id-fix optionAditya Garg, Apr 29, 2025
  55. Junio C HamanoApr 29, 2025
  56. Aditya GargApr 30, 2025
  57. Aditya GargApr 24, 2025
  58. Erik HuelsmannApr 24, 2025
  59. Julian SwagemakersApr 25, 2025
  60. Aditya GargApr 25, 2025
  61. Aditya GargApr 25, 2025
  62. Erik HulsmannApr 25, 2025
  63. Aditya GargApr 24, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.