Kernel mailing list replies for Linux with lore, git and gmail

Sometimes it could happen the need for replying to a mail sent to a Linux kernel mailing list, but not available in your mail-box (e.g. to review a patch).

Let’s see how this can be done using the instructions provided by lore (the official kernel mailing lists archive), git send-email and a gmail account.

kernel mailing list

lore, the Linux kernel mailing list archive

First, identify the lore link of the mail you want to reply. As an example I will use one of the latest patches I’ve recently submitted: [PATCH net 1/1] net: usb: qmi_wwan: add Telit 0x1057 composition

In the page look for “Reply instructions:” to get three possible ways for replying. When using a gmail account we are going to follow the second method.

If not yet available in your system, install git send-email. For Ubuntu-based distros, this means typing:

sudo apt install git-email

Let’s analyse the git send-email command proposed in the lore page:

git send-email \
   [email protected] \
   [email protected] \
   [email protected] \
   [email protected] \
   [email protected] \
   [email protected] \
   [email protected] \
   [email protected] \
   --subject='Re: [PATCH net 1/1] net: usb: qmi_wwan: add Telit 0x1057 composition' \
   /path/to/YOUR_REPLY

The recipients switches are quite clear (–to and –cc). Then we have the reference for the message we need to be replied (–in-reply-to), the subject (–subject) and the path to a file having the actual reply (/path/to/YOUR_REPLY).

The only strict rule to be followed for the reply file is having the first line as:

Subject: <subject>

Following, the body of the message. It is highly suggested not to top-post, since interleaved style is preferred. Considering the above example, a possible file with the reply could have this content:

Subject: Re: [PATCH net 1/1] net: usb: qmi_wwan: add Telit 0x1057 composition

> Add the following Telit FN980 composition:
>
> 0x1057: tty, adb, rmnet, tty, tty, tty, tty, tty
>
> Signed-off-by: Daniele Palmas xxx@yyy.com

Reviewed-by: Mario Rossi [email protected]

Almost done: for using a gmail account a few additional switches related to the smtp configuration should be added to the git send-email command:

--smtp-encryption=tls
--smtp-server=smtp.gmail.com
[email protected]
--smtp-server-port=587

So, the final command looks like:

git send-email \
   [email protected] \
   [email protected] \
   [email protected] \
   [email protected] \
   [email protected] \
   [email protected] \
   [email protected] \
   [email protected] \
   --subject='Re: [PATCH net 1/1] net: usb: qmi_wwan: add Telit 0x1057 composition' \
   --smtp-encryption=tls
   --smtp-server=smtp.gmail.com
   --smtp-user=<username>@gmail.com
   --smtp-server-port=587
   /home/user/reply.txt

Once typed you’ll be prompted to insert a password: this needs to be created in the gmail account panel (Password for apps)

If everything is fine you should see something like:

OK. Log says:
Server: smtp.gmail.com
MAIL FROM:[email protected]
RCPT TO:[email protected]
From: Name Surname [email protected]
To: [email protected]
Subject: Re: [PATCH net 1/1] net: usb: qmi_wwan: add Telit 0x1057 composition
Date: Thu, 14 Apr 2022 16:15:00 +0200
Message-Id: [email protected]
X-Mailer: git-send-email 2.30.2
In-Reply-To: [email protected]
References: [email protected]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

Result: 250

and your mail should arrive soon to the recipients.