
D•Jass
Staff member
Verified

- #1
Security Notes
This guide only covers the basic functionality of a mail server.For production use, it is CRITICAL to implement additional security measures that are intentionally NOT included in this basic tutorial.
These additional components should be considered essential in a real-world environment:
Spam protection (e.g., using SpamAssassin)
Antivirus scanning (e.g., with ClamAV)
Proper DNS records for your domain: SPF and DMARC
Postfix: RBL filters and HELO/EHLO validation
Install and configure Fail2ban to block brute-force attacks
Regular backups of mail and configuration files
Monitoring of server health and mail queue
Without these measures, your server is vulnerable to spam, phishing, malware, and may suffer from email deliverability issues or even blacklisting.
A separate Advanced Email Server Hardening Guide will cover these in detail.
Do NOT use a server configured only with this basic guide for handling important or production email without applying the security recommendations above!
Final Checklist and Testing
Once you’ve completed all steps, run through this checklist to verify everything is working:Mail Services
Postfix:systemctl status postfix
ss -tulnp | grep -E ':(25|465|587)\b'
tail -f /var/log/mail.log
Dovecot:
systemctl status dovecot
ss -tulnp | grep -E ':(110|143|993|995)\b'
tail -f /var/log/dovecot.log
OpenDKIM:
ss -lntp | grep 8891
opendkim-testkey -d example.com -s mail -vvv
Web Server and TLS
Verify that and load without certificate errorsEnsure HTTP traffic is redirected to HTTPS
Roundcube Webmail
OpenLog in using a test mailbox (e.g. admin@example.com and its password)
Send an email to an external address (e.g. Gmail or Yandex)
Verify delivery and check if the message lands in the inbox (not spam)
Inspect headers — the email should include a DKIM-Signature
Send a reply from that external address to your test mailbox and verify it appears in Roundcube
DNS Records and Deliverability Tests
Use online tools like:Check that your MX, SPF, and DKIM records are correctly configured and recognized.
If everything passes, the basic setup is complete.
You are now ready to move on to advanced hardening and security configuration!