On Sat, Nov 23, 2013 at 10:20:19AM -0800, Andrew Ayer wrote:
> The patch is simple and only touches two functions because most of the
> required pieces were already there. All I needed to do was split the
> argument list, parse the NOTIFY parameter (using the existing
> dsn_notify_mask() function), and pass the result as the last argument to
> cleanup_addr_bcc_dsn(), instead of always passing DEF_DSN_NOTIFY. I've
> tried to mimic the existing code style as much as possible.
Simple context-free splitting is in principle not sufficient:
RCPT TO:<"perverse NOTIFY=bad address"@example.com> NOTIFY=good
Though the smtpd(8) parser for RCPT TO may not cover 100% of the
torture-test that is the RFC 5321 "RCPT TO" or "MAIL FROM" grammar,
it comes much closer... Look at extract_addr() in src/smtpd/smtpd.c.
--
Viktor.