]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lmtp: Allow setting of login greeting in SNI callback
authorKarl Fleischmann <karl.fleischmann@open-xchange.com>
Tue, 14 Nov 2023 08:47:22 +0000 (09:47 +0100)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 17 Jan 2025 08:39:56 +0000 (10:39 +0200)
src/lmtp/lmtp-client.c

index a33c506bdc32dfd7d87344a08c8340d527b4eea9..7d0f7e3e4189403ecabf43d931e82e673f2d201b 100644 (file)
@@ -23,6 +23,7 @@
 #include "lmtp-local.h"
 #include "lmtp-proxy.h"
 #include "lmtp-commands.h"
+#include "smtp-server-private.h"
 
 #include <unistd.h>
 
@@ -399,7 +400,8 @@ static int
 client_connection_tls_sni_callback(const char *name, const char **error_r,
                                   void *context)
 {
-       struct client *client = context;
+       struct smtp_server_connection *conn = context;
+       struct client *client = conn->context;
 
        const struct lda_settings *old_lda_set = client->lda_set;
        const struct lmtp_settings *old_lmtp_set = client->lmtp_set;
@@ -419,6 +421,8 @@ client_connection_tls_sni_callback(const char *name, const char **error_r,
        settings_free(old_lda_set);
        settings_free(old_lmtp_set);
 
+       conn->set.login_greeting = client->lmtp_set->login_greeting;
+
        return 0;
 }