logcheck, ssmpt Unable to locate mailhub

You want to use ssmtp to send the output of logcheck, yet see errors such as these?

sSMTP: Unable to locate mailhub
sSMTP: Cannot open mailhub:25
sSMTP: /etc/ssmtp/ssmtp.conf not found

Following the sSMTP wiki, you’ve set:

# chown root:mail /etc/ssmtp/ssmtp.conf
# chmod 640 /etc/ssmtp/ssmtp.conf

Simply add logcheck to the group mail:

usermod -a -G mail logcheck

You can run a test. As user root, do:

# su -s /bin/bash -c "/usr/sbin/logcheck" logcheck
Avatar
Gijs Hillenius
Context for Digital Government

Policy specialist on open source in public services, knowlegde transfer expert

Related