software:dovecot:archiveserver
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
software:dovecot:archiveserver [2021/05/09 01:53] – rodolico | software:dovecot:archiveserver [2023/09/25 14:42] – rodolico | ||
---|---|---|---|
Line 2: | Line 2: | ||
We have run across this a few times, and thought it might be good to document. A client uses some service which severely limits the amount of e-mail which can be retained. I have seen anywhere from 2G to 10G recently (2016-2018). For some clients, it is a requirement to save e-mail for years, perhaps decades. One common example is the Legal field, where something you did 10 years ago can end up in court. | We have run across this a few times, and thought it might be good to document. A client uses some service which severely limits the amount of e-mail which can be retained. I have seen anywhere from 2G to 10G recently (2016-2018). For some clients, it is a requirement to save e-mail for years, perhaps decades. One common example is the Legal field, where something you did 10 years ago can end up in court. | ||
+ | |||
+ | Additionally, | ||
Many e-mail clients allow archival of e-mail, but they store the information locally, on your workstation, | Many e-mail clients allow archival of e-mail, but they store the information locally, on your workstation, | ||
- | A much better solution in many cases is to create an IMAP store specifically for archival purposes. In the last two cases we had, the clients were connecting to an Exchange server and already had an internal Unix file server which had an automated/ | + | A much better solution in many cases is to create an IMAP store specifically for archival purposes. In the last cases we had involving actual e-mail limits, the clients were connecting to an Exchange server and already had an internal Unix file server which had an automated/ |
This article covers building a Dovecot IMAP server on Linux, manually setting up the users (and space for them). If you want a pretty GUI (actually WebUI) you might look at installing [[https:// | This article covers building a Dovecot IMAP server on Linux, manually setting up the users (and space for them). If you want a pretty GUI (actually WebUI) you might look at installing [[https:// | ||
Line 13: | Line 15: | ||
===== Setup and Install Dovecot Server ===== | ===== Setup and Install Dovecot Server ===== | ||
- | This is pretty straight forward; allow the operating | + | This is pretty straight forward; allow the operating |
Install Dovecot | Install Dovecot | ||
Line 23: | Line 25: | ||
===== Create a user and store for the e-mail ===== | ===== Create a user and store for the e-mail ===== | ||
- | We should use a different user/group for this and all mail will be owned by that user/group. Additionally, | + | We should use a different user/group for this and all mail will be owned by that user/group. Additionally, |
Message store (ie, home directory) can be anyplace. I'm going to set it up in /srv/vmail. This will be the head of a tree of subdirectories for individual users. Note, I use useradd (vs Debian' | Message store (ie, home directory) can be anyplace. I'm going to set it up in /srv/vmail. This will be the head of a tree of subdirectories for individual users. Note, I use useradd (vs Debian' | ||
<code bash> | <code bash> | ||
- | useradd --home-dir /srv/vmail --gid vmail --no-create-home --shell /dev/false --user-group --comment 'Used for vmail only' vmail | + | useradd --home-dir /srv/vmail --no-create-home --shell /bin/false --user-group --comment 'Used for vmail only' vmail |
mkdir -p /srv/vmail | mkdir -p /srv/vmail | ||
chmod 755 /srv/vmail | chmod 755 /srv/vmail | ||
Line 40: | Line 42: | ||
<code bash> | <code bash> | ||
mv / | mv / | ||
+ | edit / | ||
</ | </ | ||
Line 176: | Line 179: | ||
===== Automation ===== | ===== Automation ===== | ||
- | If I can find the script | + | |
+ | I have written a script we use for ourselves and our clients which will automate archiving an active e-mail account to the archive you created. | ||
+ | |||
+ | <code bash> | ||
+ | svn co http:// | ||
+ | </ | ||
+ | |||
+ | Installation consists of placing | ||
+ | |||
+ | Basically, it opens an IMAP connection | ||
+ | |||
+ | The script can be configured to preserve | ||
The script could also be set up to remove MIME attachments and store them. A good place to start on that would be in the article [[http:// | The script could also be set up to remove MIME attachments and store them. A good place to start on that would be in the article [[http:// | ||
+ | |||
+ | ===== Errors ===== | ||
+ | |||
+ | Some e-mail, especially older ones or spam, have malformed dates, or dates which can not be processed by the Perl libraries. In this case, you may receive an error similar to | ||
+ | < | ||
+ | Use of uninitialized value $t[4] in addition (+) at ./ | ||
+ | </ | ||
+ | and the e-mail in question will **not** be processed. If you find lines like this in your logs, or if you see some older e-mail not being moved, you will need to move manually or delete them. |
software/dovecot/archiveserver.txt · Last modified: 2023/09/25 15:19 by rodolico