Package: nullmailer
Version: 1:1.02-7njl.1
Severity: minor
RFC 2821 specifies that the SMTP conversation must end with a QUIT.
Nullmailer doesn't do this, it just disconnects, which can cause noise
or spurious warnings in the destination MTA's logs if it cares about
protocol strictness. One program which does care is amavisd-new,
which logs "SMTP: NOTICE: client broke the connection without a QUIT ()"
every time nullmailer sends it a mail for scanning.
Bruce's changelog says he removed the QUIT as being redundant - well it
is, as DJB pointed out many years ago in http://cr.yp.to/smtp/quit.html,
but contrary to his hopes QUIT is still part of the protocol and wasn't
dropped from son-of-821. Without it, nullmailer breaks RFC 2821.
I hope not to start an rwar on this subject, but if you agree with me then
you may be interested in the attached patch to add QUIT back in again.
Nick
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (60, 'testing'), (2, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.16-1-k7
Locale: LANG=en_GB.ISO-8859-15, LC_CTYPE=en_GB.ISO-8859-15 (charmap=ISO-8859-15)
Versions of packages nullmailer depends on:
ii debconf [debconf-2.0] 1.4.30.13 Debian configuration management sy
ii libc6 2.3.2.ds1-22sarge3 GNU C Library: Shared libraries an
ii libgcc1 1:3.4.3-13 GCC support library
ii libstdc++5 1:3.3.5-13 The GNU Standard C++ Library v3
ii lsb-base 3.1-9bpo1 Linux Standard Base 3.1 init scrip
ii ucf 1.17 Update Configuration File: preserv
-- debconf information:
* shared/mailname: leverton.org
* nullmailer/adminaddr:
* nullmailer/relayhost: localhost smtp --port=10025
--- protocols/smtp.cc.orig 2006-06-25 02:50:39.000000000 +0100
+++ protocols/smtp.cc 2006-06-25 17:04:23.000000000 +0100
@@ -46,6 +46,7 @@
void docmd(mystring cmd, int range, bool show_succ=false);
void send_data(fdibuf* msg);
void send_envelope(fdibuf* msg);
+ void send_quit();
void send(fdibuf* msg);
};
@@ -127,10 +128,16 @@
docmd(".", 200, true);
}
+void smtp::quit()
+{
+ docmd("QUIT", 200);
+}
+
void smtp::send(fdibuf* msg)
{
send_envelope(msg);
send_data(msg);
+ send_quit();
}
void protocol_prep(fdibuf*)