cat <<'EOF'
Usage: mail-route up|down|show
-Marks tcp packets on port 25 and 143 to be routed through
+Marks tcp packets on port 25, 143 and 587 to be routed through
a vpn ip. If called from --up/--down in openvpn, (we have multiple args) $1 is the
tun_dev, and action is from $script_type.
modify() {
# match source or dest port. note, when we send to a port, it picks a random high port as
# the source.
- for port in 25 143; do # smtp and imap.
+ for port in 25 143 587; do # smtp and imap.
iptcommon="OUTPUT -m tcp -p tcp -m multiport --ports $port -j MARK --set-mark"
iptmod iptables -t mangle $iptables_op $iptcommon 0x1
iptmod iptables -t mangle $iptables_op $iptcommon 0x0 -d 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16