NAME

Mail::Toaster

SYNOPSIS

Everything you need to build a industrial strength mail system.

DESCRIPTION

A collection of perl scripts and modules that are terribly useful for building and maintaining a mail system. Written for FreeBSD, Mac OS X, and Linux. It's become quite useful on other platforms and will grow to support other MTA's (think postfix) in the future.

METHODS

new

    use Mail::Toaster;
	my $toaster = Mail::Toaster->new;

toaster_check

$toaster->toaster_check($conf);

Runs a series of tests to keep your toaster ship shape:

check for processes that should be running.
make sure watcher.log is less than 1MB
make sure ~alias/.qmail-* exist and are not empty
verify multilog log directories are working

learn_mailboxes

This sub trawls through a mail system finding mail messages that have arrived since the last time it ran and passing them through sa-learn to train SpamAssassin what you think is spam versus ham. It make decisions based on settings defined in toaster-watcher.conf.

clean_mailboxes

This sub trawls through a mail system cleaning out old mail messages that exceed some pre-configured threshhold as defined in toaster-watcher.conf.

Peter Brezny suggests adding another option which is good. Set a window during which the cleaning script can run so that it's not running during the highest load times.

service_dir_create

Create the supervised services directory (if it doesn't exist).

$setup->service_dir_create($conf);

Also sets the permissions to 775.

service_dir_test

Makes sure the service directory is set up properly

$setup->service_dir_test($conf);

Also sets the permissions to 775.

supervise_dirs_create

Creates the qmail supervise directories.

$setup->supervise_dirs_create($conf, $debug);

The default directories created are:

$supervise/smtp
$supervise/submit
$supervise/send
$supervise/pop3

unless otherwise specified in $conf

email_send

Email test routines for testing a mail toaster installation.

$toaster->email_send($conf, "clean" );
$toaster->email_send($conf, "spam"  );
$toaster->email_send($conf, "attach");
$toaster->email_send($conf, "virus" );
$toaster->email_send($conf, "clam"  );

This sends a test email of a specified type to the email address configured in toaster-watcher.conf.

AUTHOR

Matt Simerson <matt@tnpi.biz>

BUGS

None known. Report any to matt@tnpi.biz.

TODO

Add support for Darwin (MacOS X) - done
Add support for Linux - done
Update openssl & courier ssl .cnf files
Install an optional stub DNS resolver (dnscache)

SEE ALSO

The following are man (perldoc) pages:

Mail::Toaster 
Mail::Toaster::Conf
toaster.conf 
toaster-watcher.conf

http://matt.simerson.net/computing/mail/toaster/

COPYRIGHT

Copyright (c) 2004-2005, The Network People, Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of the The Network People, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.