Configure the network interfaces:
esr# config
esr(config)# interface gi1/0/1
esr(config-if-gi)# ip address 95.171.220.11/18
esr(config-if-gi)# ip firewall disable
esr(config-if-gi)# exit
esr(config)# interface gi1/0/2
esr(config-if-te)# ip address 192.168.1.1/24
esr(config-if-te)# ip firewall disable
esr(config-if-te)# exit
Configure the network name, domain name and DNS settings. The network name and domain name must form
the FQDN Fully Qualified Domain Name), prescribed in the MX record for the domain eltex-co.ru:
esr(config)# hostname mail-gate
esr(config)# domain name eltex-co.ru
esr(config)# domain name-server 1.1.1.1
esr(config)# domain lookup enable
Create a profile for the "Antispam" service that will add an X-Spam header to emails identified as spam:
esr(config)# security antispam profile SimpleProfile
esr(config-antispam-profile)# description "Basic Antispam profile without rules"
esr(config-antispam-profile)# mark-type header
esr(config-antispam-profile)# exit
Create a mail domain, which will be configured to process emails for the eltex-co.ru domain and retransmit
such emails to the local mail server. Add the "Antispam" service profile created above to the configuration of
the mail domain so that the mail in transit will be analyzed for spam:
esr(config)# mailserver domain MainDomain
esr(config-mailserver-domain)# mail domain eltex-co.ru
esr(config-mailserver-domain)# description "Mail domain eltex-co.ru"
esr(config-mailserver-domain)# mail server ip 192.168.1.10
esr(config-mailserver-domain)# profile antispam SimpleProfile
esr(config-mailserver-domain)# enable
esr(config-mailserver-domain)# exit
Add the domain we created to the mail server configuration and write the settings for TLS:
esr(config)# mailserver
esr(config-mailserver)# domain MainDomain
esr(config-mailserver)# tls keyfile ca ca.crt
esr(config-mailserver)# tls keyfile server-crt server.crt
esr(config-mailserver)# tls keyfile server-key server.key
esr(config-mailserver)# tls enable
esr(config-mailserver)# enable
esr(config-mailserver)# exit
Applying the current configuration will start the service.
The SMTP protocol (TCP port 25) must be enabled on the firewall.