Page 1 - Brew, Apache, Mysql, phpMyAdmin
Page 2 - Exim, Dovecot, Spamassassin, Clamav, Roundcube
Page 3 - PowerDNS Recursor and Authoritative Server
Page 4 - Nginx (optional)
Page 5 - PureFTPd and Webalizer (optional)
Page 6 - SSL Certificates using Let'sEncrypt
Page 7 - Upgrading to Catalina 10.15
Upgrades - How to upgrade brew modules
Updates to continue running ECM3 setup on Mojave.
Recently homebrew switched openssl from version 1.0.2+ to 1.1.1+ as their default installation ($ brew install openssl) You need to remove the older version and reinstall the current openssl. All future updates for Mojave will depend on completion of this section.
$ rm -rf /usr/local/Cellar/openssl
$ brew reinstall openssl
$ echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
Close and reopen terminal to confirm which openssl version you have.
$ openssl version
It should say 'OpenSSL 1.1.1+'
For ECM3 database in mysql, minor alteration is required in order to make it compatible with SpamAssassin 3.4.3. That can be accomplished via terminal or by loggin in to your phpmyadmin.
$ mysql -h 127.0.0.1 -u root -pPASSWORD
$ use ecm3;
ALTER TABLE `txrep` CHANGE `count` `msgcount` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `awl` CHANGE `count` `msgcount` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `awl` ADD last_hit timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
Followed by reinstallation of these packages.
exim-4.94.pkg | June 12, 2020 Must use configure file from this package. Also must edit php.ini (see page 2 under exim)
dovecot-2.3.13.pkg | January 7, 2021
SpamAssassin-3.4.4.pkg | Updated January 30, 2020 (Security release)
pdns-4.3.1.pkg | Updated November 29, 2020
For spamassasin 3.4.3 use the new local.cf pref file (edit few things to match your netwrok). Reuse all other config files for exim, dovecot and pdns from your existing installation.
How to update/upgrade various brew modules
Upgrading apache, php, phpmyadmin:$ brew upgrade httpd
$ brew upgrade php
$ brew upgrade phpmyadmin
$ brew upgrade certbot
Restart php and apache and nginx (if you installed it).
$ sudo -s
$ launchctl unload /Library/LaunchDaemons/homebrew.mxcl.php.plist; sleep 1; \
launchctl load /Library/LaunchDaemons/homebrew.mxcl.php.plist
$ nginx -s reload; apachectl -k restart
Upgrading mysql:
$ sudo -s
$ mv /usr/local/Cellar/mysql /usr/local/Cellar/mysql_archive
$ exit
$ brew install mysql
$ sudo -s
$ chown -R _mysql:_mysql /usr/local/var/mysql
$ launchctl unload /Library/LaunchDaemons/net.captainnet.mysql.plist; sleep 1; \
launchctl load /Library/LaunchDaemons/net.captainnet.mysql.plist
If everything installs correctly, you can delete mysql_archive folder. (not effecting data as it resides at /usr/local/var/mysql)
$ sudo rm -r /usr/local/Cellar/mysql_archive
Upgrading clamav:
$ brew upgrade clamav
$ sudo -s
$
chown clamav:admin /usr/local/opt/clamav/share/clamav
$ /usr/local/opt/clamav/bin/freshclam -v
Restart clamd and freshclam. (copy each group as one line after logged in with 'sudo -s')
$ launchctl unload /Library/LaunchDaemons/net.captainnet.clamd.plist; sleep 1; \
launchctl load /Library/LaunchDaemons/net.captainnet.clamd.plist
$ launchctl unload /Library/LaunchDaemons/net.captainnet.freshclam.plist; sleep 1; \
launchctl load /Library/LaunchDaemons/net.captainnet.freshclam.plist
Upgrading nginx (if installed):
$ brew upgrade nginx
$ sudo nginx -s reload