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.

3 comments:

James Kalb said...

Yay! Thanks for this.

Anonymous said...

Thank you soooooooo much. The official documentation would have been killer to understand. Because of this i was able to set up my own CMS site so I can rival another one with the exact specific purpose that has a too stuck-up community (kept on deleting my content because its not good enough). My CMS will be open to everyone.

Yan Li said...

Good luck! :)

About Me

My photo
Santa Cruz, California, United States