Small utility to migrate whole mail archives stored by [ Sympa] on a generic IMAP server (currently using GMail). This is not using SMTP but the APPEND IMAP command, that way, no need to avoid anti-spam or throttling measures.


  1. ruby 1.9, tested with 1.9.3
  2. Rufus::Tokyo gem to handle the ToKyoCabinet database used to store state
  3. Mail this gem is used to handle some modifications made to each mail


  1. you need to setup a .gmailrc in your HOME directory. This simple file should have two lines, the first with the name of the IMAP server and the second one should have the username and password separated by a space.

  2. go to the directory used for the Sympa archives (usually /var/spool/sympa/archive or such) then run it

    sympa2gmail.rb [-R] [-B N] dir [dir...]

    -R force the script to really move the mails instead of just saying it did -B N enables you to change the batch size (Default: 200)