User Tools

Site Tools


networking:router:mikrotik_mail

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
networking:router:mikrotik_mail [2017/07/06 15:09]
gcooper
networking:router:mikrotik_mail [2018/05/25 09:35] (current)
gcooper
Line 1: Line 1:
-====== Mikrotik Routers and Mail Issues ======+====== Mikrotik Routers Solving Mail Issues ====== 
 + 
 +  - **Define list of spam filter servers** 
 +    * Allowed to send mail to our internal mail server 
 +  - **Forward inbound SMTP traffic** to internal mail server 
 +    * But only from the spam filter servers 
 +  - **Block outbound SMTP traffic** 
 +    * But not from the internal mail server 
 + 
 +<note tip>These are the **MSP Mail** (MaxMail) IP address ranges.</note> 
 + 
 +===== Example Configuration ===== 
 + 
 +^192.168.51.8    |Internal Mail Server IP address | 
 +^ether1          |Mikrotik WAN interface          | 
 +^123.123.123.123 |External (Public) IP Address    | 
 + 
 +FIXME You can use hostnames in newer versions of RouterOS. 
 + 
 +:!: You must **adjust as necessary** (copy->edit->paste).
  
 <file> <file>
Line 16: Line 35:
 add address=208.70.91.0/24 list=spamfilter add address=208.70.91.0/24 list=spamfilter
  
 +/ip firewall filter
 +add action=drop chain=forward comment="Drop Outbound SMTP Except From Mail Server" dst-port=25 \
 +  out-interface=ether1 protocol=tcp src-address=!192.168.51.8
  
 +/ip firewall nat
 +add action=dst-nat chain=dstnat comment="Forward SMTP to Mail Server" dst-address=123.123.123.123 \
 +  dst-port=25 in-interface=ether1 protocol=tcp src-address-list=spamfilter to-addresses=192.168.51.8
 </file> </file>
networking/router/mikrotik_mail.1499375357.txt.gz · Last modified: 2017/07/06 15:09 by gcooper