ECM3 email, web, ftp and
dns server installation on macOS Catalina

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
Upgrades - How to upgrade brew modules


PowerDNS Recursor

(used by spamassassin to do lookups to RBL's via 127.0.0.1)

pkg pdns-recursor-4.5.1.pkg | May 15, 2021
Install via terminal

$ brew install pkg-config lua boost

And finaly start it up.

$ sudo launchctl load /Library/LaunchDaemons/net.captainnet.pdns-recursor.plist

Set the first DNS entry to 127.0.0.1 in your Network Pref Setting. Once it's runnning, test it for lookups through Network Utility or your teminal where you can see your recurser is on '127.0.0.1'.

   
$ dig apple.com



PowerDNS (Optional for doing your own name serving)

pkg pdns-4.4.1.pkg | February 24, 2021pkg poweradmin.zip | February 14, 2021 (works with php 8)

Install via terminal

$ brew install pkg-config lua boost

Edit change mysql root password and your IP address.

EDIT:
$ sudo -s
$ nano /usr/local/powerdns/etc/pdns.conf

gmysql-password=password_here     #add mysql root password
local-address=0.0.0.0             #replace with your public IP address

Create database for poweradmin

mysql -h 127.0.0.1 -u root -pPASSWORD
CREATE database powerdns; use powerdns; \. /usr/local/share/poweradmin/sql/powerdns.sql

EDIT:
$ open -e /usr/local/share/poweradmin/inc/config.inc.php

(Use your root mysql password.)

$db_pass	= 'password_here';  

$ sudo launchctl load /Library/LaunchDaemons/net.captainnet.pdns.plist

http://localhost/poweradmin

Initial username is 'admin' with password 'admin'.

Turn off IPv6

Turn off IPv6 unless you have actually have IPv6 records deployed.

In network preferences rename your active ethernet connection to your IP address. Once that is done and you applied the changes, run the following via terminal where 0.0.0.0 is replaced with your IP.

$ networksetup -setv6off 0.0.0.0



Finally confirm in the "Advanced" network settings that IPv6 is off.