This might work for you: slurm.conf:MailProg=/usr/bin/msmtp.wrapper
$ cat /usr/bin/msmtp.wrapper #!/bin/bash mytmp=$(mktemp /tmp/slurm.email.XXXXXX) echo "From: slurm@<FQDN of cluster>" > $mytmp echo Subject: $2 >> $mytmp echo To: $3 >> $mytmp echo >> $mytmp echo $2 >> $mytmp cat $mytmp | /usr/bin/msmtp -a default $3 rm $mytmp Then in /etc/msmtprc set your domain, mailhost, auth protocol, password, from, user, etc. Something like: account do-not-reply auto_from on domain <fqdn of cluster> maildomain <fqdn of cluster> host <central mail server> auth plain from do-not-reply@<domain of mail server> user do-not-reply@<domain of mail server> password <password> tls syslog LOG_MAIL account default: do-not-reply tls_force_sslv3 tls_trust_file /etc/ssl/certs/ca-certificates.crt Be warned that this type of setup is a bit fragile. If your central mail server is down, msmtp will not retry, and I believe that email will be lost.