/etc/msmtprc defaults maildomain syslog LOG_MAIL aliases /etc/aliases account default host port 587 from auth on user password ******** tls on tls_starttls on #tls_certcheck off tls_fingerprint DB:A0:2A:07:00:F9:E3:23:7D:07:E7:52:3C:95:9D:E6:7E:12:54:3F Your alias file # /etc/aliases default: A php script to send mail #!/usr/bin/php <?php define('TAB',"\t"); $user = $_SERVER['LOGNAME']; $host = exec("hostname -f"); $from = $user.'@'.$host; $to = ''; $subject = 'Testing msmtp'; $message = 'hello from '. $host; $headers = 'From: '.

Send mail with sendmail

#!/bin/bash SENDMAIL=/usr/sbin/sendmail cat <<EOF | $SENDMAIL -t ${RECIPIENT} From: ${FROM} To: ${RECIPIENT} Subject: testmail some test text as body of the email. EOF

Mail Server Fingerprint

This is useful when you need the fingerprint to identify via TLS Get the raw certificate: echo Q | openssl s_client -connect Copy and paste the scribble from —–BEGIN CERTIFICATE—– to —–END CERTIFICATE—– to a file called cert.pem. Including —–BEGIN CERTIFICATE—– as first and —–END CERTIFICATE—– as last line. Generate the SHA1 fingerprint by issuing following command: openssl x509 -in cert.pem -sha1 -noout -fingerprint