From: Karl Fleischmann Date: Tue, 14 Nov 2023 08:47:22 +0000 (+0100) Subject: lmtp: Allow setting of login greeting in SNI callback X-Git-Tag: 2.4.1~1280 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d7d271ce225bee71634d3ac3a161f85f00db803e;p=thirdparty%2Fdovecot%2Fcore.git lmtp: Allow setting of login greeting in SNI callback --- diff --git a/src/lmtp/lmtp-client.c b/src/lmtp/lmtp-client.c index a33c506bdc..7d0f7e3e41 100644 --- a/src/lmtp/lmtp-client.c +++ b/src/lmtp/lmtp-client.c @@ -23,6 +23,7 @@ #include "lmtp-local.h" #include "lmtp-proxy.h" #include "lmtp-commands.h" +#include "smtp-server-private.h" #include @@ -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; }