- Sendmail, SMTP, Gmail relay on Fedora 14
su - # login as root
yum -y install sendmail-cf # install sendmail
cp /etc/mail/sendmail.mc /etc/mail/sendmail.mc.orig # make a backup
emacs /etc/mail/sendmail.mc # edit configuration
- Correct
define(`SMART_HOST',`smtp.gmail.com')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
FEATURE(`authinfo',`hash /etc/mail/auth/client-info')dnl
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')
- Save
mkdir /etc/mail/auth # a place to store credentials
emacs /etc/mail/auth/client-info # edit credentials file
AuthInfo:smtp.gmail.com "U:root" "I:- Check Openssl
makemap hash client-info < client-info
chmod 700 /etc/mail/auth
chmod 600 /etc/mail/auth/*
cd /etc/mail
make # compile configuration
service sendmail restart # read new configuration
- Send a test email.
echo 'this is a test'| mail -s test_email user@example.com
If it fails, read /var/log/maillog and /var/log/messages.