Re: " Net::IMAP::NoResponseError: No folder [Gmail]/Trash (Failure) (will retry)" when using "--delete" option

249 views
Skip to first unread message

Ryan Grove

unread,
Apr 6, 2013, 2:52:58 PM4/6/13
to la...@googlegroups.com
When Larch deletes a message on Gmail, it does so by moving it to the [Gmail]/Trash folder, which should always exist. Does your source Gmail account somehow not have this folder?

- Ryan


On Sat, Apr 6, 2013 at 8:48 AM, Florian Rüchel <florian...@inexplicity.de> wrote:
I am currently trying to mimic GMail's IMAP import with larch: I run larch as a cron job and it downloads new mail to my other INBOX. However, deleted, moved, etc. mail gets redownloaded so I wanted to use larch's --delete flag. I don't need them on my GMail account any more, but I need the import. So what I try to do is migrate away from GMail to my own mail service but not loose the mails that still arrive at GMail.

But when I run larch, the following error(s) appear:

[17:33:13] [info] [<] connected to imap.gmail.com on port 993 using SSL
[17:33:16] [info] [>] connected to ***HIDDEN*** on port 993 using SSL
[17:33:16] [info] imap.gmail.com/INBOX -> ***HIDDEN***/INBOX
[17:33:17] [info] [<] INBOX: fetching latest message flags...
[17:33:17] [info] [<] INBOX: fetching message headers 1 through 1...
[17:33:17] [info] [>] INBOX: fetching latest message flags...
[17:33:18] [info] [>] copying uid 11361: ***HIDDEN***
[17:33:18] [info] [<] deleting uid 11361
[17:33:19] [warning] [<] Net::IMAP::NoResponseError:  No folder [Gmail]/Trash (Failure) (will retry)
[17:33:20] [error] Net::IMAP::NoResponseError:  No folder [Gmail]/Trash (Failure) (giving up)
[17:33:21] [info] [<] disconnected
[17:33:21] [info] [>] disconnected
[17:33:21] [info] 1 message(s) copied, 1 failed, 0 deleted out of 1 total

 My config:

import:
        from: imaps://imap.gmail.com
        from-user: ***HIDDEN***
        from-pass: ***HIDDEN***

        to: ***HIDDEN***
        to-user: ***HIDDEN***
        to-pass: ***HIDDEN***

        verbosity: info
        max-retries: 1
        delete: true
        no-create-folder: true

I change the verbosity to warn/error when running as a run but this is basically my config. On my destination, I deleted all folders "GMAIL" that were created by larch (and moved the messages) from there, but from larchs outpu I understand that the error happens on the source (i.e. GMail) because of the "<" symbol. Is this a bug in larch (or more likely a GMail quirk)? Is there a way to work around this?

Regards,
Florian

--
You received this message because you are subscribed to the Google Groups "larch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to larch+un...@googlegroups.com.
To post to this group, send email to la...@googlegroups.com.
Visit this group at http://groups.google.com/group/larch?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Florian Rüchel

unread,
Apr 6, 2013, 4:54:04 PM4/6/13
to la...@googlegroups.com
Thank you for that information. I am no ruby programmer, but after grepping through larch's files I found the corresponding line in the source code. Here's the problem: I am using the German version of GMail and here
1) GMail as not allowed to be named GMail and is thus named Google Mail: [Gmail] -> [Google Mail]
2) The german name for "Trash" is "Papierkorb": [Gmail]/Trash -> [Google Mail]/Papierkorb

After changing line 93 in lib/larch/imap/mailbox.rb to this value everything works. I don't know if you maybe want to include that as a possible configuration or if my case is so rare.

For me it works perfectly now, so thank you for the advice.

Regards,
Florian

Ryan Grove

unread,
Apr 6, 2013, 5:31:32 PM4/6/13
to la...@googlegroups.com
That's good to know! I'm glad you were able to get it working.

- Ryan
Reply all
Reply to author
Forward
0 new messages