#995117 msmtpd: Does not work with qBittorrent in Debian Buster

Package:
msmtp
Source:
msmtp
Description:
light SMTP client with support for server profiles
Submitter:
"Solya Reka"
Date:
2021-09-26 14:03:02 UTC
Severity:
important
#995117#5
Date:
2021-09-26 14:01:18 UTC
From:
To:
Dear Maintainer,

I am trying to use msmtpd as my local smtp server. So far, I cannot get
qBittorrent to work with it.

When setup individually, qBittorrent can send mail through both exim4
and opensmtpd, and msmtp are able to work together with apt-listchanges,
or test emails via sendmail command.

However, when configure qBittorrent to send via msmtpd, it doesn't
produce any results.

qBittorrent's log didn't record anything, dispite it should log errors
if
something goes wrong during the SMTP session.

```
(N) TIMESTAMP - 'Totally legit torrent' added to download list.
(N) TIMESTAMP - Torrent: Totally legit torrent, sending mail
notification
```

And there is no new entry in smtp's log.

When attempt to produce a mail dump using `--command`, it appears that
msmtpd didn't receive anything, as there is no contents piped to command
line.

I cannot reproduce this problem a Debian 11 Bullseye VM (amd64), with
msmtp version 1.8.11 it just works as expected. I can get mail dumped as
following:

```
$ cat maildump
mail@example.com
Date: Sun, 26 Sep 2021
From: qBittorrent_notification@service.example.com
Subject: [qBittorrent] 'Totally legit torrent' has finished downloading
To: mail@example.com
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: base64

VG9ycmVudCBuYW1lOiBUb3RhbGx5IGxlZ2l0IHRvcnJlbnQKVG9ycmVudCBzaXplOiA4LjYgTWlCClNhdmUgcGF0aDogL2hvbWUvdXNlci9Eb3dubG9hZHMvCgpUaGUgdG9ycmVudCB3YXMgZG93bmxvYWRlZCBpbiA8IDFtLgoKClRoYW5rIHlvdSBmb3IgdXNpbmcgcUJpdHRvcnJlbnQuCg==
```

However, this problem will occur in a Debian 10 Buster VM, with
qBittorrent 4.1.5-1+deb10u1 from official repo (though qBittorrent
version doesn't matter here, as it all failed including unofficial
builds). Upgrade msmtp to Version 1.8.11-2~bpo10+1 from buster-backports
WILL NOT fix this issue.

I have also raised this issue in upstream, more details and discussions
are available here: https://github.com/marlam/msmtp-mirror/issues/59

Regards
Reka