SMTP, LMTP, mail address handling
- correctly RFC2822-quote addresses in From/To/Cc in DSN;
- avoid un-quoting and re-quoting addresses: keep them in the original form
  besides the decoded form;
- resolve Net::SMTP deficiencies:
  * it should support pipelining;
  * enqueue SMTP responses and make them available in order or arrival,
    (needed for pipelining);
  * it should not report error if an optional parameter (e.g. SIZE)
    is available but MTA does not support it - should be silently ignored;
  * needs API to query a list of services offered by a server (EHLO response);
  * missing parameter - passing AUTH 'submitter' in MAIL FROM;
  * missing parameter - passing ORCPT in RCPT TO (needed for DSN - RFC 3461);
  * fix broken error report in IO::Socket when non-blocking mode is used
    (when timeout is nonzero): instead of 'Invalid argument' it should tell
    that the server is not reachable;
  * make use of IO::Socket::INET6 to provide IPv6 support;
  * investigate possibility of enhancing it to support LMTP;
- be able to do multiple-transaction sessions on the
  outgoing side (SMTP client);
- split_localpart(): check 'owner-special' handling, e.g. foo-request-spam@
- separate the application from SMTP protocol handling
  (re-investigate Net-Server-Mail and other Perl module attempts)
- provide LMTP client code (Net-LMTP is unsuitable);
- fallback relays, MX backups?
- one_response_for_all: report (propagate) all MTA SMTP responses if different

MAIL MODIFICATIONS, EXPAND, NOTIFICATIONS:
- make mail-headers part of DSN optional (configurable)
- make possible to use proper MIME content structure in notifications;
- implement defanging on a per-recipient basis;
- defang spam when score exceeds tag2 level, not at kill level;
- more versatile mail defanging: be able to rebuild mail from desired
  parts while throwing away or modifying undesired mail parts;
- passed infected (or banned) mail should be able to modify Subject (a patch
  by Scott Bronson, 2003-08-09);
- use modified headers (and body?) as provided by SA ?
- provide more flexible Subject edits, e.g. to include additional information
  such as score points; perhaps use expand template for the purpose?
- per-virus notifications, e.g. include URL or instructions in DSN
  (could make use of associative arrays in EXPAND if available);
- configurable/dynamic SMTP response message, e.g. include URL or instructions;
- result of banned lookup stored in a macro;
- don't send notifications if notifications text turns out to be empty,
  making it possible for a macro expansion during customization
  to turn off DSN (Florian Effenberger);
- choose the admin sender address in DSN based on recipient address/domain;

VIRUS AND OTHER MALWARE SCANNING:
- merge run_av and ask_av into one subroutine;
- split calls to virus scanner into multiple calls for long lists of files
  to be scanned, in oder not to exceed the command line / arguments size limit;
- configurable SAVI-Perl;
- clamscan (and others) need option '--mbox' when given full mail file,
  but not on already decoded parts (Michael Boelen);
- some scanners need proper file name extension to be able to recognize
  and decode a file correctly;
- viruses_that_recips_dont_care_about;
- optimize-away banned checks when bypassing banned checks is requested
  and $banned_namepath_re is used;
- when defanging the use of Resent-* header filelds is probably inappropriate,
  as it breaks DomainKeys;
- prevent positive feedback loop when SA is used to train dspam
  (dspam score should not influence a decision to train dspam);

MAIL DECODING/DE-ARCHIVING:
- enforce time limit on spawned external decoders;
- unwrap pgp/gpg armoring, especially on signed-only messages;
- file(1) is unable to differentiate or recognize various types
  of pgp/gpg mail (signed/encrypted/armored/signature/key);
- per-recipient bypass_decoding;
- yEnc encoding www.yenc.org (NNTP); Appledouble encoding, Macintosh StuffIt;
- store_mgr: stop_expensive_decoding_at=n ?
- seek some solution to prevent decoder from attempting to create files
  outside of its designated directory;
- provide separate failure modes of expected (I/O, system) and unexpected
  errors when decoding;

INTERNALS, CODING, ...
- save am_id to conn object or to msginfo?
- remove the need for /dev/null in chroot
- amavis-milter.c: be able to approve locally originating DSN without
  calling amavisd to avoid deadlock (or the need to force '-odd');
- use timers in a manner to provide some resiliency to clock jumps;
- use multi-timers Perl module? make timer independent of its use by SA;
- provide an alternative distribution package without EICAR and sample
  zip bombs to facilitate download for some clients;
- syslog-ng problem (SA bug report 3625, syslog-ng may fork during posting);
- can we avoid keeping two copies of header (MIME::Entity and orig_headers)?

QUARANTINE
- provide per-recipient headers such as X-Spam* scores in the quarantined msg;
- do the quarantining later in the flow (after forwarding) to be able:
  * to add X-Envelope-To to the quarantined message only for recipients
    that didn't receive the mail;
  * to do the correct intersect between per-recipient quarantine_to
    and per-recipient kill level and other blockings;
- disable quarantine (and virus admin notifications) based on virus name;
- strip original X-Spam-* headers when releasing a quarantined message;
- update msgrcpt.rs field after a quarantine release

GENERAL, NEW FEATURES
- provide a LDAP and SQL proxy (or make use of the Postfix proxy_read_maps)
  to radically reduce the connection rate on LDAP and SQL server;
- provide a true SNMP agent, based on already available database
  of statistics counters, and giving some thoughts on designing
  a true MIB (see TODO-SNMP-AGENT);
- per-recipient BOUNCE/DISCARD selection;
- should bypass* implicitly turn on *lovers?
- some kind of a "whitelist" for bad header checks;
- do not notify recipient when they will receive mail anyway (D_PASS,*_lovers)
- notify when placing on HOLD at MTA ?
- configurable action on HOLD ?
- timeout -> HOLD ?
- notify at double bounce? (treat/describe as DISCARD)
- spam_tag2_destiny???
- make dspam-supplied header fields available for cached messages as well
- store information about detected virus names to SQL when logging to SQL
- avoid a warning on $sa_debug: Argument "1,all" isn't numeric in numeric gt

DOCUMENTATION
- documentation, documentation, documentation;
- malformed mail project and the like: tests, write FAQ;
- cleaner web page;
- use Trac for project management? ( http://www.edgewall.com/trac/ )
- add FreeBSD ports dependency on mail/p5-Mail-SPF-Query

SOME OF THE MORE SELF-CONTAINED PROJECTS
- more versatile mail defanging (see above);
- provide a true SNMP agent (see TODO-SNMP-AGENT);
- more sophisticated tools for plotting and analyzing collected
  statistics (such as timing breakdown), and for providing early
  warnings in case of problems (including SNMP alerts);
- providing missing features and/or taking over the maintainership
  of Perl modules Net::SMTP (e.g. proper pipelining);
- Net::Server IPv6 support;
- write a Perl module for interfacing with libarchive
  (http://people.freebsd.org/~kientzle/libarchive/), which is an
  ambitious (currently primarily FreeBSD) programming library that can
  create and read several streaming archive formats, including most
  popular tar variants and the POSIX cpio format.
- a volunteer activist to act as a contact/development person towards
  SpamAssassin project, with a goal to split the SpamAssassin API into
  two independent phases: analyzing the message (once per message),
  and providing appropriately evaluated scores and mail header modifications
  based on recipient preferences (once per recipient);
