PLAIN implies to me that it is a simple thing, but it's actually a lot trickier as on the server LDAP is involved, and that's really not that PLAIN...