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:
 
./indexer.sh -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:
 
./indexer.sh -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:
 
./indexer.sh -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:
 
./indexer.sh <-v | -a> -p <ap_directory> [-m <max_volumes>] [-s <closed|active>]
usage: indexer.sh
 -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
 
examples:
./indexer.sh -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:
 
./generateemails.sh -s dict/dict.txt -i localhost:8091 -c 100 -d company.com
 
Domain Note: The above requires that you add company.com 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.
 
./generateemails.sh -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]
usage: generateemails.sh
 -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
            dir
 -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
 
examples:
./generateemails.sh -s dict/dict.txt -i 192.168.0.1:8091
sh-3.2# 
 
 

 

© 2005 - 2024 ProProfs

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

-