bring smtpscript code from OpenSMTPD