Print
Parent Category: Tutorials
Hits: 9379

If your ISP blocks your outgoing 25 port or you want to use google mail as smpt relay host here
is a short tutorial:
Make sure that you have sendmail installed.
Add those lines  in /etc/mail/sendmail.mc:

define(`SMART_HOST',`smtp.gmail.com:587')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
FEATURE(`authinfo',`hash -o /etc/mail/authinfo')dnl

Create file /etc/mail/authinfo and add this line:
AuthInfo:smtp.gmail.com "U:root" "I:This email address is being protected from spambots. You need JavaScript enabled to view it." "P:pass", where This email address is being protected from spambots. You need JavaScript enabled to view it.
where user is your gmail user and pass is your google email password.
After that chmod 0600 /etc/mail/authinfo then:

 

#makemap hash /etc/mail/authinfo < /etc/mail/authinfo
#m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
#/etc/init.d/sendmail restart

Note:

We use Hosting and VPS Hosting, from: www.star-host.org

We like and trust them.

Good prices, high security.