Using linode to send mail from dynamic IP hosts
iptables -t mangle -I OUTPUT -p tcp –dport 25 -j MARK --set-mark 0x1a
iptables -t mangle -I OUTPUT -p tcp -d 10.0.0.0/24 --dport 25 -j ACCEPT
iptables -t mangle -I OUTPUT -p tcp -d 127.0.0.1 --dport 25 -j ACCEPT
iptables -t nat -I POSTROUTING -m mark --mark 0x1a -j SNAT --to-source 10.8.0.2
[root@sphinx iproute2]# ip rule list
0: from all lookup local
32765: from all fwmark 0x1a lookup mail.out <=== new rule
32766: from all lookup main
32767: from all lookup default
on the linode:
/sbin/iptables -t nat -I POSTROUTING -o eth0 -j SNAT -p tcp –to-source $PUBLIC_IP
Another way is to not have a local server, and just have your client access your linode. The downside is that the client you like may not support SMTP AUTH, and that each client has to be configured.
Another way is UUCP, which is pretty easy to set up (with postfix, at least). The good thing about this approach is that all transfers are driven by the home server, whose current IP is irrelevant. It has proven extremely reliable for me. The "downside" is that it's old tech, and has a four-letter-acronym, which everyone knows isn't as good as a TLA.
It seems to me openvpn is just easy to configure than all these old existing technology such as Ipsec, ppptp, etc.