>> config
>> faq
Hetzner RAID1
tell me
Copyright © Per Jessen, 2003-2006.
Unless otherwise indicated, verbatim
copying and distribution of this entire
article is permitted in any medium,
provided this notice is preserved.

apache Apache/2.2.17 (Linux/SUSE)

Some PMMail stuff

I've used PMMail for years, ever since my OS/2 days. It did take a while before I migrated off PMMAIL/2 and onto PMMail/95, but I've stayed with PMMail (and even recently upgraded to PMMail2000) as it fullfills most of my requirements. I did make an attempt at moving to KMail instead, but it was too much work.

It would be great if the PMMail guys were to produce a Linux-version, but so far they haven't. I use PMMail2000 quite a lot, with multiple accounts and quite a few high-volume mailing-lists, and I wrote a couple of external utilities to help me keep the amount of emails in various folders down. Perhaps you'll find these handy too.


cygwin icon Both of these utilities are plain bash shell scripts, and require the Cygwin package to run. Even if you're not familiar with cygwin, go ahead and install it anyway. It's quite easy to work with.


pmmail-cleanup is used to clean up PMMail folders. It reads a file containing the specification of which folders to clean up, and to what degree. In this context cleanup should be read to mean getting rid of extranenous emails. Generally, this means e.g. emails from high-volume mailing-lists (at least I find that I often skip quite a few emails on such lists), perhaps miscellaneous local system-status emails (from cron etc.) etc. Lately I have found that the automatic emptying of the Trash-folder no longer works in PMMail, so this is another possible cleanup target.

Upon completion of a cleanup operation, a line is added to the folder index (folder.bag) which will cause the status of the operation to be displayed in the mail-folder in PMMail.


./pmmail-cleanup <spec-file>

The format of the specification file is straight forward:

<pmmail folder> <count> [<time>]

Blank lines and lines beginning with '#' are ignored.
<pmmail folder> is the physical location of a PMMail mail-folder.
<count> is the maximum number of emails to be kept in the folder. If the folder contains more than <count> emails, they are deleted.
If <count> is zero, <time> will be used instead to specify the maximum age of emails to be kept. The age is specified as a number of days.


./pmmail-cleanup pmmail-cleanup-list

/cygdrive/d/SouthSoft/PMMail2000/per_c0.act/trash.fld 0 +14 /cygdrive/d/SouthSoft/PMMail2000/per_c0.act/inbox.fld/linux15.FLD/linux0.FLD 0 +7 /cygdrive/d/SouthSoft/PMMail2000/per_c0.act/inbox.fld/linux15.FLD/390_m0.FLD 500 /cygdrive/d/SouthSoft/PMMail2000/per_c0.act/inbox.fld/linux15.FLD/usb_u0.FLD 100 /cygdrive/d/SouthSoft/PMMail2000/per_c0.act/inbox.fld/linux15.FLD/dvb0.FLD 100 /cygdrive/d/SouthSoft/PMMail2000/per_c0.act/inbox.fld/linux15.FLD/usb_d0.FLD 100 /cygdrive/d/SouthSoft/PMMail2000/per_c0.act/inbox.fld/maili0.FLD/gcc_h1.FLD 100 /cygdrive/d/SouthSoft/PMMail2000/per_c0.act/inbox.fld/maili0.FLD/sapdb0.FLD 100 /cygdrive/d/SouthSoft/PMMail2000/per_c0.act/inbox.fld/maili0.FLD/eclip1.FLD 100 /cygdrive/d/SouthSoft/PMMail2000/per_c0.act/inbox.fld/cron0.FLD 0 +7 /cygdrive/d/SouthSoft/PMMail2000/per_c0.act/inbox.fld/possi0.fld/spama0.fld 0 +30 /cygdrive/d/SouthSoft/PMMail2000/per_c0.act/inbox.fld/itjob0.fld 0 +30


pmmail-reindex does pretty much what the name says, i.e. it re-indexes PMMail folders. It is almost equivalent to the PMMail builtin menu-option "Re-index", but only almost. pmmail-reindex will only detect emails that are listed in the folder-index (folder.bag), but not actually found. Emails that are found, but not listed in the index will be ignored. This form of re-indexing is quite fast, and sufficient for taking care of the "upheaval" that pmmail-cleanup creates.

Given a start-folder pmmail-reindex will look for all "folder.bag" files in the tree below, and re-index all of those folders.

Upon completion of af re-indexing operation, a line is added to the folder index (folder.bag) which will cause the status of the re-indexing operation to be displayed in the mail-folder in PMMail.


./pmmail-reindex <start-folder>

PMMail compatibility

Important: pmmail-clean and -reindex have only been tested using PMMail2000 for Windows. I cannot make any guesses as to whether they may or may not work with previous versions.


FilenameSizeLast changedFormat
pmmail-utils.tar.gz7.1K2003/07/09 09:15:56 CESTtar'ed & gzipped
pmmail-utils.zip8.1K2003/07/09 09:15:56 CESTinfo-zip


Both of these utilities are published subject to the GNU Public License.

Last time this page was updated: Monday 20 October 2003 11:10 XHTML 1.1 Conformant! CSS2 Conformant!