I have installed Raspbian Buster with desktop on my Pi3B+ and am processing to install my apps. This is proceeding, most work allowing for newer versions, however I can't seem to send mail using ssmtp.

I installed ssmtp mailutils and configured /etc/ssmtp/revaliases and /etc/ssmtp/ssmtp.conf (as below) and ran sudo adduser pi mail

The version of ssmtp seems to be identical to that on Stretch, and I can successfully send from my Pi3A+ running Stretch, but not Buster.

I can logon to Gmail from chromium on Buster.

# sSMTP aliases
# Format:   local_account:outgoing_address:mailhub
# Example: root:[email protected]:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.
root:[email protected]:smtp.gmail.com:587
pi:[email protected]:smtp.gmail.com:587


# Config file for sSMTP sendmail
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
[email protected]

# The place where the mail goes. The actual machine name is required no 
# MX records are consulted. Commonly mailhosts are named mail.domain.com

[email protected]

# Where will the mail seem to come from?

# The full hostname

# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address

/var/log/mail.err shows

Jun 26 15:04:57 MilliwaysPi3Plus sSMTP[1932]:  (MilliwaysPi3Plus) 

and dead.letter shows the contents of the email

  • "I can't seem to send mail using ssmtp." -> So what happens? Is there an error, or does it just mysteriously not get sent?
    – goldilocks
    Commented Jun 26, 2019 at 10:20

1 Answer 1


Apparently ssmtp is deprecated in Buster

I managed to get mail working by installing msmtp and msmtp-mta

msmtp --configure [email protected] outputs a suggested configuration file.

I copied this to /etc/msmtprc to create a system default and edited to include the gmail password.

It is also necessary to add an account default

The following is a simplified system config file:-

# Set default values for all following accounts.
auth           on
tls            on
tls_trust_file /etc/ssl/certs/ca-certificates.crt

# Gmail
account gmail.com
host smtp.gmail.com
port 587

from [email protected]
user XXXXXXXX.raspberry.pi

# Default
account default : gmail.com

Mail can now be sent using msmtp in place of ssmtp

See https://wiki.archlinux.org/index.php/Msmtp

There are examples in /usr/share/doc/msmtp/examples/

  • Could you please add an example for iCloud? :)
    – PascalS
    Commented Apr 12, 2020 at 12:51
  • @PascalS Check here for iCloud settings
    – norq
    Commented Mar 23, 2022 at 21:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.