9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: [9fans] bogus header chars and empty messages, courtesy smtpd
Date: Sat, 11 Apr 2009 10:56:28 -0400	[thread overview]
Message-ID: <c0038f86c5c79f1b7f2f81a41f8a0933@quanstro.net> (raw)

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	other threads:[~2009-04-11 14:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c0038f86c5c79f1b7f2f81a41f8a0933@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).