10

I try to install ssmtp in Debian 10.0, but get the error

Package ssmtp is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source

But I get no result with neither apt search ssmpt nor:

$ apt-file search ssmtp
monitoring-plugins-basic: /usr/lib/nagios/plugins/check_ssmtp
sosreport: /usr/share/sosreport/sos/plugins/ssmtp.py

How do I install ssmtp in Debian buster?

rubo77
  • 27,777
  • 43
  • 130
  • 199
  • You can install it from yource, there are some old mirrors, e.g. https://github.com/ajwans/sSMTP – rubo77 Nov 23 '20 at 16:30

3 Answers3

14
apt install msmtp

ssmtp

Package is currently unmaintained

This package has been orphaned since 2019-03-19. msmtp can be used as an alternative.

debian wiki: msmtp

msmtp: documentation

manpage msmtp

GAD3R
  • 63,407
  • 31
  • 131
  • 192
10

ssmtp is currently unmaintained, but you can install and configure msmtp as well:

For gmail (with deactivated 2-factor login) use this configuration in /etc/msmtprc:

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

account gmail
host smtp.gmail.com
from <user>@gmail.com
auth on
user <user>
password <your password>

# Set a default account
account default : gmail

To test it run

echo -e "Subject: msmtp test\nhello test." | msmtp _recipient_address_

You should find your sent e-mail in the recipient's inbox shortly afterwards.

rubo77
  • 27,777
  • 43
  • 130
  • 199
2

This isn’t useful for Debian 10, but ssmtp is available in Debian 11.

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164