This is an old revision of the document!
# 1. Main configuration for exim
cat << 'EOF' | sudo tee /etc/exim4/update-exim4.conf.conf dc_eximconfig_configtype='satellite' dc_smarthost='mail.haacksnetworking.org::587' dc_local_interfaces='127.0.0.1 ; ::1' dc_other_hostnames='' dc_readhost='haacksnetworking.org' dc_relay_domains='' dc_minimaldns='false' dc_hide_mailname='true' dc_localdelivery='net@haacksnetworking.org' EOF
Local delivery is there as a placeholder but/and is ignored as per the localmacros entry below. It is harmless and in some cases I enable it and remove the other entry, etc., so its retained here. The rest are self-explanatory. It should be noted that exim4 currently has a bug whereby it cannot properly interpret ipv6 entries and/or bind to the ipv6-ready interface, so I disabled it for now. For some, this is a routing issue, but my routing table is good and it still does not work:
Despite formatting it as the man pages and ncurses installer suggest, e.g., dc_smarthost='[2046::1bd7::f::6::::20]::587', it nevertheless interprets the IP as a domain and tries to do a DNS check on it. I plan to remove the ipv6 block once this fixed and/or I discover a work-around.
# 2. Local macros
cat << 'EOF' | sudo tee /etc/exim4/exim4.conf.localmacros MAIN_TLS_ADVERTISE_HOSTS = REMOTE_SMTP_SMARTHOST_HOSTS_REQUIRE_TLS = * MAIN_LOCAL_DOMAINS = disable_ipv6 = true EOF
# 3. Password file
cat << 'EOF' | sudo tee /etc/exim4/passwd.client mail.haacksnetworking.org:net:pass *:net:pass EOF
# 4. Email address rewriting
cat << 'EOF' | sudo tee /etc/email-addresses sexa: net@haacksnetworking.org root: net@haacksnetworking.org *: net@haacksnetworking.org EOF
# 5. Set mailname
echo "net.outsidebox.vip" | sudo tee /etc/mailname echo "net.outsidebox.vip" | sudo tee /etc/hostname
Make sure alias and fqdn are also specified properly in /etc/hosts.
# 6. Fix permissions and apply
sudo chown root:Debian-exim /etc/exim4/passwd.client sudo chmod 640 /etc/exim4/passwd.client sudo update-exim4.conf sudo systemctl restart exim4
# 7. Configure the remote mailserver to accept email from the subdomain and/or other IP of the client:
nano /etc/postfix/main.cf
mydestination = mail.haacksnetworking.org,
haacksnetworking.org,
mail.haacksnetworking.org,
node0.otherdomain.org, #accept system email sent to your node's "local" address
node1.otherdomain.com, #accept system email sent to your node's "local" address
localhost.haacksnetworking.org,
localhost
sudo systemctl restart postfix
System emails default to root@sub.domain.org or root@net.outsidebox.vip for example. Unless you approve that envelope, the message will be rejected. If you approve it like in my example above, then mail.haacksnetworking.org accepts the email for the corresponding “user” or in this case “net”. If you also want to send and respond and use this subdomain in webmail, you can set up A/MX and do so (I'm not). The point of this last part is just that it ensures system email from root@whatevernode.whateverdomain.com arrives to the corresponding user on mail.haacksnetworking.org. In my case, that's typically “root” and then root is aliased to notifications@haacksnetworking.org. In this way, every node feeds into a common monitoring email/system.
— oemb1905 2026/04/19 02:38