Chapter 7. Control and insight into powermail

7.1. pptool

A large powermail installation might well span tens of hosts and see thousands of mailboxes created and deleted each week. To cope with this, the program pptool has been provided.

As pptool also reads the common configuration file, it is aware of all backend storage pptalkers available, and can list or modify their contents.

The following commands are available:

status

Lists the status of all pptalkers, including the amount of free diskspace and inodes, the load average and importantly, the read/write status. It also lists the combined amount of diskspace available for writing.

dir [backend1] [backend2]

Lists all mailboxes in all backends. Specific backends can also be listed and only this will be queried then.

orphans

Lists all mailboxes that do exist on backends, but have no entry in the userbase. These mailboxes are 'orphaned' and were not cleaned up properly.

purge

Purges a mailbox, wether it is in the database or not.

purge-orphans

Creates a list of orphans and purges them. Dangerous command!

list mailbox

Lists the message ids in a mailbox and on which backends it is stored, and if redundancy is met

block backend

Sets a backend to blocked, which means that it is administratively read only. No new mail will be accepted at that backend. Useful for phasing out servers, as deletes will be applied. Leaving a backend blocked will slowly empty it as users retrieve and delete mail.

unblock backend

Reverse operation.

usage mailbox

Prints the quota, in kilobytes, of a mailbox followed by its actual usage, separated by a colon. Suitable for machine parsing.

7.1.1. Convenience commands (password hashing)

Besides controling PowerMail nodes, pptool can also be used to calculate UNIX crypt()s and MD5 hashes for use in userbases to store passwords as described in Section 9.1.

crypt password

Prints the UNIX crypt(3) of the password supplied on the commandline.

md5 password

Prints the UNIX md5 hash of the password supplied on the commandline.