9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] bogus header chars and empty messages, courtesy smtpd
@ 2009-04-11 14:56 erik quanstrom
  0 siblings, 0 replies; only message in thread
From: erik quanstrom @ 2009-04-11 14:56 UTC (permalink / raw)
  To: 9fans

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-04-11 14:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-11 14:56 [9fans] bogus header chars and empty messages, courtesy smtpd erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).