Desired State
- We want to have a running mail server that is integrated with an OPNSense firewall and terminates SSL for web services (RoundCube / iRedmail Admin) on the firewall using HAProxy.
- Able to reach the mailboxes from anywhere via IMAP.
- Send emails via a free SMTP relay to avoid getting on spam lists.
Expected Gear / Skills
- Proxmox (or you can run iRedMail on another Hypervisor or bare-bone)
- OPNSense (whether virtualized or bare-bone does not matter for this set up) – the steps will work similarly with Pfsense as well.
- At least 3 GB RAM available for iRedMail and all the software that it comes with
- HAProxy (in this guide, we will use HAProxy as a plugin of OPNSense).
- A free CloudFlare account with your domain name servers using CloudFlare.
- Basic Linux skills (Debian) are recommended (all required steps are covered with screenshots).
- Your ISP or VPS provider do not block ports 25 (SMTP in), 465/587 (SMTPS out), 993 (IMAP), 80/443 (HTTP/HTTPS). If you are using a hosted VPS, check with them that especially port 25 (TCP) can be opened to avoid disappointment.
- About 3 hours of your time to go through the entire guide (if things go according to plan).
What you do NOT need
- Static IP by your ISP or VPS hosting provider – we will counter that by having Dynamic DNS set up.
- Database skills (we will be using MariaDB SQL and will not be needing any DB commands for the set up).
- Previous experience of working with Postfix, Dovecot, iRedMail Admin, Nginx, HAProxy (if running on OPNSense where we can utilize its GUI).