Archive for August, 2010
vim /etc/mail/sendmail.mc
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
mkdir /etc/mail/auth/
vim /etc/mail/auth/client-info (add two lines)
AuthInfo:smtp.gmail.com “U:smmsp” “I:your_gmail_account_name_here” “P:password_of_your_gmail_account” “M:PLAIN”
AuthInfo:smtp.gmail.com:587 “U:smmsp” “I:your_gmail_account_name_here” “P:password_of_your_gmail_account” “M:PLAIN”
yum install m4
m4 /etc/mail/sendmail.mc
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
cd /etc/mail/auth
makemap -r hash client-info.db < client-info
vim /root/.forward <-
add your email here
restorecon -vr /root/ (make the correct SELinux labels on .forward file)
restorecon reset /root/.ssh context system_u:object_r:ssh_home_t:s0->system_u:object_r:home_ssh_t:s0
restorecon reset /root/.ssh/known_hosts context system_u:object_r:ssh_home_t:s0->system_u:object_r:home_ssh_t:s0
restorecon reset /root/.forward context unconfined_u:object_r:admin_home_t:s0->system_u:object_r:mail_forward_t:s0
Test:
yum install logwatch
logwatch
And watch your inbox.