summaryrefslogtreecommitdiffstats
path: root/debian/patches/dovecot_name.patch
blob: d9d6ebf77fda951ab1dde5328f08a70fd32e9fec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
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 = "+",