Step 1: Get Perl happy.

Certain features (like spam filtering) require perl 5.6.1 or higher to function fully. If perl -v reflects anything smaller than 5.6.1, do the following:

        pkg_add -r perl  (on FreeBSD 5+)
        or
        cd /usr/ports/lang/perl5
        make install clean
        use.perl port

We'll also need to CPAN working for installing perl modules so make sure it's configured. If the following command doesn't give you a prompt, then you'll be prompted to configure.

        perl -MCPAN -e shell
        exit


Step 2: Install MATT::Bundle.

http://www.tnpi.biz/computing/perl/MATT-Bundle/MATT-Bundle.tar.gz

        perl Makefile.PL
        make install

On upgrades (ie, you have MATT::Bundle & toaster_setup installed), you can run:

        toaster_setup -s mattbundle


Step 3: Install Mail::Toaster

http://www.tnpi.biz/internet/mail/toaster/Mail-Toaster.tar.gz

        perl Makefile.PL
        make install
        make conf  (newconf for new installs)
        make cgi
        rehash; toaster_setup.pl -s pre

See http://mail.cadillac.net for an example of index.cgi.


Step 4: Edit config files

        vi /usr/local/etc/toaster.conf
        vi /usr/local/etc/toaster-watcher.conf

or for upgrades, update your config files:

    cd /usr/local/etc
    diff toaster-watcher.conf toaster-watcher.conf-dist
    diff toaster.conf toaster.conf-dist


Step 5: Update your ports tree.

        toaster_setup.pl -s ports


Step 6: Install a few things

        toaster_setup.pl -s mysql
        toaster_setup.pl -s [ apache | apache2 ]
        toaster_setup.pl -s apachessl (creates ssl certs)
        toaster_setup.pl -s phpmyadmin (if desired)
        toaster_setup.pl -s ucspi
        toaster_setup.pl -s ezmlm 
        toaster_setup.pl -s vpopmail
        toaster_setup.pl -s qmailadmin


Step 7: Install Qmail

patch info: http://www.tnpi.biz/internet/mail/toaster/patches/

        toaster_setup.pl -s qmail


Step 8: Install Web/POP3/IMAP servers

        toaster_setup.pl -s squirrelmail
        toaster_setup.pl -s sqwebmail
        toaster_setup.pl -s courier


Step 9: Configure Courier-IMAP (new installs only)

        cd /usr/local/etc/courier-imap
        vi pop3d.cnf imapd.cnf quotawarnmsg
        cd /usr/local/share/courier-imap
        ./mkimapdcert; ./mkpop3dcert


Step 10: Set up mail filtering and logging

        toaster_setup.pl -s filter
        toaster_setup.pl -s supervise
        toaster_setup.pl -s maillogs
        toaster_setup.pl -s rrdutil (optional)


Step 11: Add cron entries

 crontab -u root -e
  9-59/10 * * * * /usr/local/vpopmail/bin/clearopensmtp
  40 * * * * /usr/local/share/sqwebmail/cleancache.pl
  */5  * * *  *  /usr/local/sbin/toaster-watcher.pl
  */5 * * * * /usr/local/www/cgi-bin/rrdutil.cgi -a update

You should run all these commands from the command line and verify their proper functionality (ie, no complaints or errors) BEFORE adding to cron.


Step 12: Continue with Configuration.

See the file CONFIGURE or visit this URL: http://www.tnpi.biz/internet/mail/toaster/config.shtml Skipping this step is guaranteed to make you unhappy. :)