To use the plan9port version of upas/smtp with authenticated connections, you need a couple of fixes which I've just submitted. 'hg pull -u' will get them.
The plan9port upas/smtp also does not support tls, which is required by gmail. The workaround is to run smtp inside a tls tunnel, as shown below. Note that you can't use 'localhost' to address the near end of the tunnel because smtp doesn't like forwarding to 127.0.0.1. bash-3.1$ hostname epia bash-3.1$ cat msg Subject: test hello bash-3.1$ 9p read factotum/ctl key proto=pass role=client server=epia service=smtp user=exam...@gmail.com !password? bash-3.1$ sudo /usr/sbin/stunnel3 -c -d 12345 -r smtp.gmail.com:465 bash-3.1$ $PLAN9/bin/upas/smtp -ai 'tcp!epia!12345' 9f...@hamnavoe.com x...@example.com <msg epia Aug 31 15:01:34 9f...@hamnavoe.com sent 127 bytes to x...@example.com