ported cvut's sendmail mods