Disable pop-before-smtp?

Greetings,

Does anyone know if there is a way to disable pop-before-smtp and SMTP-AUTH in qmail? In other words, I would like a setup which accepts emails for hosted domains, but I do not want to allow users to send outgoing email from an external mail client.

Just to answer my own question in case someone else in the future is trying to do the same thing:

You can disable POP before SMTP by uncommenting “disable_external_relay” in ~vpopmail/etc/vlimits.default , and disable SMTP AUTH by uncommenting “disable_smtp”

Unfortunately this does not disable IMAP before SMTP, which is hardcoded in the courier-imap package. To prevent IMAP clients from using your server to relay mail, you have to recompile courer-imap, or disable it.