From: Scott G. <sgi...@su...> - 2002-07-28 07:34:07
|
Here's the second part of my broken-up chroot patch. This has a bunch of changes to the SMTP engine. At one time, I had trouble with AMAVIS not noticing that message sending was failing, and just sort of dropping the messages on the floor. I'm not seeing that anymore with 0.1.4, so perhaps the bug was fixed or perhaps my config was broken. Either way, here are the patches I do have. I'm not sure all of them are appropriate, but here they are. :-) The patches look more drastic than they are; I wrapped some operations in eval{} blocks to take advantage of Perl's exception handling capabilities, and all of the code inside those blocks was intended further. Major changes are: * Avoid some warnings * Die if some of the initialization fails * Better logging in various places. * Corrected small typos * Better error checking in various places. * Wrap some operations in eval{} blocks, for cleaner error checking. * Change 453 error messages to 421, since I couldn't find anything about error 453 in RFC2821. This is one of the changes that's probably wrong. * Add support for ESMTP, with no options. Otherwise, most mail clients will try EHLO first then fall back, wasting time, bandwidth, and processing power. * Small code cleanups in a few places (see notes) * Better handling of bad line endings (such as just \n); may be wrong. * Validate all email addresses strictly, to avoid letting a client try any shenanigans to pass through arbitrary or buffer-overflowing commands to the server we're relaying to. ----ScottG. |