0.0
No commit activity in last 3 years
No release in over 3 years
imap_archiver is a command line tool to archive messages on an imap server. You tell it what folders to archive and where to archive it. For every folder that is archived a series of folders (one for each month) is created inside the archive folder.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 1.5.1
>= 0
~> 0.8.7
~> 2.3.0

Runtime

>= 0
 Project Readme

imap_archiver¶ ↑

imap_archiver is a command line tool to archive messages on an imap server. You tell it what folders to archive and where to archive it. For every folder that is archived a series of folders (one for each month) is created inside the archive folder.

Installing¶ ↑

gem install imap_archiver

Configuration¶ ↑

Create a configuration file in ~/.imap_archiver.rb

ImapArchiver::Config.run do |config|
   config.imap_server = 'imap.example.com'
   config.username = 'jellehelsen'
   config.password = "secret"
   config.folders_to_archive = ["Shared Folders/Support" "Shared Folders/Backuplogs" "Shared Folders/Info"]
   config.archive_folder = 'Archive'
   config.base_folder = 'Shared Folders' # part to strip of source folder name to get archive folder name
   config.archive_folder_acl = {'jelle' => 'lrswpcd'}
end

How it works¶ ↑

imap_archiver works by moving messages that are older then 3 months and that have been read and not flagged to a different folder. This helps in cleaning out public folders that get too big to work with.

Consider the following folder structure:

+ Shared Folders
  - Support
  - Backuplogs
  - Info

Given the configuration above, this would be archive as such:

+ Archive
  - Support
    - Mar 2010
    - Apr 2010
    - ...
  - Backuplogs
    - Mar 2010
    - Apr 2010
    - ...

Known bugs¶ ↑

The documentation is sparse to non-existing. It has only been tested against my own cyrus-imap server and a dovecot test server. For all unknown bugs: file an issue report! Creating a patch yourself helps in getting it fixed quickly.

TODO¶ ↑

  • Make the archive period configurable

  • Make the archive folder name configurable

Note on Patches/Pull Requests¶ ↑

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2010 Jelle Helsen. See LICENSE for details.