msmtp: sendmail: account default not found: no configuration file available (system wide configuration)
Warning : My advise is based on Debian msmtp
package.
Recommended Fix: Make /etc/msmtprc
owned by group msmtp
.
chown root:msmtp /etc/msmtprc
chmod 640 /etc/msmtprc
Explanation: msmtp
binary is installed as set group (msmtp
) id
$ ls -l /usr/bin/msmtp
-rwxr-sr-x 1 root msmtp 139000 Aug 20 16:24 /usr/bin/msmtp
Related videos on Youtube
chribonn
My experience is concentrated in Executive IT Management managing global large scale projects consisting of diverse multidisciplinary teams spread geographically. I have 32 years of work experience, with 20+ years in management. I've managed companies operating in the insurance, banking, technology and education spheres raging from startups to multinationals operating in the Europe, US and North Africa.
Updated on September 18, 2022Comments
-
chribonn over 1 year
I am trying to setup Ubuntu 20.04 with msmtp as a system configuration.
I installed msmtp (v1.8.6-1) and heirloom-mailx (v12.5-2+deb7u1build0.14.04.1).
Config file /etc/msmtprc (chmod: 600) has the following:
# Set default values for all accounts. account default auth on tls on tls_trust_file /etc/ssl/certs/ca-certificates.crt logfile /var/log/msmtp # gmail host smtp.gmail.com port 587 from <account>@gmail.com user <account> password <password> # Syslog logging with facility LOG_MAIL instead of the default LOG_USER syslog LOG_MAIL
Log file /var/log/msmtp file mode is 660.
File /etc/mailrc (chmod: 600) contains the following:
set sendmail="/usr/bin/msmtp"
When I try to use sendmail to send an email from terminal I get the following sendmail: account default not found: no configuration file available.
The same error comes up if I directly invoke msmtp.
-
Jason Thrasher over 3 yearsThis works on Raspbian buster as well!
-
iHad 169 almost 3 yearschown: invalid group: ‘root:msmtp’
-
zizi0328 almost 3 yearsCheck explanation. 1) Is /usr/bin/msmtp installed as set group id? 2) Is it owned by group other than msmtp? ANYWAY: It seem to work on some version of distributions. If it does not work for your name distribution version you use and provide version of msmtp pacjage you installed.