Hi,
I'm probably missing something here, but this isn't any kind of exploit that I can see.... it's how SMTP works?? Like Scott said, this is no different to telneting to ports 80 to check that the webserver is working, to 110 to check that the POP server is working.
If you have to authenticate to connect to the SMTP server, how would remote servers forward email? How does can Qmail possibly know the difference between an SMTP server and a telnet session??
Unfortunately Qmail, being a cobbled together piecemeal solution of dozens of patches, that (due to DJB being a bit daft) has been patched to death for the last 10+ years doesn't have some of the niceties that things like Postfix have.
On my previous mail server, I refused to use Plesk Qmail and used my own Postfix setup, it meant that users had a different GUI to do their mail stuff, so it wasn't as neat. But it supports nice stuff which helps to prevent non-SMTP hosts connecting, like:
reject_non_fqdn_sender
reject_non_fqdn_recipient
reject_non_fqdn_hostname
reject_unauth_pipelining
reject_invalid_hostname
reject_unknown_sender_domain
reject_unknown_recipient_domain
These simple postfix rules eliminate a whole host of nonsense (especially the reject_non_fqdn_hostname because most PCs in Botnets don't resolve properly to full reverse lookups), I've been (and so have many others) been campaigning for a Postfix option (in addition to Qmail not instead of Qmail) on Plesk, so people that want to use a currently maintained MTA based on current technology and thinking, can choose to use Postfix over Qmail. In this way, anyone setting up a new mail server has the option of postfix, and anyone migrating keeps the option of Qmail.
Anyway ... in summary, it's the way SMTP works, there is no exploit here. If you fix the "security hole" you'll never receive SPAM again (or any other email for that matter)
Regarding Spamassassin the default config under Plesk (at least in 8.1.x) Qmail seems to be for SA to check everything in coming from SMTP, as you can see below, I created an email using the method outlined originally, these are the headers:
####
X-Spam-Status: No, score=5.8 required=6.0 tests=BAYES_20,MISSING_HB_SEP,
MISSING_SUBJECT,RCVD_IN_SORBS_DUL,TO_CC_NONE autolearn=no version=3.1.8
Received: (qmail 8010 invoked by uid 10014); 18 May 2007 10:42:19 +0100
Received: from 127.0.0.1 by smtp.tumtetumtedah.com (envelope-from <
foo@bar.com>, uid 110) with qmail-scanner-2.01st
(clamdscan: 0.90.1/3267. spamassassin: 3.1.8. perlscan: 2.01st.
Clear:RC:1(127.0.0.1):.
Processed in 0.024611 secs); 18 May 2007 09:42:19 -0000
####
Just my 2 Cents...
Cheers
T.