Hi, I'm using an apt-listchanges tool which extracts the Debian package changelog and NEWS files during the installation of a new version of a package. This information is sent to e-mail in apt-listchanges apt_listchanges.py script like this:
try: subprocess.run(['/usr/sbin/sendmail', '-oi', '-t'], input=message.as_bytes(), check=True) As I want to use mail/mailx with remote MTA(smtp.gmail.com) instead of sendmail and I would like to avoid modifying the apt_listchanges.py script, then I made a following simple wrapper: $ cat /usr/sbin/sendmail #!/usr/bin/env bash /usr/bin/mailx -vvv -t $ It works fine except some headers like "Auto-Submitted:" or "MIME-Version:" are unknown for mailx and ignored, but most importantly, the "Subject:" field is quoted-printable(?) encoded: READ 63 bytes <Subject: =?utf-8?q?apt-listchanges=3A_changelogs_for_vps?=> ..and Gmail shows the literal "=?utf-8?q?apt-listchanges=3A_changelogs_for_vps?=" string as an e-mail subject. Is this my mailx configuration mistake? Or the mailx itself behaves incorrectly? Or is it indeed the Gmail which does not understand, that it should decode this subject? I would happily simply override the "Subject:" header value with "-s", but I guess this is not possible because manual says that "If a message subject is specified via ‘Subject:’ then it will be used in favour of one given on the command line." thanks, Martin
