Mail::Toaster::Setup
The meat and potatoes of toaster_setup.pl. This is where the majority of the work gets done. Big chunks of the code got moved here, mainly because toaster_setup.pl was getting rather unwieldly. Of course, the added benefit is that it required me to clean up the code considerably. It's now in nice tidy little subroutines that are pretty easy to read and understand.
use Mail::Toaster::Setup;
InstallPhpMyAdmin($conf);
Installs PhpMyAdmin for you, based on your settings in toaster-watcher.conf. The actual code that does the work is in MATT::Mysql so read the man page for MATT::Mysql for more info.
use Mail::Toaster::Setup;
InstallVqadmin($conf);
Installs vqadmin from ports. Passes along any settings you've stored in toaster-watcher.conf.
use Mail::Toaster::Setup;
InstallMysqld($conf);
Installs mysql server for you, based on your settings in toaster-watcher.conf. The actual code that does the work is in MATT::Mysql so read the man page for MATT::Mysql for more info.
use Mail::Toaster::Setup;
InstallSources($conf, $toaster);
Update your FreeBSD source tree (/usr/src). Uses cvsup_fastest to pick the fastest server in your country and then updates from there.
use MATT::Apache; # moved from here to MATT::Apache
ApacheConfPatch; # delete this sub at some point
use Mail::Toaster::Setup;
InstallMATTBundle;
Downloads and installs the latest version of MATT::Bundle.
use Mail::Toaster::Setup;
InstallRRDutil;
Checks and installs all missing programs upon which RRDutil depends (rrdtool, net-snmp, Net::SNMP, Time::Date) and then downloads and installs the latest version of RRDutil.
use Mail::Toaster::Setup;
InstallPorts($conf, $toaster);
Install the FreeBSD ports tree and update it via cvsup. Optionally uses cvsup_fastest to choose the fastest cvsup server to mirror from.
Also installs the portupgrade port to use for updating your legacy installed ports.
use Mail::Toaster::Setup;
InstallApache($version, $srcdir);
Calls MATT::Apache::InstallApache[1|2] which then builds and installs the apropriate Apache for you.
use Mail::Toaster::Setup;
InstallVpopmail($version, $srcdir, $conf);
Vpopmail is great, but it has lots of options and remembering which option you used months or years ago to build the mail server isn't always easy. So, store all the settings in toaster-watcher.conf and this sub will install vpopmail for you honoring all your settings.
If you don't have toaster-watcher.conf installed, it'll ask you a series of questions and then install based on your answers.
Checks a three place version string like 5.3.24 to see if the current version is newer than some value. Useful when you have various version of a program like vpopmail or mysql and the syntax you need to use for building it is different for differing version of the software.
use Mail::Toaster::Setup;
SetupVmysql(replication, master, slave, user, pass);
Version of vpopmail less than 5.2.26 (or thereabouts) required you to manually edit vmysql.h to set your mysql login parameters. This sub modifies that file for you.
use Mail::Toaster::Setup;
InstallMailLogs($conf);
Installs the maillogs script, creats the logging directories (/var/log/mail/*), creates the qmail supervise dirs, installs maillogs as a log post-process and then builds the corresponding service/log/run file to use the post-processor.
use Mail::Toaster::Setup;
InstallSockLog($conf, $ip);
If you need to use socklog, then you'll appreciate how nicely this configures it. :)
use Mail::Toaster::Setup;
InstallSocklogQmailControl($service, $ip, $user, $supervisedir);
Builds a service/log/run file for use with socklog.
use Mail::Toaster::Setup;
InstallFilter($conf);
Installs SpamAssassin, ClamAV, QmailScanner, maildrop, procmail, and programs that support the aforementioned ones.
use Mail::Toaster::Setup;
InstallMaildropFiles($toaster_site_url);
Installs a maildrop filter in /usr/local/etc/mail/mailfilter, a script for use with Courier-IMAP in /usr/local/sbin/subscribeIMAP.sh, and sets up a filter debugging file in /var/log/mail/maildrop.log.
use Mail::Toaster::Setup;
ConfigSpamAssassin();
Shows this URL: http://www.yrex.com/spam/spamconfig.php
use Mail::Toaster::Setup;
ConfigQmailScanner;
prints out a note telling you how to enable qmail-scanner.
use Mail::Toaster::Setup;
InstallQmailScanner($ver, $src, $conf);
use Mail::Toaster::Setup;
InstallClamAV($conf);
use Mail::Toaster::Setup;
InstallToasterDependencies($conf);
Installs a bunch of programs that are needed by subsequent programs we'll be installing. You can install these yourself if you'd like, this doesn't do anything special beyond installing them:
ispell, gdbm, setquota, autoconf, automake, expect, gnupg, maildrop, mysql-client(3), autorespond, qmail, qmailanalog, daemontools, openldap-client, Compress::Zlib, Crypt::PasswdMD5, HTML::Template, Net::DNS, Crypt::OpenSSL-RSA, DBI, DBD::mysql, TimeDate.
use Mail::Toaster::Setup;
InstallCourier($package, $conf);
Installs courier imap based on your settings in toaster-watcher.conf.
use Mail::Toaster::Setup;
SourceWarning($package, $clean, $src);
use Mail::Toaster::Setup;
InstallSqwebmail($version, $conf);
InstallSqwebmail based on your settings in toaster-watcher.conf.
use Mail::Toaster::Setup;
InstallQmailadmin($version, $conf);
Install qmailadmin based on your settings in toaster-watcher.conf.
use Mail::Toaster::Setup;
InstallUCSPI($conf);
Installs ucspi-tcp with my (Matt Simerson) MySQL patch.
use Mail::Toaster::Setup;
InstallEzmlm($conf);
Installs Ezmlm-idx. This also tweaks the port Makefile so that it'll build against MySQL 4.0 libraries as if you don't have MySQL 3 installed. It also copies the sample config files into place so that you have some default settings.
use Mail::Toaster::Setup;
ConfigCourier($confdir);
Does all the post-install configuration of Courier IMAP.
use Mail::Toaster::Setup;
ConfigVpopmailEtc($conf);
use Mail::Toaster::Setup;
InstallSupervise($conf);
use Mail::Toaster::Setup;
InstallSupervise($conf);
use Mail::Toaster::Setup;
ConfigureServices($conf, $supervise);
use Mail::Toaster::Setup;
CreateSuperviseDirs($supervise);
use Mail::Toaster::Setup;
InstallQmail($package, $src, $conf);
Builds and installs qmail with the qmail toaster patches (based on your settings in toaster-watcher.conf), installs the SSL certs, adjusts the permissions of several files that need it.
Matt Simerson - matt@tnpi.biz
None known. Report any to matt@cadillac.net.
Documentation. Needs more documenation.
http://matt.simerson.net/computing/mail/toaster/
Mail::Toaster::CGI, Mail::Toaster::DNS, Mail::Toaster::Logs, Mail::Toaster::Qmail, Mail::Toaster::Setup
Copyright 2001 - 2003, The Network People, Inc. All Right Reserved.