In this blog we will look into building smtp scanner gateway based on Postfix, Mailscanner , spamassassin and clamav. In this example we have CenOS 7 minimal deployed on the internal network. Perimeter firewall is setup with NAT translating public IP port 25 to internal mailscanner gateway 192.168.0.5. Internal Mail server itself can run any MTA for example postfix or Exchange and is assigned IP 192.168.0.23. Internal domain name will be toys.com. Mailscanner will be setup to scan outgoing and incoming messages for spam and malware. We will also seup webmin for easy system maintenance and configuration.Basic system configuration

First we will start by removing firewalld and install iptables. We will then open correct ports. Next we will disable selinux and do complete update. This steps are not necessary and you can configure selinux and firewall to work with this configuration but to make deployment quicker we will not use this features for now.