Thanks for the additional info. I find the official Debian documentation well intentioned, but sometimes you're just not sure if it's relevant or out of date.
I'm not sure what package Moodle uses to send email when using another server as an SMTP host. But it's currently working OK for me now and I'm getting Moodle update notifications and user-to-user messages via email.
A quick look suggests that it's exim4, but I'm not sure that Moodle's using it.
I'm sure my iptables config is OK now (as in my last post) and not too open on the local network. I'm glad I'm not trying to do anything too complicated with it.