software:dailydata:archiveimap
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
software:dailydata:archiveimap [2019/09/17 02:17] – created rodolico | software:dailydata:archiveimap [2019/09/19 02:04] (current) – rodolico | ||
---|---|---|---|
Line 3: | Line 3: | ||
We run a small mail server for some of our clients, some of whom retain massive amounts of e-mail. A few never sort anything, but leave it all in the Inbox, which can cause programs like Outlook to become unstable. Additionally, | We run a small mail server for some of our clients, some of whom retain massive amounts of e-mail. A few never sort anything, but leave it all in the Inbox, which can cause programs like Outlook to become unstable. Additionally, | ||
- | Many programs allow auto-archiving of older mail. However, in the case of Outlook, this mail is stored in a local message store (.pst file), and while Thunderbird will move the mail around on the server, it is still creating a huge message store which can negatively impact resources on both the client machine and the mail server. | + | Many programs allow auto-archiving of older mail. However, in the case of Outlook, this mail is stored in a local message store (.pst file) which is difficult to back up. And while Thunderbird will move the mail around on the server, it is still creating a huge message store which can negatively impact resources on both the client machine and the mail server. |
The main solution we have found is to separate mail into an //active account// and an //archive account//. We create a separate mail account strictly for archival purposes, and keep the //active account// as small as possible for rapid response to the client and fewer resources used on both client and server. The //archive account// is used for permanent storage of old mail, and can be on older, slower hardware, and not automatically synchronized to the client' | The main solution we have found is to separate mail into an //active account// and an //archive account//. We create a separate mail account strictly for archival purposes, and keep the //active account// as small as possible for rapid response to the client and fewer resources used on both client and server. The //archive account// is used for permanent storage of old mail, and can be on older, slower hardware, and not automatically synchronized to the client' | ||
+ | |||
+ | In addition to traditional IMAP servers, archiveIMAP has been successfully used archiving mail from Microsoft Exchange and gmail. In theory, any mail server which supports an IMAP interface should be able to work. archiveIMAP queries the source and target servers for the delimiter. It is possible that one type of server may allow folders to contain characters not allowed on another, but we have not run into that yet. | ||
===== Client Perspective ===== | ===== Client Perspective ===== | ||
Line 22: | Line 24: | ||
* **Any Combination of the above** - You can specify one or more of the above, and your systems administrator will be able to archive your mail as you see fit. For example, if you are very organized and have all of your mail sorted, you could tell the sysadmin to store them as the original path, then a year and month. Thus, a message in your Inbox/ | * **Any Combination of the above** - You can specify one or more of the above, and your systems administrator will be able to archive your mail as you see fit. For example, if you are very organized and have all of your mail sorted, you could tell the sysadmin to store them as the original path, then a year and month. Thus, a message in your Inbox/ | ||
+ | Some special Notes: | ||
+ | |||
+ | First, once a message has been placed in the archives is it difficult to get back out. Because of this, it is better to be very conservative with your definition of //old//. If you think you want to archive messages older than a year, be conservative and make it 18 months for the first time. If, at a later date, you realize that was too conservative and you really meant 15 months, your sysadmin can make that change easily. However, if you find yourself going to the archives several times a day because you set it for 6 months, it is much more difficult to change that to a year. | ||
+ | |||
+ | Second, be sure you like the way you want your archives set up. Your sysadmin can easily run a trial for you, where the archive account is created but the messages are not removed from your active account. Have your sysadmin do this, maybe for just a year or so, and see if you like it. If so, the sysadmin can delete your archive account and recreate it, then run the archiver for real. However, if you chose the Year/Month option (probably the best for most people), then decide you really wanted the original folder names, reconstructing the original structure is very, very difficult. | ||
+ | |||
+ | Last, why do I say the Year/Month option is the best for most people? A lot of times, you can remember "it was about 2014, I think." | ||
+ | |||
+ | ===== Systems Administrators ===== | ||
+ | |||
+ | First, you can get the most recent version of archiveIMAP from our subversion repository. | ||
+ | <code bash> | ||
+ | http:// | ||
+ | </ | ||
+ | |||
+ | I am TRYING to get used to the whole " | ||
+ | |||
+ | Check out the folder to whatever directory you want. The configuration file (archiveIMAP.yaml) needs to be in the same directory as the executable. That is hard coded, though we may make fix it later to look in /etc or / | ||
+ | |||
+ | The config file is basic YAML. I love YAML, but I'm always scared of messing things up, so there is a sample .cfg file which contains a sample config file in Perl hash format. You can then run the filter // | ||
+ | <code bash> | ||
+ | ./ | ||
+ | </ | ||
+ | which will, obviously, overwrite archiveIMAP.yaml, | ||
+ | |||
+ | I'd recommend a test run first. Look in the README. | ||
+ | |||
+ | There is some decent documentation, | ||
+ | |||
+ | If you have any fixes/ | ||
+ | |||
+ | This is released under Gnu 3. I thought about BSD or something else, but for now, it is Gnu gpl v3. | ||
+ | |||
+ | Uses the following libraries: | ||
+ | <code perl> | ||
+ | use Net:: | ||
+ | use POSIX; # to get floor and ceil | ||
+ | use YAML::Tiny; # apt-get libyaml-tiny-perl under debian | ||
+ | use Clone ' | ||
+ | use Hash:: | ||
+ | use Date:: | ||
+ | use Email:: | ||
+ | use Date:: | ||
+ | use Time:: | ||
+ | </ | ||
+ | |||
+ | On a Devuan (or any Debian derived) system, you can use the following command: | ||
+ | |||
+ | <code bash> | ||
+ | apt-get -y install libnet-imap-simple-ssl-perl libyaml-tiny-perl libhash-merge-simple-perl libclone-perl libdate-manip-perl libemail-simple-perl | ||
+ | </ | ||
software/dailydata/archiveimap.1568704641.txt.gz · Last modified: 2019/09/17 02:17 by rodolico