How to Configure fetchmail to fetch gmail mails ?

967 views
Skip to first unread message

Pankaj Pratap Singh

unread,
Feb 23, 2010, 6:49:54 AM2/23/10
to opensourc...@googlegroups.com, fosteri...@googlegroups.com
Hi All,

How to configure fetchmailrc to get gmail mail in local account.

can any one give me, .fetchmailrc file for gmail (POP & IMAP Both)



--
Thanks & Regards

Pankaj Pratap Singh
BlogSpot:-  http://pankajpratap.blogspot.com/
Profile :-  http://www.linkedin.com/in/pankajpratapsingh
Website :- http://www.pankajpratap.com

           " If your success is not on your own terms, if it looks good to the world but does not feel good in your heart, it is not success at all. "

Pankaj Pratap Singh

unread,
Mar 2, 2010, 5:44:20 AM3/2/10
to opensourc...@googlegroups.com, fosteri...@googlegroups.com
Hi Guys,

please help me on this ?

Ashutosh

unread,
Mar 2, 2010, 5:54:50 AM3/2/10
to opensourc...@googlegroups.com, fosteri...@googlegroups.com
Hi,

Simple to do ->

i) Create a .fetchmailrc file in /root folder with below lines :

set postmaster "root"
set logfile /var/log/fetchmail.log

poll pop.gmail.com with proto POP3
    user 'he...@gmail.com' there with password 'aries@123' is he...@gmail.com here options keep ssl sslfingerprint '44:A8:E9:2C:FB:A9:7E:6D:F9:DB:F3:62:B2:9E:F1:A9' sslcertck sslcertpath /home/gmail-certs


Note :- Change he...@gmail.com username and its password with your account and password.


ii) Then, execute this command -> "openssl s_client -host www.gmail.com -port 443". You will get Gmail certificate in middle of "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" lines. Then copy and paste that certificate into file with extension .(dot)pem with BEGIN and END texts and place that file into /home/gmail-certs folder ( you need to create /home/gmail-certs folder ).


iii) Finally execute fetchmail command and your fetchmail will work,,,,,


Please let us know the results.

 
--
Regards

Ashutosh



--
You received this message because you are subscribed to the Google Groups "Opensource Projects" group.
To post to this group, send an email to opensourc...@googlegroups.com.
To unsubscribe from this group, send email to opensource-proj...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/opensource-projects?hl=en-GB.

Pankaj Pratap Singh

unread,
Mar 2, 2010, 6:04:43 AM3/2/10
to opensourc...@googlegroups.com, fosteri...@googlegroups.com
Hi,

SSL fingerprint need to check and change, or use given sslfingerprint only ?


sslfingerprint '44:A8:E9:2C:FB:A9:7E:6D:F9:
DB:F3:62:B2:9E:F1:A9'


Ashutosh

unread,
Mar 2, 2010, 6:06:32 AM3/2/10
to opensourc...@googlegroups.com
No need to change,,,

--
Regards

Ashutosh


Pankaj Pratap Singh

unread,
Mar 2, 2010, 6:12:00 AM3/2/10
to opensourc...@googlegroups.com
Hi,

I am getting this.


fetchmail: Server certificate verification error: unable to get local issuer certificate
7428:error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed:s3_clnt.c:951:
fetchmail: SSL connection failed.
fetchmail: socket error while fetching from gls...@gmail.com@pop.gmail.com
fetchmail: Query status=2 (SOCKET)


And fetchmail stoped..

Thanks
Pankaj

Linuz Ashu

unread,
Mar 2, 2010, 10:13:32 PM3/2/10
to opensourc...@googlegroups.com
Can i see your certificate file?


--
You received this message because you are subscribed to the Google Groups "Opensource Projects" group.
To post to this group, send an email to opensourc...@googlegroups.com.
To unsubscribe from this group, send email to opensource-proj...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/opensource-projects?hl=en-GB.



--
Regards,
Ashu

Pankaj Pratap Singh

unread,
Mar 2, 2010, 11:25:30 PM3/2/10
to opensourc...@googlegroups.com
Yes,

I have attached certificate file in mail.
gmail.pem

Ashutosh

unread,
Mar 3, 2010, 12:23:19 AM3/3/10
to opensourc...@googlegroups.com
Hi,



On Wed, Mar 3, 2010 at 9:55 AM, Pankaj Pratap Singh <pankajs...@gmail.com> wrote:
Yes,

I have attached certificate file in mail.


Place attached hehe.pem into your certs directory and make a symbolic link of hehe.pem in certs directory. Name of sym. link should be "594f1775.0".

And, use finger print -> 92:73:17:4C:34:4B:68:F7:B2:17:71:42:0D:7F:9F:33

This will work i have checked. Let us know the results.


--
Regards

Ashutosh
hehe.pem

Ashutosh

unread,
Mar 3, 2010, 12:34:02 AM3/3/10
to opensourc...@googlegroups.com
On Wed, Mar 3, 2010 at 10:53 AM, Ashutosh <ashu...@fosteringlinux.com> wrote:
Hi,



On Wed, Mar 3, 2010 at 9:55 AM, Pankaj Pratap Singh <pankajs...@gmail.com> wrote:
Yes,

I have attached certificate file in mail.


Place attached hehe.pem into your certs directory and make a symbolic link of hehe.pem in certs directory. Name of sym. link should be "594f1775.0".

And, use finger print -> 92:73:17:4C:34:4B:68:F7:B2:17:71:42:0D:7F:9F:33

This will work i have checked. Let us know the results.


-
Regards

Ashutosh

Pankaj Pratap Singh

unread,
Mar 3, 2010, 12:38:50 AM3/3/10
to opensourc...@googlegroups.com
Thanks, Yes, now it is working.. :)

Linuz Ashu

unread,
Mar 3, 2010, 12:44:01 AM3/3/10
to opensourc...@googlegroups.com
On Wed, Mar 3, 2010 at 11:08 AM, Pankaj Pratap Singh <pankajs...@gmail.com> wrote:
Thanks, Yes, now it is working.. :)

Welcome !! :-)




--
Regards,
Ashu
Reply all
Reply to author
Forward
0 new messages