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

Re: [PATCH] send-email: add --get-smtp-server option to fetch SMTP settings

From
Aditya Garg <gargaditya08@live.com>
Date
Jul 30, 2025, 15:14 UTC
Message-ID
<PN3PR01MB9597D7619BE1EA6E5630766BB824A@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>
In-Reply-To
<PN3PR01MB9597763982F1AB6B5E5806CBB825A@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>
On 29/07/25 10:40 pm, Aditya Garg wrote:
Show 24 quoted lines
> Autoconfiguring SMTP server settings is a common feature present in many
> email clients. In order to get the correct SMTP server settings easily,
> this commit adds a `--get-smtp-server` option to `git send-email`. This
> option attempts to fetch the SMTP server settings for a given email address
> via the following steps:
> 
> 1. It first tries to fetch the settings from Mozilla's ISPDB at
>    `https://autoconfig.thunderbird.net/v1.1/[domain]`.
> 
> 2. If that fails, it attempts to fetch the autoconfig file from the email
>    provider's autoconfig URL, which is typically in the format
>    `https://autoconfig.[domain]/mail/config-v1.1.xml?emailaddress=[email]`.
> 
> 3. If that also fails, it falls back to checking the MX records of the
>    domain used in the email address to find the SMTP server. It can be
>    useful in case of emails with custom domains. It attempts to guess
>    the correct domain for the email from the MX records, and repeats the
>    first 2 steps with the guessed domain.
> 
> This feature is heavily inpired by the autoconfig feature in Mozilla
> Thunderbird. A detailed documentation about how thunderbird fetches the
> autoconfig settings can be found at:
> 
> https://www.bucksch.org/1/projects/thunderbird/autoconfiguration/
It has a v2, which I didn't send as a reply to this by mistake:
https://lore.kernel.org/git/20250730151227.12389-1-gargaditya08@live.com/T/#u
Previous: Aditya Garg
Message 2 of 2 in “send-email: add --get-smtp-server option to fetch SMTP settings”
  1. send-email: add --get-smtp-server option to fetch SMTP settingsAditya Garg, Jul 29, 2025
  2. Aditya GargJul 30, 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.