Server side socat tcp4-listen:5353,reuseaddr,fork UDP:nameserver:53

Client side: socat -T15 udp4-recvfrom:53,reuseaddr,fork tcp:localhost:5353

ssh tunneling

ssh -f -L -N

The -f tells ssh to go into the background just before it executes the command. This is followed by the username and server you are logging into. The -L is in the form of -L local-port:host:remote-port. Finally the -N instructs OpenSSH to not execute a command on the remote system

This essentially forwards the local port 2000 to port 25 on over, with nice benefit of being encrypted. I then simply point my E-mail client to use localhost:2000 as the SMTP server and we’re off to the races.