some minor improvements to smtp protocol