Update Dovecot name to include Distribution in login greeting message
authorJaldhar H. Vyas <jaldhar@debian.org>
Sat, 7 Sep 2013 05:16:14 +0000 (01:16 -0400)
committerPeter Michael Green <plugwash@raspbian.org>
Thu, 20 Jun 2024 17:16:27 +0000 (17:16 +0000)
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

Gbp-Pq: Name dovecot_name.patch

configure.ac
src/config/all-settings.c
src/lib-smtp/smtp-server.c
src/lmtp/lmtp-settings.c
src/login-common/login-settings.c
src/submission/submission-settings.c

index a92b99bfbb051657f4297e747614217cf5c97cac..8ef30731e643ca42b22e5f9b275ba1bcba462f68 100644 (file)
@@ -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 0ee46fdf94963ab478af48c7fa892609c3efd60b..d62b45ce2a28557e29f76a025a3af5a0033490cb 100644 (file)
@@ -2324,7 +2324,7 @@ static const struct submission_settings submission_default_settings = {
 
        .hostname = "",
 
-       .login_greeting = PACKAGE_NAME" ready.",
+       .login_greeting = DOVECOT_NAME" ready.",
        .login_trusted_networks = "",
 
        .recipient_delimiter = "+",
@@ -4188,7 +4188,7 @@ static const struct setting_define login_setting_defines[] = {
 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 = "",
@@ -4402,7 +4402,7 @@ static const struct lmtp_settings lmtp_default_settings = {
 
        .lmtp_client_workarounds = "",
 
-       .login_greeting = PACKAGE_NAME" ready.",
+       .login_greeting = DOVECOT_NAME" ready.",
        .login_trusted_networks = "",
 
        .mail_plugins = "",
index e0afde3116365cdfdbbf23a22080561d5c9b3a72..bb1eb847d412782f28a542da3c540c2b159a1aad 100644 (file)
@@ -49,7 +49,7 @@ struct smtp_server *smtp_server_init(const struct smtp_server_settings *set)
        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 1d9ecb25468a01fb87e65197afb8f3fd582767fb..cb4b0e70aea53611faae92d2d6f53d5d9b23e401 100644 (file)
@@ -93,7 +93,7 @@ static const struct lmtp_settings lmtp_default_settings = {
 
        .lmtp_client_workarounds = "",
 
-       .login_greeting = PACKAGE_NAME" ready.",
+       .login_greeting = DOVECOT_NAME" ready.",
        .login_trusted_networks = "",
 
        .mail_plugins = "",
index e680677b762436ab6b7aefc3d30ebba8ec524aa4..0dd4e58d5d772a0c5231e839d0f3ebd1a96c6275 100644 (file)
@@ -51,7 +51,7 @@ static const struct setting_define login_setting_defines[] = {
 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 6764b3d671bff9ee55294de7d8ebdbee4264857a..1e7290eebcdfcf2d5a7dd473de4c8b4768738e08 100644 (file)
@@ -103,7 +103,7 @@ static const struct submission_settings submission_default_settings = {
 
        .hostname = "",
 
-       .login_greeting = PACKAGE_NAME" ready.",
+       .login_greeting = DOVECOT_NAME" ready.",
        .login_trusted_networks = "",
 
        .recipient_delimiter = "+",