in the process of trying to make smtpd reject email with garbage
characters in the headers, i ran headlong into a few long standing
smtpd annoyances.

smtpd has had an annoying habit of delivering empty messages
when bad things happen, like sender timeout.

it turns out that the problem is that writing to /dev/%d/notepg,
which smtpd does to abort partially-delivered email is illegal
if you are running as none. (/sys/src/9/port/devproc.c:425,426)

it also turns out that setting pp to nil in the note catcher is
antisocial and tends to leave behind broken processes.

to address this, nupas smtpd now

- uses syskill not syskillpg
- doesn't set pp in the note catcher, and finally
- insures that every character in the header is at least legal unicode.

i put the source up at /n/sources/contrib/quanstro/nupas/smtp/smtpd.c

- erik

Reply via email to