Sysadmin:MailStack
Materials to be installed: Cyrus SASL Apache 2.2 Exim 4.69 Cyrus 2.2.13 Spamassassin 3.16 Clamav .93
install Cyrus SASL from /usr/ports/security/cyrus-sasl2-saslauthd Add: saslauthd_enable="YES" saslauthd_flags="-a getpwent" to /etc/rc.conf
start sasl by using /usr/local/etc/rc.d/saslauthd start Install Spamassassin from /usr/ports/mail/p5-Mail-SpamAssin/ make install Add: spamd_enable="YES" to /etc/rc.conf Check that spamd (the daemon for spamassin) is running cd /usr/local/etc/rc.d/ rehash ./sa sa-spamd* saslauthd* ./sa-spamd start ./sa-spamd status
Install ClamAV from /usr/ports/security/clamav make install Add: clamav_clamd_enable="YES" clamav_freshclam_enable="YES" to /etc/rc.conf Overwrite /usr/local/etc/clamd.conf with my version (/) Start clamd and freshclam /usr/local/etc/rc.d/clamav-clamd start /usr/local/etc/rc.d/clamav-freshclam start
Install Exim from /usr/ports/mail/exim make -DWITH_CONTENT_SCAN -DWITH_SASLAUTHD install replace /usr/local/etc/exim/configure with my copy(/)
stop sendmail if running /usr/local/etc/rc.d/sendmail stop edit /etc/rc.conf so that sendmail_enable="NO" sendmail_submit_enable="NO" sendmail_outbound_enable="NO" sendmail_msp_queue_enable="NO" exim_enable="YES" the above options are true
replace /etc/mail/mailer.conf with my copy (/)
Create quarantine directories: mkdir -p /var/quarantine/{malware,spam} chown mailnull:mail /var/quarantine/{malware,spam}
cd to /usr/local/etc/ssl
(if this does not exist install ssl)
openssl req -x509 -nodes -newkey rsa:1024 -keyout mycert.pem -out mycert.pem
restart exim: /usr/local/etc/rc.d/exim restart test exim: exim -bd -d
Install cyrus-imapd from /usr/ports/mail/cyrus-imapd22
make install
overwrite /usr/local/etc/imapd.conf and cyrus.conf with my copies(/)
create a user cyrus(?)
Install apache 2.2 from /usr/ports/www/apache22/ make install
Install php5 from /usr/ports/lang/php5 make install
Install php5 extensions from /usr/ports/lang/php5/extensions make config IMPORTANT: select: ctype, dom, filter, hash, iconv, imap, json, openssl, pdo, pdo_sqlite, posix, pspell, session, simplexml, spl, sqlite, tokenizer, xml, xmlreader, xmlwriter (quark also has: curl, (no dom), exif, gettext, gmp, mysql, pcre, (no pdo_sqlite), pgsql, (no pspell), sockets, (no sqlite), sysvmsg, sysvsem,sysvshm, xmlrpc, xsl, zip, zlib) make install
add the following two lines to the end of lthe LoadModule section of /usr/local/etc/apache22/ AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
copy /usr/local/etc/php.ini-recommended to /usr/local/etc/php.ini
start apache with: apachectl start
Create a key for use with ssl in Apache openssl genrsa -aes256 -out /usr/local/apache2/conf/server.key 1024
Install squirrelmail 1.5 from /usr/ports/mail/squirrelmail-devel/ make install
run allplugin.sh
run /usr/local/www/squirrelmail-devel/config/conf.pl and enable desired plugins (see notes for ones that dont work)
After all users are created on the machine create a list of usernames (one per line) and feed them to batchmigrate.pl while running as either cyrus or admin (?)
Install nmh from http://download.savannah.gnu.org/releases/nmh/ (suddenly in active development?)