My words on free/open source software

Tuesday, August 14, 2007

Gmail, Fetchmail and Sendmail on UNIX/Linux

Linux Home Automation hosts a good article, Linux, Sendmail and Gmail.com on how to configure sendmail to work with Gmail. My config is a bit simpler than his (tested on Fedora Core 4, 6, Red Hat Enterprise Linux 5, CentOS 5, should work on most modern Linux distros).

My fetchmail run control file (.fetchmailrc):
 
set syslog
poll pop.gmail.com with proto POP3 and options no dns
user 'abc@gmail.com'
pass "WriteYourPasswordHere"
ssl


Modification to sendmail's mc file (/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


To generate the authinfo file used above, refer to
Linux, Sendmail and Gmail.com. It's very simple and you can done it within 3 minutes.

About Me

My photo
Santa Cruz, California, United States