LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   any one use fetchmail mutt postfix to access gmail? (http://www.linuxquestions.org/questions/linux-software-2/any-one-use-fetchmail-mutt-postfix-to-access-gmail-898082/)

Richard.Yang 08-18-2011 10:01 AM

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.

EDDY1 08-18-2011 10:13 AM

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

scottro11 08-18-2011 11:33 AM

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.

repo 08-18-2011 11:39 AM

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

Richard.Yang 08-19-2011 01:06 AM

Quote:

Originally Posted by scottro11 (Post 4446817)
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?

Richard.Yang 08-19-2011 01:17 AM

I only found getmail4 on Ubuntu 11.04.
Does this works fine? Same configurations step?

scottro11 08-19-2011 01:00 PM

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.

repo 08-19-2011 01:24 PM

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

Richard.Yang 08-19-2011 10:37 PM

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.

EDDY1 08-19-2011 10:39 PM

In gmail settings I think you can create aliases.

repo 08-20-2011 02:56 AM

Please post the fetchmailrc file for both cases.

Kind regards

Richard.Yang 08-20-2011 10:42 AM

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:11:D7: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:11:D7:FE:7D:8A' sslcertck sslcertpath /etc/ssl/certs

Anything related to mutt?

repo 08-20-2011 10:45 AM

Do you still get the connection refused in the logfiles?

Kind regards

Richard.Yang 08-21-2011 06:58 AM

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

Richard.Yang 08-21-2011 07:21 AM

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.


All times are GMT -5. The time now is 02:27 PM.