MailArchiva Utilities

The MailArchiva Utilities is a package (separate from MailArchiva), that includes the following command-line utilities:

  • MailArchivaImport migration utility to transfer messages from EML, MBOX, Maildir to MailArchiva
  • Reencrypt - to reencrypt messages using a new password or algorithm
  • GenStat - Generate MailArchiva monthly statistics for all volumes. Useful for planning and ISP billing.
  • DecryptMessages - Runs through an entire volume returning all messages to their original state (i.e. decrypting them)
  • GenerateEmails - Generates thousands of emails for performance testing
  • Indexer -  Indexes volumes independently to MailArchiva


Indexer Utility


Reindexes volumes running on a process independently of MailArchiva.
Note: The indexer utility requires MailArchiva v2.8.4 or higher. 
To reindex a particular instance's closed volumes, use:
./ -v -p /usr/local/mailarchiva/server/webapps/[instancename] -s closed
(Note: if the instance is running, you should only reindex closed volumes)
If you want to output the indexes to another directory:
./ -v -p /usr/local/mailarchiva/server/webapps/[instancename] -i /root/newindexes
(Note: if the instance is running, it is now okay to reindex both active and closed, since the indexes will be outputted to the path specified
by -i. The downside of this approach is that you new indexes will not include newly archived emails while utility is running)
If your audit indexes are corrupt, they can be reindexed as follows:
./ -a -p /usr/local/mailarchiva/server/webapps/[instancename]
If your server is overloaded, you can always adjust the -m parameter. It specifies how many volumes must be reindexed at the same time.
The command line syntax for the indexer utility is as follows:
./ <-v | -a> -p <ap_directory> [-m <max_volumes>] [-s <closed|active>]
 -a         reindex audit index
 -i <arg>   reindex to a specified destination base path
 -m <arg>   max number of simultaneous reindex volumes
 -p <arg>   full mailarchiva application path
 -s <arg>   reindex all volumes with specified status <closed|active>
 -v         reindex volume index
./ -v -p /usr/local/mailarchiva/server/webapps/ROOT -m 4 -s closed



GenerateEmail Utility v1.10 Copyright Valentin Popov / Jamie Band 2010
Utility to generate random emails and forward them to MailArchiva
(for best performance set temp dir [-p option] to RAM disk location)

Generate Emails Utility

Generates randomly generated emails and sends to them to MailArchva for test purposes
To generate 100 emails and send them to MailArchiva's SMTP server listening on port 8091:
./ -s dict/dict.txt -i localhost:8091 -c 100 -d
Domain Note: The above requires that you add to MailArchiva's Domains section.
SMTP Listener Note: If you are running MailArchiva v3, you'll need to create an SMTP listener before the above command will work.
./ -s <dictionary file> [-i <ipaddress> | -f <directory>] -c <no. emails to send> [-d domain] [-e no. email addresses] [-t no. threads] [-p temp directory] [-a]
 -a         attach randomly generated files
 -c <arg>   number of emails to send
 -d <arg>   email domain
 -e <arg>   no. mailboxes
 -f <arg>   location on disk where to store random emails
 -h <arg>   run time application in hours
 -i <arg>   destination ip address, can be 2 hosts
 -k <arg>   minimum message size in kb
 -l <arg>   temp dir location, for best perfomance use RAMDisk, on this
 -m <arg>   maximum message size in kb
 -o <arg>   rcptto email address
 -p <arg>   password
 -s <arg>   full path to dictionary file
 -t <arg>   number of generating threads
 -u <arg>   username
 -x <arg>   mailbox prefix
 -z <arg>   number of sending threads
./ -s dict/dict.txt -i


Was this information helpful?

Found this information useful? Visit to learn more about MailArchiva.

The page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. Please make sure you spelled the page name correctly or use the search box.