Friday, October 7, 2016

Setting up a google account with fetchmail


These are notes on what is required to set up pop3 fetching of gmail.


su as fetchmail id.  /usr/bin/fetchmail won't run as root.

/usr/bin/fetchmail -a -k -f /etc/fetchmailrc

This will force running of all the rules in fetchmailrc

tail /var/log/mail.log will show the progress.

It wouldn't hurt to kill fetchmail with /etc/init.d/fetchmail stop

This debian doesn't support service fetchmail stop, so use the direct script to stop and start fetchmail

Verified 11/4/2014 jws

You must also log onto the gmail account, and in settings Forwarding and POP3/IMAP tab set Pop3 on.

On google mail with a newly setup account, you will get a message such as:

Review blocked sign-in attempt

 By default, Google gmail will block an attempted login to their POP3 port, even with ssl and correct credentials, till you approve the access.  There are ways to find these queries as third party applications, but the easiest way if you have control of the fetchmail demon is to just go ahead and launch the fetchmail (via /etc/init.d/fetchmail) and let it fail.

A failure AUTH should be logged in the /var/log/mail.info

If there are any problems that you want to see more information about, up the verbosity of fetchmail's messages by editing

/etc/default/fetchmail

and adding

OPTIONS="-v"

after a restart of fetchmail with /etc/init.d/fetchmail restart, the mail.info file will be full of all sorts of details.  Remember to comment this back out and restart fetchmail once problems are solved.  The increase in data in mail.info is at least 20 fold.

verified 10/7/2016 jws

***************************
setting up for imap mode fetch from gmail

http://daemonforums.org/showthread.php?t=5590



--30--

No comments:

Post a Comment