User Tools

Site Tools


computing:mailclient

This is an old revision of the document!


# 1. Main configuration

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

# 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

computing/mailclient.1776567177.txt.gz · Last modified: by oemb1905