Mail::Toaster
Everything you need to build a industrial strength mail system.
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.
use Mail::Toaster; my $toaster = Mail::Toaster->new;
$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
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.
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.
Create the supervised services directory (if it doesn't exist).
$setup->service_dir_create($conf);
Also sets the permissions to 775.
Makes sure the service directory is set up properly
$setup->service_dir_test($conf);
Also sets the permissions to 775.
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 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.
Matt Simerson <matt@tnpi.biz>
None known. Report any to matt@tnpi.biz.
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)
The following are man (perldoc) pages:
Mail::Toaster Mail::Toaster::Conf toaster.conf toaster-watcher.conf
http://matt.simerson.net/computing/mail/toaster/
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.