Configure Email and DNS (Sysadmin)¶
The System Admin module (sometimes called "Sysadmin Pro" — separate from the menu category "System Admin") manages host-level settings: SMTP relay (for VM-to-email and notifications), DNS resolvers, time zone, network interfaces, hostname, intrusion detection.
Before You Start¶
- Decide which SMTP relay to use (Gmail with app password, Sangoma SMTP, an internal mail server, SendGrid, etc.).
- For DNS: prefer 1.1.1.1 / 1.0.0.1 (Cloudflare) or 8.8.8.8 / 8.8.4.4 (Google) over carrier defaults.
Steps¶
Email setup¶
- Go to System Admin → Sysadmin → Email Setup tab.
- Pick SMTP Configuration:
- No relay — Postfix delivers directly. Often blocked by recipient mail servers (no SPF/DKIM). Don't use for production.
- SMTP Relay — recommended. Fill in:
- Server — e.g.
smtp.gmail.com:587,smtp.sendgrid.net:587. - Username — sending email address (e.g.
notifications@example.com). - Password — app password / API key.
- Use TLS —
Yesfor port 587.
- Server — e.g.
- From Address — what
From:header to set on outbound emails. Should match a sending address allowed by the relay. - Click Submit.
- Test:
echo "test message" | mail -s "Test from UnifiedBX" you@example.com
tail -f /var/log/maillog
DNS setup¶
- Sysadmin → Network Settings tab.
- DNS section:
- DNS 1 —
1.1.1.1. - DNS 2 —
8.8.8.8.
- DNS 1 —
- Click Submit. Tests resolution immediately.
Time zone & NTP¶
- Sysadmin → Time Zone tab.
- Pick zone (
America/New_Yorkfor ET). - NTP server —
pool.ntp.orgis the default, fine for most. - Submit. System time syncs.
Hostname¶
- Sysadmin → Hostname tab.
- Set the FQDN (e.g.
pbx.client.com). Should match DNS records and any TLS certs. - Submit. System will need a reload.
Intrusion Detection (Fail2ban)¶
- Sysadmin → Intrusion Detection tab.
- Toggle on. Default rules block SIP/SSH/HTTP brute force.
- Whitelist — your management IPs (CRITICAL — don't lock yourself out).
- Ban duration —
1 houris reasonable. - Submit.
Verify¶
- Email: send a test VM, confirm email arrives.
- DNS:
dig google.comfrom the host. - Time:
dateshows correct local time. - Hostname:
hostname -fshows full FQDN.
Common Issues¶
- Test email "permission denied." Postfix can't write spool.
chown -R postfix:postfix /var/spool/postfix/and restart Postfix. - Email shows in
/var/log/maillogas "deferred." Relay rejecting auth. Check username/password; for Gmail, must be an "App Password," not the account password (and 2FA must be on). - DNS resolution intermittently fails. Both DNS servers down or slow. Add a third in
/etc/resolv.confmanually (Sysadmin only stores 2). - Fail2ban blocks legit users. Add their IP to whitelist. Or check
/var/log/fail2ban.logfor what triggered. - Hostname change breaks Apache. Cert SAN no longer matches. Regenerate Let's Encrypt cert with new hostname.