we've been having problems with nulls showing up in email. it turns out that the dot destuffing in smtpd is the culprit. i also added some extra paranoid stuff to the getnl() stuff to make the sender isn't messing with us. to trigger this bug send a mail with a dot on a line by itself. (or telnet to smtpd and forge the email yourself, this time doing the dot-stuffing by hand.)