summaryrefslogtreecommitdiffstats
path: root/debian/patches/dovecot_name.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/dovecot_name.patch')
-rw-r--r--debian/patches/dovecot_name.patch121
1 files changed, 121 insertions, 0 deletions
diff --git a/debian/patches/dovecot_name.patch b/debian/patches/dovecot_name.patch
new file mode 100644
index 0000000..d9d6ebf
--- /dev/null
+++ b/debian/patches/dovecot_name.patch
@@ -0,0 +1,121 @@
+From: "Jaldhar H. Vyas" <jaldhar@debian.org>
+Date: Sat, 7 Sep 2013 01:16:14 -0400
+Subject: Update Dovecot name to include Distribution in login greeting
+ message
+
+This patch was found at: https://blueprints.launchpad.net/ubuntu/+spec/servercloud-s-server-app-banner-updates
+and originally provided by Ubuntu for their 2.1.7 package. The original
+author is Yolanda Robla <yolanda.robla@canonical.com>. I updated it
+for Debian's 2.2.5 package.
+
+Last-Update: 2020-05-23
+---
+ configure.ac | 7 ++++++-
+ src/config/all-settings.c | 6 +++---
+ src/lib-smtp/smtp-server.c | 2 +-
+ src/lmtp/lmtp-settings.c | 2 +-
+ src/login-common/login-settings.c | 2 +-
+ src/submission/submission-settings.c | 2 +-
+ 6 files changed, 13 insertions(+), 8 deletions(-)
+
+Index: dovecot/configure.ac
+===================================================================
+--- dovecot.orig/configure.ac
++++ dovecot/configure.ac
+@@ -287,7 +287,12 @@ AM_ICONV
+ # SIZE_MAX is missing without this
+ CXXFLAGS="$CXXFLAGS -D__STDC_LIMIT_MACROS"
+
+-AC_DEFINE_UNQUOTED(DOVECOT_NAME, "$PACKAGE_NAME", [Dovecot name])
++if test -x /usr/bin/lsb_release && lsb_release -si; then
++ DOVECOT_DISTRIBUTION=" ($(lsb_release -si))"
++else
++ DOVECOT_DISTRIBUTION=""
++fi
++AC_DEFINE_UNQUOTED(DOVECOT_NAME, "$PACKAGE_NAME$DOVECOT_DISTRIBUTION", [Dovecot name])
+ AC_DEFINE_UNQUOTED(DOVECOT_STRING, "$PACKAGE_STRING", [Dovecot string])
+ AC_DEFINE_UNQUOTED(DOVECOT_VERSION, "$PACKAGE_VERSION", [Dovecot version])
+
+Index: dovecot/src/config/all-settings.c
+===================================================================
+--- dovecot.orig/src/config/all-settings.c
++++ dovecot/src/config/all-settings.c
+@@ -2320,7 +2320,7 @@ static const struct submission_settings
+
+ .hostname = "",
+
+- .login_greeting = PACKAGE_NAME" ready.",
++ .login_greeting = DOVECOT_NAME" ready.",
+ .login_trusted_networks = "",
+
+ .recipient_delimiter = "+",
+@@ -4182,7 +4182,7 @@ static const struct setting_define login
+ static const struct login_settings login_default_settings = {
+ .login_trusted_networks = "",
+ .login_source_ips = "",
+- .login_greeting = PACKAGE_NAME" ready.",
++ .login_greeting = DOVECOT_NAME" ready.",
+ .login_log_format_elements = "user=<%u> method=%m rip=%r lip=%l mpid=%e %c session=<%{session}>",
+ .login_log_format = "%$: %s",
+ .login_access_sockets = "",
+@@ -4396,7 +4396,7 @@ static const struct lmtp_settings lmtp_d
+
+ .lmtp_client_workarounds = "",
+
+- .login_greeting = PACKAGE_NAME" ready.",
++ .login_greeting = DOVECOT_NAME" ready.",
+ .login_trusted_networks = "",
+
+ .mail_plugins = "",
+Index: dovecot/src/lib-smtp/smtp-server.c
+===================================================================
+--- dovecot.orig/src/lib-smtp/smtp-server.c
++++ dovecot/src/lib-smtp/smtp-server.c
+@@ -49,7 +49,7 @@ struct smtp_server *smtp_server_init(con
+ if (set->login_greeting != NULL && *set->login_greeting != '\0')
+ server->set.login_greeting = p_strdup(pool, set->login_greeting);
+ else
+- server->set.login_greeting = PACKAGE_NAME" ready.";
++ server->set.login_greeting = DOVECOT_NAME" ready.";
+ if (set->capabilities == 0) {
+ server->set.capabilities = SMTP_SERVER_DEFAULT_CAPABILITIES;
+ } else {
+Index: dovecot/src/lmtp/lmtp-settings.c
+===================================================================
+--- dovecot.orig/src/lmtp/lmtp-settings.c
++++ dovecot/src/lmtp/lmtp-settings.c
+@@ -93,7 +93,7 @@ static const struct lmtp_settings lmtp_d
+
+ .lmtp_client_workarounds = "",
+
+- .login_greeting = PACKAGE_NAME" ready.",
++ .login_greeting = DOVECOT_NAME" ready.",
+ .login_trusted_networks = "",
+
+ .mail_plugins = "",
+Index: dovecot/src/login-common/login-settings.c
+===================================================================
+--- dovecot.orig/src/login-common/login-settings.c
++++ dovecot/src/login-common/login-settings.c
+@@ -51,7 +51,7 @@ static const struct setting_define login
+ static const struct login_settings login_default_settings = {
+ .login_trusted_networks = "",
+ .login_source_ips = "",
+- .login_greeting = PACKAGE_NAME" ready.",
++ .login_greeting = DOVECOT_NAME" ready.",
+ .login_log_format_elements = "user=<%u> method=%m rip=%r lip=%l mpid=%e %c session=<%{session}>",
+ .login_log_format = "%$: %s",
+ .login_access_sockets = "",
+Index: dovecot/src/submission/submission-settings.c
+===================================================================
+--- dovecot.orig/src/submission/submission-settings.c
++++ dovecot/src/submission/submission-settings.c
+@@ -103,7 +103,7 @@ static const struct submission_settings
+
+ .hostname = "",
+
+- .login_greeting = PACKAGE_NAME" ready.",
++ .login_greeting = DOVECOT_NAME" ready.",
+ .login_trusted_networks = "",
+
+ .recipient_delimiter = "+",