Package: exim4
Version: 4.89-2
Severity: wishlist

Hi exim4 maintainers,
first of all I want to thank you for your great work!

I came by merging exim4 for the next Ubuntu release recently and doing that
for the seconds time I realized that the only difference people carry on
since ages (it seems) is a Distribution specific SMTP banner.

Now I checked and the patch works for Debian just as well as it is getting
it at configure time via lsb_release.

I couldn't believe that something like 15 different people never asked, but
maybe I searched for the wrong terms when looking for this discussion
already taking place in the past.
At least the times I've touched it that was a diff always easy to maintain
- worst case do a 'quilt refresh' once and it is around and working since
several years; so it should be low-to-no effort to be kept around and
maintained.

On one hand it would for you give Debian more explicit visibility on some
of the internet scapper tools that generate e.g. market share based on
server headers (not so importan, but at least A reason).
And on the other hand it would allow Ubuntu to make exim4 a sync, which is
easier to maintain (clearly more my benefit than yours I know).

Therefore I'd ask you if you'd be willing to take the attached (2) patches
into Debian?

-- 
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd
From 7473f90007f6e88b85421ad42ae2b4e77f104683 Mon Sep 17 00:00:00 2001
From: Christian Ehrhardt <christian.ehrha...@canonical.com>
Date: Thu, 1 Jun 2017 11:32:39 +0200
Subject: [PATCH 2/2] Show Distro specific SMTP banner.

Patch to add the Distribution name to the default SMTP banner.
That allows e.g. market researchers to detect the distribution running a
server more easily (nobody wants to be in the "other" bucket).

Signed-off-by: Christian Ehrhardt <christian.ehrha...@canonical.com>
---
 debian/patches/fix_smtp_banner.patch | 52 ++++++++++++++++++++++++++++++++++++
 debian/patches/series                |  1 +
 2 files changed, 53 insertions(+)
 create mode 100644 debian/patches/fix_smtp_banner.patch

diff --git a/debian/patches/fix_smtp_banner.patch b/debian/patches/fix_smtp_banner.patch
new file mode 100644
index 0000000..c891540
--- /dev/null
+++ b/debian/patches/fix_smtp_banner.patch
@@ -0,0 +1,52 @@
+Description: Add EXIM_DISTRIBUTION var to display it on the SMTP banner
+Origin: https://blueprints.launchpad.net/ubuntu/+spec/servercloud-s-server-app-banner-updates
+Author: Yolanda Robla <yolanda.ro...@canonical.com>
+Last-Update: 2015-07-06
+
+--- a/src/globals.c
++++ b/src/globals.c
+@@ -1295,7 +1295,7 @@
+ uschar *smtp_active_hostname   = NULL;
+ BOOL    smtp_authenticated     = FALSE;
+ uschar *smtp_banner            = US"$smtp_active_hostname ESMTP "
+-                             "Exim $version_number $tod_full"
++                             "Exim $version_number " EXIM_DISTRIBUTION " $tod_full"
+                              "\0<---------------Space to patch smtp_banner->";
+ BOOL    smtp_batched_input     = FALSE;
+ BOOL    smtp_check_spool_space = TRUE;
+--- a/src/config.h.defaults
++++ b/src/config.h.defaults
+@@ -204,4 +204,6 @@
+ #define SC_EXIM_ARITH "%" SCNi64		/* scanf incl. 0x prefix */
+ #define SC_EXIM_DEC   "%" SCNd64		/* scanf decimal */
+ 
++#define EXIM_DISTRIBUTION
++
+ /* End of config.h.defaults */
+--- a/scripts/Configure-config.h
++++ b/scripts/Configure-config.h
+@@ -23,6 +23,12 @@
+ if [ "$1" != "" ] ; then MAKE=$1 ; fi
+ if [ "$MAKE" = "" ] ; then MAKE=make ; fi
+ 
++# exporting distribution to use it in smtp banner
++if test -x /usr/bin/lsb_release && lsb_release -si; then
++	export EXIM_DISTRIBUTION=\"$(lsb_release -si)\"
++else
++	export EXIM_DISTRIBUTION=\"\"
++fi
+ $MAKE buildconfig || exit 1
+ 
+ # BEWARE: tab characters needed in the following sed command. They have had
+--- a/src/exim.h
++++ b/src/exim.h
+@@ -596,5 +596,9 @@
+ # undef DISABLE_DNSSEC
+ #endif
+ 
++#ifndef EXIM_DISTRIBUTION
++  #define EXIM_DISTRIBUTION ""
++#endif
++
+ #endif
+ /* End of exim.h */
diff --git a/debian/patches/series b/debian/patches/series
index cc060c5..a794af4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@
 67_unnecessaryCopt.diff
 70_remove_exim-users_references.dpatch
 78_Disable-chunking-BDAT-by-default.patch
+fix_smtp_banner.patch
-- 
2.7.4

From b72c71f8d49a35a767b09a439902bb8a817677cd Mon Sep 17 00:00:00 2001
From: Christian Ehrhardt <christian.ehrha...@canonical.com>
Date: Tue, 24 Jan 2017 10:12:15 +0100
Subject: [PATCH 1/2] Build-Depend on lsb-release for Distro smpt-banner

To be able to automtically generate the Distribution name at configure
time add lsb-release as Build-Depends.

Signed-off-by: Christian Ehrhardt <christian.ehrha...@canonical.com>
---
 debian/control | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 16c00d3..39a64ee 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,7 @@ Build-Depends: debhelper (>= 9), po-debconf, docbook-xsl, xsltproc,
   lynx-cur | lynx, docbook-xml, libpcre3-dev, libldap2-dev, libpam0g-dev,
   libident-dev, libdb5.3-dev, libxmu-dev, libxt-dev, libxext-dev, libx11-dev,
   libxaw7-dev, libpq-dev, default-libmysqlclient-dev,
-  libsqlite3-dev, libperl-dev, libgnutls28-dev, libsasl2-dev
+  libsqlite3-dev, libperl-dev, libgnutls28-dev, libsasl2-dev, lsb-release
 
 Package: exim4-base
 Architecture: any
-- 
2.7.4

Reply via email to