News

msmtp 1.8.15 is released

2021-03-12

This release adds support for SCRAM-SHA-256 authentication via libgsasl thanks to Simon Josefsson. It also fixes a bug with %M in the envelope from address and updates translations.

About authentication methods: Update

2021-01-27

A month ago, I questioned the value of newer authentication methods, in particular SCRAM-SHA-*, compared to simple PLAIN authentication over TLS, and concluded with "I really hope I'm wrong". Well, the good news is: I was wrong!

Here are the main points that convinced me:

These two points are enough to actually reverse my point of view completely: ideally every service should offer only SCRAM-SHA-* authentication and drop support for PLAIN and others, to enforce that these benefits become ubiquitous.

My thanks to everyone who sent me comments and helped to convince me!

Also, to clarify: with GNU SASL, msmtp and mpop support SCRAM-SHA-1 and in the next version will also support SCRAM-SHA-256.

Update 2021-01-30: This does not mean that SCRAM-SHA-* is without flaws. See this comment by Simon Josefsson, who is an expert in these matters.

About authentication methods

2020-12-28

This article asks why there are so many authentication methods when the simplest one works just fine.

There are several methods for password-based authentication with SMTP, POP3, IMAP and other protocols. The simplest one is PLAIN. It just sends user name and password, and that's it. The server side only needs to store a hash of the password, not the password itself, so it cannot be stolen from the server. The client side can store the password encrypted, so it cannot be stolen from the client either (in msmtp and mpop: use a keyring or use gpg with passwordeval). The transmission of the password is inside a TLS-secured session, so the client knows it is really talking to the right service and not to an attacker, and eavesdropping is prevented.

So, all problems are solved, right? But why then are there so many authentication methods? I have not found a convincing answer to this question yet. In the following, I will argue that even the relatively new SCRAM-SHA-256 method does not provide any practical benefit over PLAIN and is far more complex than it should be. If I am wrong, please send me a mail and correct me. I promise I will update this article with all the convincing arguments I receive.

My premise is that everyone is using TLS for every SMTP, POP3 or IMAP session nowadays, since there is no such thing as a trustworthy network.
So what benefits does SCRAM-SHA-256 promise? According to RFC 5802:

So what's left? Nothing. I really hope I'm wrong.

Update 2021-01-27: Here's the update I promised. The good news: I was wrong.

msmtp 1.8.14 is released

2020-12-23

This release adds support for the libtls library (provided by the LibreSSL project), thanks to Nihal Jere.
This is the third TLS library supported by msmtp. Use the --with-tls= option of the configure script to choose one. Here's an overview:

Furthermore, translations were updated. Thanks again to the translators at translationproject.org!

msmtp 1.8.13 is released

2020-11-13

This release add support for XOAUTH2 authentication, the predecessor of OAUTHBEARER that is still in use. The passwordeval command can now handle long inputs for these methods. Furthermore, translations were updated. Thanks again to the translators at translationproject.org!

msmtp 1.8.12 is released

2020-08-21

With this release, msmtpd supports session reuse and improves standard compliance, and automatic account matching in msmtp supports subaddresses. For example, user+detail@example.com will match account user@example.com.
Furthermore, translations were updated. Thanks again to the translators at translationproject.org!

msmtp permission denied errors: disable apparmor!

2020-08-15

If you see "permission denied" errors with msmtp, please disable AppArmor to see if this fixes the problem: sudo aa-disable /etc/apparmor.d/usr.bin.msmtp
More information: unfortunately Debian and Ubuntu provide an AppArmor profile for msmtp that frequently breaks functionality, and in ways that are very hard to debug. Until they fix that profile, I can only recommend disabling it whenever you see a "permission denied" error that has no apparent reason.
The latest example affects OAUTH2 authentication. Thanks to Github user marcelolaia for figuring this out!

msmtp 1.8.11 is released

2020-06-03

This release adds the undisclosed_recipients command that replaces all To, Cc, and Bcc headers with a single "To: undisclosed-recipients:;" header. This is useful for example if you forward system mails and your mail provider does not accept headers like "To: root" or similar.
Furthermore, portability was improved. There should be no "permission denied" errors for temporary files on Windows systems anymore.
Translations were updated. Thanks again to the translators at translationproject.org!

msmtp with oauth2 for gmail

2020-04-30

Christian Tenllado documented how to use msmtp with OAuth2 authentication for Gmail. Thanks!

msmtp 1.8.10 is released

2020-04-23

This release fixes the msmtpq script that was accidentally broken in 1.8.8.
Furthermore, internationalization files are updated and a new serbian translation is included. Thanks to the translators at translationproject.org!
Note that version 1.8.9 only partially fixed the msmtpq problem and was quickly replaced by 1.8.10.

msmtp 1.8.8 is released

2020-04-12

This version includes the folowing changes:

Furthermore, the translations were updated. Thanks to all translators at translationproject.org!

msmtp 1.8.7 is released

2019-12-24

This version extends the from command that sets the envelope from address: the patterns %U, %H, %C, %M are now replaced with user name, host name, canonicalized host name, and the contents of /etc/mailname. This is useful for system-wide installations and is more powerful than the old auto_from and maildomain commands, which are now deprecated (but still supported, of course).

msmtp 1.8.6 is released

2019-09-27

This version adds support for recursive alias expansion. Additionally, a few minor bugs were fixed.

msmtp 1.8.5 is released

2019-07-12

This version fixes OAUTHBEARER authentication, adds support for TLS client certificates via PKCS11 devices such as smart cards, and fixes a few minor bugs.

msmtp 1.8.4 is released

2019-04-24

This version adds support for the OAUTHBEARER authentication method and fixes a few minor bugs.

Support for OAUTHBEARER / XOAUTH2

2019-04-06

The git repository contains new support for the OAUTHBEARER authentication method, formerly known as XOAUTH2, a method pushed mainly by Google.
This means msmtp can now use an OAuth2 token for authentication by setting auth oauthbearer in the configuration file. The token is typically passed to msmtp via the passwordeval command since it changes regularly.
However, msmtp does not provide a way to generate such a token. This depends on your mail provider.
Since I do not use this method myself, it would be great if you could test this feature and maybe document how to generate the necessary token for your mail provider, so that I can add examples to the documentation.
Looking forward to your feedback!

Source code moved

2019-02-19

The source code moved to git.marlam.de, see the updated download instructions.
The reason is that gitlab vanished from Debian stable and there is no working upgrade path to the version in Debian backports. Sorry for the inconvenience.

msmtp 1.8.3 is released

2019-02-11

This version fixes a security problem that affects version 1.8.2 (older versions are not affected): when the new default value system for tls_trust_file is used, the result of certificate verification was not properly checked.

Update 2019-02-14: This problem has been assigned CVE-2019-8337. This is the patch that fixes it (included in version 1.8.3).

msmtp 1.8.2 is released

2019-01-12

This version simplifies configuration:

Additionally, there are several code cleanups and updates, and translations are now handled by the Translation Project. Many thanks to the translators!

msmtp 1.8.1 is released

2018-12-08

This version fixes a bug that broke TLS 1.3 support.

If you do not want to upgrade to the 1.8 series yet but you need TLS 1.3 support, you can apply this patch to msmtp version 1.6.8 or 1.4.32.

msmtp 1.8.0 is released

2018-09-04

This is the first release of the new stable release series. Noteworthy changes since 1.6.8:

msmtp 1.8.0rc1 is released

2018-08-20

This is a release candidate for the upcoming 1.8.x stable release series. The following changes were made:

Using msmtp with OpenSSL is discouraged, please use GnuTLS

2018-08-19

It is recommended to use msmtp with GnuTLS instead of OpenSSL. The upcoming version of msmtp will not use OpenSSL automatically anymore, and if you choose it manually, you will get a warning.

The reason for this is that the OpenSSL-related code in msmtp is essentially unmaintained. I don't work on it myself anymore, and the last time somebody sent a patch was 8 years ago. As a result, if you use msmtp with OpenSSL today, you don't get support for TLS SNI, --tls-priorities, --tls-crl-file, or --tls-min-dh-prime-bits.

The code is hard to read, maintain, and improve due to severe limitations in the usability and documentation of the OpenSSL API. A few examples:

Complexity is the enemy of security. I have given up on OpenSSL years ago and will not work to improve and update the OpenSSL-related code in msmtp. If someone wants to do that work, I will accept patches, but I will continue to recommend using GnuTLS instead. If the OpenSSL support in msmtp remains in its current state, it will eventually be removed.

New experimental feature: msmtpd, a minimal SMTP server

2018-08-14

There is an experimental new feature in the git repository: msmtpd, a minimal SMTP server that listens on a local interface and pipes each incoming mail to msmtp (or a different program).
It is intended to be used with system services that expect an SMTP server on the local host and cannot be configured to use the sendmail interface that msmtp provides.
If you are interested, use configure --with-msmtpd to enable it, and let us know what you think.

msmtp 1.6.8 is released

2018-06-28

New in this release:

msmtp 1.6.7 is released

2018-06-15

New in this release:

Repository mirror

2018-06-14

The main git repository at gitlab.marlam.de/marlam/msmtp is now mirrored at github.com/marlam/msmtp-mirror.

Project moved

2018-06-12

After many years, this project moved from Sourceforge to a self-hosted gitlab instance: https://gitlab.marlam.de/marlam/msmtp.

Older news are stored in the news archive.

RSS