NAME

Mail::Toaster::Setup


DESCRIPTION

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.

InstallPhpMyAdmin

        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.

InstallVqadmin

        use Mail::Toaster::Setup;
        InstallVqadmin($conf);

Installs vqadmin from ports. Passes along any settings you've stored in toaster-watcher.conf.

InstallMysqld

        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.

InstallSources

        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.

ApacheConfPatch

        use MATT::Apache;   # moved from here to MATT::Apache
        ApacheConfPatch;    # delete this sub at some point

InstallMATTBundle

        use Mail::Toaster::Setup;
        InstallMATTBundle;

Downloads and installs the latest version of MATT::Bundle.

InstallRRDutil

        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.

InstallPorts

        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.

InstallApache

        use Mail::Toaster::Setup;
        InstallApache($version, $srcdir);

Calls MATT::Apache::InstallApache[1|2] which then builds and installs the apropriate Apache for you.

InstallVpopmail

        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.

is_newer

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.

SetupVmysql

        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.

InstallMailLogs

        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.

InstallSockLog

        use Mail::Toaster::Setup;
        InstallSockLog($conf, $ip);

If you need to use socklog, then you'll appreciate how nicely this configures it. :)

InstallSocklogQmailControl

        use Mail::Toaster::Setup;
        InstallSocklogQmailControl($service, $ip, $user, $supervisedir);

Builds a service/log/run file for use with socklog.

InstallFilter

        use Mail::Toaster::Setup;
        InstallFilter($conf);

Installs SpamAssassin, ClamAV, QmailScanner, maildrop, procmail, and programs that support the aforementioned ones.

InstallMaildropFiles

        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.

ConfigSpamAssassin

        use Mail::Toaster::Setup;
        ConfigSpamAssassin();

Shows this URL: http://www.yrex.com/spam/spamconfig.php

ConfigQmailScanner

        use Mail::Toaster::Setup;
        ConfigQmailScanner;

prints out a note telling you how to enable qmail-scanner.

InstallQmailScanner

        use Mail::Toaster::Setup;
        InstallQmailScanner($ver, $src, $conf);

InstallClamAV

        use Mail::Toaster::Setup;
        InstallClamAV($conf);

InstallToasterDependencies

        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.

InstallCourier

        use Mail::Toaster::Setup;
        InstallCourier($package, $conf);

Installs courier imap based on your settings in toaster-watcher.conf.

SourceWarning

        use Mail::Toaster::Setup;
        SourceWarning($package, $clean, $src);

InstallSqwebmail

        use Mail::Toaster::Setup;
        InstallSqwebmail($version, $conf);

InstallSqwebmail based on your settings in toaster-watcher.conf.

InstallQmailadmin

        use Mail::Toaster::Setup;
        InstallQmailadmin($version, $conf);

Install qmailadmin based on your settings in toaster-watcher.conf.

InstallUCSPI

        use Mail::Toaster::Setup;
        InstallUCSPI($conf);

Installs ucspi-tcp with my (Matt Simerson) MySQL patch.

InstallEzmlm

        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.

ConfigCourier

        use Mail::Toaster::Setup;
        ConfigCourier($confdir);

Does all the post-install configuration of Courier IMAP.

ConfigVpopmailEtc

        use Mail::Toaster::Setup;
        ConfigVpopmailEtc($conf);

InstallSupervise

        use Mail::Toaster::Setup;
        InstallSupervise($conf);

CreateServiceDir

        use Mail::Toaster::Setup;
        InstallSupervise($conf);

ConfigureServices

        use Mail::Toaster::Setup;
        ConfigureServices($conf, $supervise);

CreateSuperviseDirs

        use Mail::Toaster::Setup;
        CreateSuperviseDirs($supervise);

InstallQmail

        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.


AUTHOR

Matt Simerson - matt@tnpi.biz


BUGS

None known. Report any to matt@cadillac.net.


TODO

Documentation. Needs more documenation.


SEE ALSO

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

Mail::Toaster::CGI, Mail::Toaster::DNS, Mail::Toaster::Logs, Mail::Toaster::Qmail, Mail::Toaster::Setup


COPYRIGHT

Copyright 2001 - 2003, The Network People, Inc. All Right Reserved.