LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-18-2011, 10:01 AM   #1
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Rep: Reputation: 16
Smile any one use fetchmail mutt postfix to access gmail?


I tried several methods on the web, but all failed.

My mailbox receive

Code:
This is the mail system at host wizard-desktop.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                  The mail system

<wizard@localhost>: cannot update mailbox /var/mail/wizard for user wizard.
   cannot open file: Permission denied

Final-Recipient: rfc822; wizard@localhost
Original-Recipient: rfc822;wizard@localhost
Action: failed
Status: 5.2.0
Diagnostic-Code: X-Postfix; cannot update mailbox /var/mail/wizard for user
   wizard. cannot open file: Permission denied
And the log file shows

Code:
fetchmail: reading message wizard@gmail.com@pop.gmail.com:1 of 5 (10071 octets) (log message incomplete)fetchmail: connection to localhost:smtp [::1/25] failed: Connection refused.
Hope some could help.
 
Old 08-18-2011, 10:13 AM   #2
EDDY1
Guru
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 5,255

Rep: Reputation: 467Reputation: 467Reputation: 467Reputation: 467Reputation: 467
Icedove works well with gmail & is simple to setup.
Also you have to enable it iat gmail account settings.

Last edited by EDDY1; 08-18-2011 at 10:16 AM.
 
Old 08-18-2011, 11:33 AM   #3
scottro11
Member
 
Registered: Jun 2009
Location: NYC
Posts: 257

Rep: Reputation: 58
I use getmail, rather than postfix.

I have a page on mutt that might be of some use, at http://home.roadrunner.com/~computertaijutsu/mutt.html.

I use msmtp for sending.

I've come to prefer getmail to fetchmail, there's a section on the page on setting it up, and it works with gmail (using pop) without a problem.
 
Old 08-18-2011, 11:39 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,497

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
Is postfix running and accepting connections?
This is what I do with a new install from postfix
Code:
stop postfix
chgrp -R postdrop /var/spool/postfix/public
chgrp -R postdrop /var/spool/postfix/maildrop/
chgrp -R postdrop /usr/sbin/postdrop
chgrp -R postdrop /usr/sbin/postqueue
chmod g+s /usr/sbin/postdrop
chmod g+s /usr/sbin/postqueue
postfix -c /etc/postfix set-permissions
postfix check
restart postfix
Kind regards
 
Old 08-19-2011, 01:06 AM   #5
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by scottro11 View Post
I use getmail, rather than postfix.

I have a page on mutt that might be of some use, at http://home.roadrunner.com/~computertaijutsu/mutt.html.

I use msmtp for sending.

I've come to prefer getmail to fetchmail, there's a section on the page on setting it up, and it works with gmail (using pop) without a problem.
Eh....
I will have to change to getmail and msmtp?

Other solution?
 
Old 08-19-2011, 01:17 AM   #6
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Original Poster
Rep: Reputation: 16
I only found getmail4 on Ubuntu 11.04.
Does this works fine? Same configurations step?
 
Old 08-19-2011, 01:00 PM   #7
scottro11
Member
 
Registered: Jun 2009
Location: NYC
Posts: 257

Rep: Reputation: 58
yes, getmail4 is getmail. (The author made major changes between 3 and 4, I guess that's why Ubuntu calls it getmail4).

Note that I only offered it as a suggestion--you don't HAVE to change, I was just saying I don't know how to do it with fetchmail, but this way works for me.
 
Old 08-19-2011, 01:24 PM   #8
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,497

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
The problem isn't fetchmail, but postfix
Quote:
connection to localhost:smtp [::1/25] failed: Connection refused.
Is postfix running?
Any firewall?
Quote:
Diagnostic-Code: X-Postfix; cannot update mailbox /var/mail/wizard for user
wizard. cannot open file: Permission denied
Did you verified the permissions?

Kind regards
 
Old 08-19-2011, 10:37 PM   #9
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Original Poster
Rep: Reputation: 16
Hi, guys

I tried again for fetchmail. This works for me if I create a special user on my desktop.
This user has the same id with my gmail user id.

If I use another account on my desktop, I couldn't get mail.

I have changed the user in .fetchmailrc to the same as the login user.
I couldn't think of any other reason now.
 
Old 08-19-2011, 10:39 PM   #10
EDDY1
Guru
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 5,255

Rep: Reputation: 467Reputation: 467Reputation: 467Reputation: 467Reputation: 467
In gmail settings I think you can create aliases.
 
Old 08-20-2011, 02:56 AM   #11
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,497

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
Please post the fetchmailrc file for both cases.

Kind regards
 
Old 08-20-2011, 10:42 AM   #12
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Original Poster
Rep: Reputation: 16
Sure

1. login user: wizard, but not work
set postmaster wizard
#set syslog
set daemon 30
set logfile /home/wizard/.fetchmail.log
poll pop.gmail.com with proto POP3 and options no dns
user "wizarddewhite@gmail.com" there with pass 'xxx' is 'wizard' here options ssl keep
sslfingerprint '90:9A:84:92:E7:60:7C:A2:45:73:C9:117:FE:7D:8A' sslcertck sslcertpath /etc/ssl/certs

2. login user: wizarddewhite, works
set postmaster wizarddewhite
#set syslog
set daemon 30
set logfile /home/wizarddewhite/.fetchmail.log
poll pop.gmail.com with proto POP3 and options no dns
user "wizarddewhite@gmail.com" there with pass 'xxx' is 'wizarddewhite' here options ssl keep
sslfingerprint '90:9A:84:92:E7:60:7C:A2:45:73:C9:117:FE:7D:8A' sslcertck sslcertpath /etc/ssl/certs

Anything related to mutt?
 
Old 08-20-2011, 10:45 AM   #13
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,497

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
Do you still get the connection refused in the logfiles?

Kind regards
 
Old 08-21-2011, 06:58 AM   #14
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Original Poster
Rep: Reputation: 16
Below is the fetchmail log file for the working one.
Still see the "connection refused" message,while I can see the mail via mutt.

Quote:
fetchmail: starting fetchmail 6.3.9-rc2 daemon
fetchmail: 33 messages for wizarddewhite@gmail.com at pop.gmail.com (224170 octets).
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:1 of 33 (4657 octets) (log message incomplete)fetchmail: connection to localhost:smtp [::1/25] failed: Connection refused.
fetchmail: not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:2 of 33 (4664 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:3 of 33 (6828 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:4 of 33 (10645 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:5 of 33 (6361 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:6 of 33 (9919 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:7 of 33 (7715 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:8 of 33 (7754 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:9 of 33 (12251 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:10 of 33 (5305 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:11 of 33 (5074 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:12 of 33 (5701 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:13 of 33 (15554 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:14 of 33 (6940 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:15 of 33 (5006 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:16 of 33 (5454 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:17 of 33 (9808 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:18 of 33 (4973 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:19 of 33 (8556 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:20 of 33 (5083 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:21 of 33 (4725 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:22 of 33 (6883 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:23 of 33 (4706 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:24 of 33 (4818 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:25 of 33 (4669 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:26 of 33 (5402 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:27 of 33 (5515 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:28 of 33 (7073 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:29 of 33 (5317 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:30 of 33 (6250 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:31 of 33 (5742 octets) not flushed
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:32 of 33 (7501 octets) not flushed
 
Old 08-21-2011, 07:21 AM   #15
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Original Poster
Rep: Reputation: 16
While I tried again on the "wizard" account.

The fetchmail log file shows

Quote:
fetchmail: starting fetchmail 6.3.9-rc2 daemon
fetchmail: sleeping at Sun 21 Aug 2011 08:15:21 PM CST for 30 seconds
fetchmail: awakened at Sun 21 Aug 2011 08:15:52 PM CST
fetchmail: 1 message for wizarddewhite@gmail.com at pop.gmail.com (2174 octets).
fetchmail: reading message wizarddewhite@gmail.com@pop.gmail.com:1 of 1 (2174 octets) (log message incomplete)fetchmail: connection to localhost:smtp [::1/25] failed: Connection refused.
fetchmail: not flushed

But I can't see mail via mutt.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Configuration files for : MUTT + GMAIL + MSMTP + IMAP + FETCHMAIL + SENDMAIL ? frenchn00b Linux - Software 1 06-03-2010 03:43 PM
Gmail on Home Linux Box using Postfix and Fetchmail mchirico Linux - News 1 05-11-2005 05:37 PM
Google Gmail on Home Linux Box using Postfix and Fetchmail mchirico LinuxQuestions.org Member Success Stories 0 05-04-2005 03:42 PM
Google Gmail on Home Linux Box using Postfix and Fetchmail mchirico Linux - General 1 05-04-2005 03:13 PM
email from the console (fetchmail/procmail/mutt/postfix) TedMaul Linux - Software 0 03-04-2004 12:07 PM


All times are GMT -5. The time now is 11:36 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration