Git Product home page Git Product logo

larch's Issues

More than one --from-folder in config.yaml

Hi Ryan,

first of all thanks for that nice program. It's really a blast and helps me migrating from my IMAP mailbox hosted on our own server to Google.

Actually, I have a lot of old emails in old folders and a lot of subfolders. I recognized, that some folders have not been transferred to labels in gmail and the emails are not there - even though larch said so in it's output. So I decided to migrate each folder.

Well, it would be really cool, if I could define more than one sourcefolder in the config.yaml file. E.g:

gmail_migration:
verbosity: debug

  from: imap://mail.milkno.com
  from-folder: INBOX.Projekte.ruby
  from-folder: INBOX.Projekte.perl
  from-folder: INBOX.Projekte.php
  from-folder: INBOX.Projekte.java
  from-folder: INBOX.Projekte.lisp
  from-folder: INBOX.Projekte.sql 
  from-user: 'mail05'
  from-pass: 'blabla'

  to: imaps://imap.googlemail.com
  to-folder: Projekte
  to-user: '[email protected]'
  to-pass: 'fallera'

That would be helpful. Or did I miss something in the docu?

CHeers

Andy

Problem migrating label with unicode caracter in the name

Migrating from a dovecot imap server to google mails gives me this
'unicode related' error:

[17:01:33] [info] 192.168.1.13/KLANTEN/Andrea Acuña -> imap.gmail.com/
KLANTEN/Andrea Acuña
[17:01:33] [fatal] Attempt to update object did not result in a single
row modification (SQL: UPDATE mailboxes SET uidvalidity =
1303737107 WHERE (id = 139))

Add search criterion

Add search criterion to be able to "filter" copies.

Specifically, I'd like to see date criterion, but you could add a bunch of others too. I wanted to move all messages older than X months old to my "archive" GMail account, which has a mirrored directory structure as my primary account.

Duplicated folder. Gmail isn't case sensitive.

This issue happens whenever you have a folder with the same name but different casing between source and destination (ie. "folder" - "Folder"). IMAP protocol is case sensitive, but gmail isn't and throws a fatal error that stops the migration.

I coded a simple patch that adds a new quirk, that checks a regexp for the name.

def mailbox(name, delim = '/')
    retries = 0

    name.gsub!(/^(inbox\/?)/i){ $1.upcase }
    name.gsub!(delim, self.delim)

    name.gsub!(/\s+/, ' ') if @quirks[:gmail]

    # Gmail doesn't allow folders with leading or trailing whitespace.                                                                                       \

    name.strip! if @quirks[:gmail]

    begin
      if @quirks[:gmail]
        # In Gmail folders are not case sensitive                                                                                                             
        update_mailboxes
        @mailboxes.keys.each do |key|
          if key =~ /^#{Regexp.quote(name)}$/i
            return @mailboxes[key]
          end
        end
        raise MailboxNotFoundError, "mailbox not found: #{name}"
      end

      @mailboxes.fetch(name) do
        update_mailboxes
[....]

Certain domain names cause invalid URI error

A user reported on the Larch mailing list that the IMAP URI imaps://mail.example.no results in an invalid URI error, whereas imaps://mail.example.com works fine. Ruby's URI lib appears to be trying (and failing) to validate actual domain names.

Problems with Gmail folder names containing accented characters

Reported on the Larch mailing list at http://groups.google.com/group/larch/browse_thread/thread/294af0368c309bd

I 'am trying to synchronize my personnal IMAP (Dovecot) with my gmail account. The gmail locals are set to french, so Sent Mail folder is written in french with an accent. The problem is i connot use --to-folder option with an accent

Log messages:
creating mailbox: [Gmail]/Messages envoyés (this is the french name of Sent Mail folder)
Net::IMAP::BadResponseError: Invalid Command (will retry)

Looks like it tries to create a folder which should already exist on gmail...

Any clue?
I've set my gmail account to english and used the "Sent Mail" name instead, but i really would like to find a better solution.

Configurable folder mappings and delete-if-older-than option

First: GREAT WORK!

  1. I would like to copy email from the "exchange/Inbox" to the "gmail/Inbox" only if the email is not in "gmail/All Mail". Therefor the inventory comparison should be between "exchange/Inbox" and "gmail/All Mail", but the copy should be from "exchange/Inbox" to "gmail/Inbox". This would allow to archive emails in gmail without having them put back into the inbox with the next sync.

  2. Delete-if-older-than option would be nice.

Add --exclude option

Need to add an --exclude option to specify folder names (or regexes?) to exclude when using --all or --all-subscribed.

Should also add an --exclude-file option to allow exclusions to be specified in a text file.

SQLite chokes on certain characters

Reported on the mailing list at http://groups.google.com/group/larch/browse_thread/thread/1dd363a5be6f4ad0?hl=en:

I'm using larch to perform a large migration of a client's Google Apps
account with about 100k emails and a couple hundred labels. Everything went
well until larch started with the following Gmail label (font size increased
to notice the apostrophe): "Teddy’s Bike"

Note the apostrophe, it's not your regular ' apostrophe, it's a different
one:

I believe the problem lies in the weird apostrophe, because I had no trouble
with other labels which had the regular apostrophe. I logged larch's output
with the insane option:

S: RUBY0150 OK Success^M 
[17:19:28] [info] imap.gmail.com/Teddy<E2><80><99>s Bike -> imap.gmail.com/Denny<E2><80><99>s Hawthorne 
[17:19:28] [debug] [<] Teddy<E2><80><99>s Bike: getting mailbox status 
C: RUBY0163 STATUS "Teddy&IBk-s Bike" (MESSAGES UIDNEXT UIDVALIDITY)^M 
S: * STATUS "Teddy&IBk-s Bike" (MESSAGES 167 UIDNEXT 170 UIDVALIDITY 607519705)^M 
S: RUBY0163 OK Success^M 
[17:19:28] [fatal] Attempt to update object did not result in a single row modification (SQL: UPDATE `mailboxes` SET `uidvalidity` = 607519705 WHERE (`id` = 62)) 
[17:19:28] [info] 0 message(s) copied, 0 failed, 0 deleted out of 7507 total 
[17:19:28] [debug] performing database maintenance

larch is incompatible with sequel > 3.11.0

I updated my gems today and got the latest version of sequel (3.12.1 released in June 9, 2010). Now when running larch I get the following message:

/opt/local/lib/ruby/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch.rb:134:in open_db': undefined methodget_current_migration_version' for Sequel::Migrator:Class (NoMethodError)
from /opt/local/lib/ruby/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch.rb:36:in init' from /opt/local/lib/ruby/gems/1.9.1/gems/larch-1.1.0.dev.20100209/bin/larch:89:inmodule:Larch'
from /opt/local/lib/ruby/gems/1.9.1/gems/larch-1.1.0.dev.20100209/bin/larch:9:in <top (required)>' from /opt/local/bin/larch:19:inload'
from /opt/local/bin/larch:19:in `

'

It also happens with 3.12.0, released June 1, 2010. It works fine however with previous versions.

Gmail doesn't allow folder names longer than 40 characters (including delimiters)

Reported on the Larch mailing list at http://groups.google.com/group/larch/browse_thread/thread/2f8e8dbc2fab0af5

/var/lib/gems/1.8/bin/larch --from imap://server1 --from-user user1@domain1 --from-pass password1 --to imaps://imap.gmail.com --to-user [email protected] --to-pass password2 --all

[Sep 01 17:30:01] [info] [email protected]@imap.gmail.com: creating mailbox: INBOX/blabla/blablabla/blabla blabla 2008
[Sep 01 17:30:02] [info] [email protected]@imap.gmail.com: Net::IMAP::NoResponseError: Folder name is not allowed. (Failure) (will retry)
[Sep 01 17:30:03] [info] [email protected]@imap.gmail.com: Net::IMAP::NoResponseError: Folder name is not allowed. (Failure) (will retry)
[Sep 01 17:30:05] [info] [email protected]@imap.gmail.com: Net::IMAP::NoResponseError: Folder name is not allowed. (Failure) (will retry)
[Sep 01 17:30:09] [fatal] Net::IMAP::NoResponseError: Folder name is not allowed. (Failure) (giving up)
[Sep 01 17:30:09] [info] 0 message(s) copied, 0 failed, 1 untouched out of 1 total

--to-folder does not put messages in subfolders!

Hi,

I was expecting that the subfolders of the "from" side would be put as subfolder of "to-folder" on the "to" side.

Is it intentional or a bug? I don't see why the hierarchy would not be kept…

Thanks

Larch doesn't recopy deleted messages to the destination until a second attempt

  1. Use Larch to copy a bunch of messages from server A to server B.
  2. Delete those messages on server B.
  3. Run Larch again. It will see that the messages have been deleted, but will not recopy them.
  4. Run Larch again. This time it will recopy the deleted messages.

Larch should recopy the deleted messages the first time it sees that they're gone.

larch does not copy folders with only one message

when scanning folders with only one message in imap/mailbox.rb
variable full_range is 1...2

Since

full_range.max - full_range.min 

is zero

need_full_scan = full_range && full_range.max && full_range.min && full_range.max - full_range.min > 0

is false and nothing is done on the folder.

I suggest to change the definition of need_full_scan as

need_full_scan = full_range && full_range.max && full_range.min && full_range.max - full_range.min >= 0

Add support for proxies

Enable connecting behind proxy.
Possibly attaching to the web interface of gmail (rather than imap)

problem creating folder names that contains space

I have attached the output from a run. The first time it complained about 'Sent Messages' so I tried excluding it, but it keeps complaining. I tried renaming the folder on the source server (removed the space) and it works. But I have hundreds of folders containing space in the name. Am I missing something, or could it maybe be the server that cannot handle spaces?

$ bin/larch --from imap://mail.xxxxxxxx.no --to imap://xxxxxx.inmotionhosting.com -u [email protected] -p secret -P secret -U [email protected] -a -V insane --exclude 'Sent Messages'
[21:44:21] [debug] [<] updating mailboxes
[21:44:21] [debug] [<] connecting...
S: * OK IMAP4rev1 server ready at 06/12/11 21:44:24
[21:44:21] [info] [<] connected to mail.xxxxxxxx.no on port 143
C: RUBY0001 CAPABILITY
S: * CAPABILITY IMAP4rev1 IMAP4 AUTH=LOGIN AUTH=CRAM-MD5 IDLE CHILDREN AUTH=NTLM
S: RUBY0001 OK CAPABILITY completed
.....
S: RUBY0002 OK AUTHENTICATE CRAM-MD5.
[21:44:22] [debug] [<] authenticated using CRAM-MD5
C: RUBY0003 LIST "" ""
S: * LIST (\HasChildren) "/" "DIVERSE MAPPER"
S: * LIST (\HasNoChildren) "/" "DIVERSE MAPPER/ANNE BRITH"
........
S: RUBY0003 OK LIST completed
C: RUBY0004 LSUB "" "
"
S: * LSUB () "/" "Junk E-mail"
S: * LSUB () "/" "Deleted items"
S: * LSUB () "/" "DIVERSE MAPPER"
........
S: RUBY0004 OK LSUB completed
[21:44:23] [debug] [>] connecting...
S: * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2010 Double Precision, Inc. See COPYING for distribution information.
[21:44:23] [info] [>] connected to xxxxxx.inmotionhosting.com on port 143
C: RUBY0001 CAPABILITY
S: * CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS
S: RUBY0001 OK CAPABILITY completed
....
S: RUBY0002 OK LOGIN Ok.
C: RUBY0003 LIST "" ""
S: * LIST (\Noselect) "." ""
S: RUBY0003 OK LIST completed
[21:44:24] [debug] [>] updating mailboxes
C: RUBY0004 LIST "" ""
S: * LIST (\Unmarked \HasChildren) "." "INBOX"
S: * LIST (\HasNoChildren) "." "INBOX.Deleted Messages"
S: * LIST (\HasNoChildren) "." "INBOX.Notes"
S: * LIST (\HasNoChildren) "." "INBOX.Sent"
S: * LIST (\HasNoChildren) "." "INBOX.Trash"
S: * LIST (\HasNoChildren) "." "INBOX.Drafts"
S: * LIST (\HasNoChildren) "." "INBOX.Junk"
S: RUBY0004 OK LIST completed
C: RUBY0005 LSUB "" "
"
S: * LSUB (\HasNoChildren) "." "INBOX.Notes"
S: * LSUB (\HasNoChildren) "." "INBOX.Deleted Messages"
S: * LSUB (\Noselect \HasChildren) "." "INBOX"
S: RUBY0005 OK LSUB completed
[21:44:25] [info] [>] creating mailbox: DIVERSE MAPPER.ANNE BRITH
C: RUBY0006 CREATE "DIVERSE MAPPER.ANNE BRITH"
S: RUBY0006 NO Invalid mailbox name.
[21:44:25] [warning] [>] Net::IMAP::NoResponseError: Invalid mailbox name. (will retry)
C: RUBY0007 CREATE "DIVERSE MAPPER.ANNE BRITH"
S: RUBY0007 NO Invalid mailbox name.
[21:44:26] [warning] [>] Net::IMAP::NoResponseError: Invalid mailbox name. (will retry)
C: RUBY0008 CREATE "DIVERSE MAPPER.ANNE BRITH"
S: RUBY0008 NO Invalid mailbox name.
[21:44:29] [warning] [>] Net::IMAP::NoResponseError: Invalid mailbox name. (will retry)
C: RUBY0009 CREATE "DIVERSE MAPPER.ANNE BRITH"
S: RUBY0009 NO Invalid mailbox name.
[21:44:32] [fatal] Net::IMAP::NoResponseError: Invalid mailbox name. (giving up)
[21:44:32] [info] 0 message(s) copied, 0 failed, 0 deleted out of 0 total
[21:44:32] [debug] performing database maintenance

Net::IMAP thread deadlock bug

Any clues how to workaorund this ?

[19:36:41] [info] [<] INBOX/supply-infreq/di.se: fetching latest message flags...
[19:36:41] [info] [>] INBOX/supply-infreq/di.se: fetching latest message flags.../usr/lib/ruby/1.9.1/thread.rb:68:in sleep': deadlock detected (fatal) from /usr/lib/ruby/1.9.1/thread.rb:68:inwait'
from /usr/lib/ruby/1.9.1/monitor.rb:97:in wait' from /usr/lib/ruby/1.9.1/net/imap.rb:1170:insend_literal'
from /usr/lib/ruby/1.9.1/net/imap.rb:1373:in send_data' from /usr/lib/ruby/1.9.1/net/imap.rb:1145:insend_data'
from /usr/lib/ruby/1.9.1/net/imap.rb:1072:in block (2 levels) in send_command' from /usr/lib/ruby/1.9.1/net/imap.rb:1070:ineach'
from /usr/lib/ruby/1.9.1/net/imap.rb:1070:in block in send_command' from /usr/lib/ruby/1.9.1/monitor.rb:190:inmon_synchronize'
from /usr/lib/ruby/1.9.1/net/imap.rb:1064:in send_command' from /usr/lib/ruby/1.9.1/net/imap.rb:635:inappend'
from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch/imap/mailbox.rb:78:in block in append' from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch/imap.rb:188:insafely'
from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch/imap/mailbox.rb:72:in append' from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch.rb:230:inblock in copy_messages'
from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch/imap/mailbox.rb:104:in block in each_db_message' from /var/lib/gems/1.9.1/gems/sequel-3.9.0/lib/sequel/dataset/actions.rb:15:ineach'
from /var/lib/gems/1.9.1/gems/sequel-3.9.0/lib/sequel/dataset/actions.rb:15:in all' from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch/imap/mailbox.rb:104:ineach_db_message'
from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch.rb:188:in copy_messages' from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch.rb:72:inblock in copy_all'
from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch/imap.rb:126:in block in each_mailbox' from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch/imap.rb:126:ineach_value'
from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch/imap.rb:126:in each_mailbox' from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch.rb:60:incopy_all'
from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/bin/larch:118:in <module:Larch>' from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/bin/larch:9:in<top (required)>'
from /var/lib/gems/1.9.1/bin/larch:19:in load' from /var/lib/gems/1.9.1/bin/larch:19:in

'

[19:36:41] [info] imap.1and1.co.uk/INBOX/supply-infreq/direktronik -> imap.gmail.com/INBOX/supply-infreq/direktronik

...

[19:36:41] [info] [<] INBOX/supply-infreq/di.se: fetching latest message flags...
[19:36:41] [info] [>] INBOX/supply-infreq/di.se: fetching latest message flags.../usr/lib/ruby/1.9.1/thread.rb:68:in sleep': deadlock detected (fatal) from /usr/lib/ruby/1.9.1/thread.rb:68:inwait'
from /usr/lib/ruby/1.9.1/monitor.rb:97:in wait' from /usr/lib/ruby/1.9.1/net/imap.rb:1170:insend_literal'
from /usr/lib/ruby/1.9.1/net/imap.rb:1373:in send_data' from /usr/lib/ruby/1.9.1/net/imap.rb:1145:insend_data'
from /usr/lib/ruby/1.9.1/net/imap.rb:1072:in block (2 levels) in send_command' from /usr/lib/ruby/1.9.1/net/imap.rb:1070:ineach'
from /usr/lib/ruby/1.9.1/net/imap.rb:1070:in block in send_command' from /usr/lib/ruby/1.9.1/monitor.rb:190:inmon_synchronize'
from /usr/lib/ruby/1.9.1/net/imap.rb:1064:in send_command' from /usr/lib/ruby/1.9.1/net/imap.rb:635:inappend'
from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch/imap/mailbox.rb:78:in block in append' from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch/imap.rb:188:insafely'
from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch/imap/mailbox.rb:72:in append' from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch.rb:230:inblock in copy_messages'
from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch/imap/mailbox.rb:104:in block in each_db_message' from /var/lib/gems/1.9.1/gems/sequel-3.9.0/lib/sequel/dataset/actions.rb:15:ineach'
from /var/lib/gems/1.9.1/gems/sequel-3.9.0/lib/sequel/dataset/actions.rb:15:in all' from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch/imap/mailbox.rb:104:ineach_db_message'
from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch.rb:188:in copy_messages' from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch.rb:72:inblock in copy_all'
from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch/imap.rb:126:in block in each_mailbox' from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch/imap.rb:126:ineach_value'
from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch/imap.rb:126:in each_mailbox' from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/lib/larch.rb:60:incopy_all'
from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/bin/larch:118:in <module:Larch>' from /var/lib/gems/1.9.1/gems/larch-1.1.0.dev.20100209/bin/larch:9:in<top (required)>'
from /var/lib/gems/1.9.1/bin/larch:19:in load' from /var/lib/gems/1.9.1/bin/larch:19:in

'

[19:36:41] [info] imap.1and1.co.uk/INBOX/supply-infreq/direktronik -> imap.gmail.com/INBOX/supply-infreq/direktronik

Display estimated sync time and message count

Feature request from @akumar via Twitter: "estimate of how long the sync is likely to take (or at least the # of objects synced/not synced)."

This would require pre-scanning all mailboxes being synced in order to gather the necessary info so it would add some time to the sync, but should be doable. Cached mailbox state info can potentially reduce the pre-scanning time.

Larch incorrectly tries to set \Recent flag on messages

When copying messages that have the \Recent flag set on the source server, Larch tries to set the flag on the destination server as well. However, the IMAP spec prohibits clients from setting this flag. It seems many IMAP servers ignore this, but some (including Zimbra) return an error.

Gmail Sent Items folder

I just completed moving email from an IMAP account into Gmail. Unfortunately, I now have a folder in my Gmail account called INBOX/Sent Items while my Gmail's Sent Items is empty.

What is the proper syntax to move email into Gmail's Sent Mail?

I tried:
--from-folder 'INBOX.Sent Items' --to-folder 'Sent Mail'

but that created a new folder on Gmail called [Imap]/Sent Mail.

Gmail error: 'Unable to append message to folder'

when i try to copy emails with blank subject lines to Gmail, i get an error: "Unable to append message to folder."

Any idea how to resolve this?

[Dec 07 03:06:18] [info] copying message: [email protected] - Re: 
[Dec 07 03:06:19] [info] [email protected]@imap.gmail.com: Net::IMAP::NoResponseError: Unable to append message to folder (Failure) (will retry)
[Dec 07 03:06:21] [info] [email protected]@imap.gmail.com: Net::IMAP::NoResponseError: Unable to append message to folder (Failure) (will retry)
[Dec 07 03:06:24] [info] [email protected]@imap.gmail.com: Net::IMAP::NoResponseError: Unable to append message to folder (Failure) (will retry)
[Dec 07 03:06:27] [error] Net::IMAP::NoResponseError: Unable to append message to folder (Failure) (giving up)

Delete from destination if not on source?

Hi,

I see the feature to delete from source after copying (#22) - but is there the opposite, to delete mails on the target that weren't present on the source?

My purpose is to keep an exact sync of a gmail account on another IMAP server. If I sync and then on gmail, move some items into a folder (label + archive), on the next sync I'll have a copy in both the folder and in the inbox, on the target, which is not ideal for my purposes.

Duplicated folder. Gmail isn't case sensitive.

This issue happens whenever you have a folder with the same name but different casing between source and destination (ie. "folder" - "Folder"). IMAP protocol is case sensitive, but gmail isn't and throws a fatal error that stops the migration.

I coded a simple patch that adds a new quirk, that checks a regexp for the name.

def mailbox(name, delim = '/')
    retries = 0

    name.gsub!(/^(inbox\/?)/i){ $1.upcase }
    name.gsub!(delim, self.delim)

    name.gsub!(/\s+/, ' ') if @quirks[:gmail]

    # Gmail doesn't allow folders with leading or trailing whitespace.                                                                                       \

    name.strip! if @quirks[:gmail]

    begin
      if @quirks[:gmail]
        # In Gmail folders are not case sensitive                                                                                                             
        update_mailboxes
        @mailboxes.keys.each do |key|
          if key =~ /^#{Regexp.quote(name)}$/i
            return @mailboxes[key]
          end
        end
        raise MailboxNotFoundError, "mailbox not found: #{name}"
      end

      @mailboxes.fetch(name) do
        update_mailboxes
[....]

Bug in imap_uid_fetch with infinite range

Just a missing return

def imap_uid_fetch(set, fields, block_size = FETCH_BLOCK_SIZE, &block) # :yields: fetch_data
    if set.is_a?(Numeric) || (set.is_a?(Range) && set.last < 0)
      data = @imap.safely do
        imap_examine
        @imap.conn.uid_fetch(set, fields)
      end

      yield data unless data.nil?

      # Return was missing, so it continued processing afterwards   
      return
    end

Possible problem creating nested folders on Gmail

Excerpt from a user email to the Larch mailing list:

"I found that I couldn't transfer the entire tree in go (--all), as
larch choked on one particular folder:

From-server IMAP extract (insane logging):

S: * CAPABILITY IMAP4rev1 UIDPLUS IDLE LOGIN-REFERRALS NAMESPACE QUOTA
CHILDREN AUTH=DIGEST-MD5
S: * LIST (\HasChildren) "/" work/foo
S: * LIST (\HasNoChildren) "/" work/foo/bar
S: * LSUB (\HasChildren) "/" work/foo
S: * LSUB (\HasNoChildren) "/" work/foo/bar

Gmail IMAP extract:

S: * LIST (\HasNoChildren) "/" "work/foo"
S: * LSUB (\HasNoChildren) "/" "work/foo"

Gave this:

[Jun 15 19:40:37] [fatal] mailbox not found: work/foo/bar

I worked around the problem by pulling one folder at a time, which
worked fine, including for the folder which it had originaly choked
on."

release windows executable of larch

Hi,
this tool is great!
I used it to migrate a large imap account from googlemail to another provider.
However, I think that there are many users who would like to use the tool without needing to install ruby / gems etc. on their windows machines.
I suggest to release a .exe file created with something like http://www.erikveen.dds.nl/rubyscript2exe/
Regards,
J83

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.