Archivemail

Credits

Various bits of code, scripts, and procedures were put together with information from John Simpson's qmail.jms1.net website. It's an excellent resource on managing and setting up a Qmail server.

Archivemail is a utility for archiving and compressing old mail on your server so you can clean up space on your IMAP server without permanently deleting the messages (unless you want to). The messages are put into an mbox file that can be put on a CD/DVD or another computer. If users need to get into the archives, they can use an email client, or a program like mboxview to access their archived mail.

Installation
Download the source tarbal and unpack it:

cd /extra/src
wget http://superb-west.dl.sourceforge.net/sourceforge/archivemail/archivemail-0.7.2.tar.gz
tar zxvf archivemail-0.7.2.tar.gz
cd archivemail-0.7.2

Install the software:

python setup.py install

Usage
The archivemail manpage (also installed with the binaries) details all the various execution options. Some useful flags when running it are:

-n, --dry-run
Don't write to any files, just show what would result. Use this while you are figuring out how to use the program, especially on a production server!

-d NUM, --days=NUM
Archive messages older than NUM days. The default is 180. This option is incompatible with the --date option below.

-D <em>DATE</em>, --date=<em>DATE</em>
Archive messages older than <em>DATE</em>, a date string is ISO format ("2002-04-23"), Internet format ("23 Apr 2002") or Internet format with full month names ("23 April 2002"). Two-digit years are not supported.

-o PATH, --output-dir=PATH
Use the directory name PATH to store the mailbox archives. The default is the same directory as the mailbox to be read.

-s NAME, --suffix=NAME
Use the suffix NAME to create the filename used for archives. The default is _archive. For example, if you run archivemail on a mailbox called exsouthrock, the archive will be created with the filename exsouthrock_archive.gz. The manpage shows a bunch of wildcards that can be used for filename generation.

--delete
Delete rather than archive old mail. Use this option with caution!

--no-compress
Don't compress the messages
Usage Example
archivemail -n -d 1 -o /tmp/archive/ /home/vpopmail/domains/example.com/myuser/Maildir

Recent Updates

  • 8 months 3 weeks ago
    1.27.2 update
  • 9 months 6 days ago
    Drupal 10/11 config
  • 9 months 1 week ago
  • PHP
    9 months 1 week ago
    PHP 8.3.11 and AlmaLinux
  • 9 months 1 week ago
    New version of Pound