Discussion:
GMail IMAP error
clear loon
2009-05-20 09:23:16 UTC
Permalink
Hello -

I assume I'm just being thick but I'm trying to use getmail to download,
using IMAP, all of my mail on GMail. However when I run getmail I get the
following error:

SimpleIMAPSSLRetriever:***@imap.gmail.com:993:
getmailrc: operation error (IMAP error (command SELECT ('[Gmail]/All Mail',)
returned NO))
0 messages (0 bytes) retrieved, 0 skipped
IMAP error during logout (command CLOSE illegal in state AUTH, only allowed
in states SELECTED)

My getmailrc is as follows:

[retriever]
type = SimpleIMAPSSLRetriever
server = imap.gmail.com
username = username
port = 993
password = password
mailboxes = ("[GMail]/All Mail",)
move_on_delete = bin

[destination]
type = Maildir
path = ~/GMailBackup/

[options]
verbose = 1
read_all = false
delete = false
message_log = ~/.getmail/log

I can download mail from my inbox (although the number downloaded seems low
relative to what appears to be in my inbox) if I replace ("[GMail]/All
Mail",) with ("INBOX",)

As far as I can tell, ("[GMail]/All Mail",) is correct. Does anyone know
what I'm doing wrong?

Thanks,

CL
Daniel Roesler
2009-05-20 10:48:19 UTC
Permalink
I believe the [Gmail] folder doesn't have a capital 'M'. Have you
tried "[Gmail]/All Mail"?

Avast!
Daniel Roesler
Post by clear loon
Hello -
I assume I'm just being thick but I'm trying to use getmail to download,
using IMAP, all of my mail on GMail. However when I run getmail I get the
getmailrc: operation error (IMAP error (command SELECT ('[Gmail]/All Mail',)
returned NO))
 0 messages (0 bytes) retrieved, 0 skipped
IMAP error during logout (command CLOSE illegal in state AUTH, only allowed
in states SELECTED)
[retriever]
type = SimpleIMAPSSLRetriever
server = imap.gmail.com
username = username
port = 993
password = password
mailboxes = ("[GMail]/All Mail",)
move_on_delete = bin
[destination]
type = Maildir
path = ~/GMailBackup/
[options]
verbose = 1
read_all = false
delete = false
message_log = ~/.getmail/log
I can download mail from my inbox (although the number downloaded seems low
relative to what appears to be in my inbox) if I replace ("[GMail]/All
Mail",) with ("INBOX",)
As far as I can tell, ("[GMail]/All Mail",) is correct. Does anyone know
what I'm doing wrong?
Thanks,
CL
clear loon
2009-05-20 11:26:07 UTC
Permalink
I have tried both GMail and Gmail - same result.
Post by Daniel Roesler
I believe the [Gmail] folder doesn't have a capital 'M'. Have you
tried "[Gmail]/All Mail"?
Avast!
Daniel Roesler
Post by clear loon
Hello -
I assume I'm just being thick but I'm trying to use getmail to download,
using IMAP, all of my mail on GMail. However when I run getmail I get the
getmailrc: operation error (IMAP error (command SELECT ('[Gmail]/All
Mail',)
Post by clear loon
returned NO))
0 messages (0 bytes) retrieved, 0 skipped
IMAP error during logout (command CLOSE illegal in state AUTH, only
allowed
Post by clear loon
in states SELECTED)
[retriever]
type = SimpleIMAPSSLRetriever
server = imap.gmail.com
username = username
port = 993
password = password
mailboxes = ("[GMail]/All Mail",)
move_on_delete = bin
[destination]
type = Maildir
path = ~/GMailBackup/
[options]
verbose = 1
read_all = false
delete = false
message_log = ~/.getmail/log
I can download mail from my inbox (although the number downloaded seems
low
Post by clear loon
relative to what appears to be in my inbox) if I replace ("[GMail]/All
Mail",) with ("INBOX",)
As far as I can tell, ("[GMail]/All Mail",) is correct. Does anyone know
what I'm doing wrong?
Thanks,
CL
Charles Cazabon
2009-05-20 15:08:30 UTC
Permalink
Post by clear loon
I assume I'm just being thick but I'm trying to use getmail to download,
using IMAP, all of my mail on GMail. However when I run getmail I get the
getmailrc: operation error (IMAP error (command SELECT ('[Gmail]/All Mail',)
returned NO))
0 messages (0 bytes) retrieved, 0 skipped
IMAP error during logout (command CLOSE illegal in state AUTH, only allowed
in states SELECTED)
Daniel's reply is on the right track; this is not a getmail problem, but is
Post by clear loon
mailboxes = ("[GMail]/All Mail",)
[...]
Post by clear loon
As far as I can tell, ("[GMail]/All Mail",) is correct. Does anyone know
what I'm doing wrong?
I don't use Gmail, so I don't know what the correct value is, but the Gmail
server clearly indicated that isn't the correct value -- when getmail issued
the SELECT command to open the mailbox you specified, the server replied NO,
indicating that mailbox doesn't exist.

Charles
--
-----------------------------------------------------------------------
Charles Cazabon
GPL'ed software available at: http://pyropus.ca/software/
-----------------------------------------------------------------------
Daniel Roesler
2009-05-20 15:25:33 UTC
Permalink
I use gmail, but I haven't had a problem with it. Can you get your
"[Gmail]/Sent Mail" folder? What about your "[Gmail]/Trash" folder?
Maybe it has something to do with spaces? Try using a backslash
instead of a forward slash?

Some notes with my rc file: I don't use the "move_on_delete = bin" or
"delete = false" options, but I can't see how those would affect this
problem.

Avast!
Daniel Roesler
***@gmail.com

On Wed, May 20, 2009 at 10:08 AM, Charles Cazabon
Post by Charles Cazabon
Post by clear loon
I assume I'm just being thick but I'm trying to use getmail to download,
using IMAP, all of my mail on GMail. However when I run getmail I get the
getmailrc: operation error (IMAP error (command SELECT ('[Gmail]/All Mail',)
returned NO))
  0 messages (0 bytes) retrieved, 0 skipped
IMAP error during logout (command CLOSE illegal in state AUTH, only allowed
in states SELECTED)
Daniel's reply is on the right track; this is not a getmail problem, but is
Post by clear loon
mailboxes = ("[GMail]/All Mail",)
[...]
Post by clear loon
As far as I can tell, ("[GMail]/All Mail",) is correct. Does anyone know
what I'm doing wrong?
I don't use Gmail, so I don't know what the correct value is, but the Gmail
server clearly indicated that isn't the correct value -- when getmail issued
the SELECT command to open the mailbox you specified, the server replied NO,
indicating that mailbox doesn't exist.
Charles
--
-----------------------------------------------------------------------
Charles Cazabon
GPL'ed software available at:               http://pyropus.ca/software/
-----------------------------------------------------------------------
---------------------------------------------------------------------
clear loon
2009-05-20 15:52:08 UTC
Permalink
Thanks for the response. That is what I assumed the answer was but I've not
found a fix anywhere so thought I'd ask on the getmail list in the vain hope
a getmail + Gmail user could see what the problem is. AFAICT '[Gmail]/All
Mail' should be available. Will continue to search - thanks for both
responses.
Post by clear loon
Post by clear loon
I assume I'm just being thick but I'm trying to use getmail to download,
using IMAP, all of my mail on GMail. However when I run getmail I get the
getmailrc: operation error (IMAP error (command SELECT ('[Gmail]/All
Mail',)
Post by clear loon
returned NO))
0 messages (0 bytes) retrieved, 0 skipped
IMAP error during logout (command CLOSE illegal in state AUTH, only
allowed
Post by clear loon
in states SELECTED)
Daniel's reply is on the right track; this is not a getmail problem, but is
Post by clear loon
mailboxes = ("[GMail]/All Mail",)
[...]
Post by clear loon
As far as I can tell, ("[GMail]/All Mail",) is correct. Does anyone know
what I'm doing wrong?
I don't use Gmail, so I don't know what the correct value is, but the Gmail
server clearly indicated that isn't the correct value -- when getmail issued
the SELECT command to open the mailbox you specified, the server replied NO,
indicating that mailbox doesn't exist.
Charles
--
-----------------------------------------------------------------------
Charles Cazabon
GPL'ed software available at: http://pyropus.ca/software/
-----------------------------------------------------------------------
---------------------------------------------------------------------
Charles Cazabon
2009-05-20 16:55:03 UTC
Permalink
Post by clear loon
Thanks for the response. That is what I assumed the answer was but I've not
found a fix anywhere so thought I'd ask on the getmail list in the vain hope
a getmail + Gmail user could see what the problem is. AFAICT '[Gmail]/All
Mail' should be available. Will continue to search - thanks for both
responses.
Keep in mind that you may not be doing anything wrong; this could be a problem
with Gmail -- I've had several reports from getmail users that turned out to
be bugs at Google's end.

If you confirm you've got the folder name correct, try contacting the Gmail
folks.

Charles
--
-----------------------------------------------------------------------
Charles Cazabon
GPL'ed software available at: http://pyropus.ca/software/
-----------------------------------------------------------------------
clear loon
2009-05-22 16:39:45 UTC
Permalink
Solved: despite my gmail address being ***@gmail.com (not this one
obviuosly, but the one I'm using getmail with) the folder setting needs to
be [Google Mail]/All Mail rather than [Gmail]/All Mail
Post by Charles Cazabon
Post by clear loon
Thanks for the response. That is what I assumed the answer was but I've
not
Post by clear loon
found a fix anywhere so thought I'd ask on the getmail list in the vain
hope
Post by clear loon
a getmail + Gmail user could see what the problem is. AFAICT '[Gmail]/All
Mail' should be available. Will continue to search - thanks for both
responses.
Keep in mind that you may not be doing anything wrong; this could be a problem
with Gmail -- I've had several reports from getmail users that turned out to
be bugs at Google's end.
If you confirm you've got the folder name correct, try contacting the Gmail
folks.
Charles
--
-----------------------------------------------------------------------
Charles Cazabon
GPL'ed software available at: http://pyropus.ca/software/
-----------------------------------------------------------------------
---------------------------------------------------------------------
Loading...