From 5443d66d064c5f9c1cc86a1088126653143ea67e Mon Sep 17 00:00:00 2001 From: Rob Wood Date: Fri, 26 Apr 2024 21:13:35 +0100 Subject: [PATCH] Core(Docs): Clarify TLS etc options to clarify they are SMTP specific. (#1435) --- Rnwood.Smtp4dev/CommandLineParser.cs | 8 ++++---- Rnwood.Smtp4dev/appsettings.json | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Rnwood.Smtp4dev/CommandLineParser.cs b/Rnwood.Smtp4dev/CommandLineParser.cs index 12d9b2fcf..9bd3a7232 100644 --- a/Rnwood.Smtp4dev/CommandLineParser.cs +++ b/Rnwood.Smtp4dev/CommandLineParser.cs @@ -21,16 +21,16 @@ public static MapOptions TryParseCommandLine(IEnumerable help = true}, { "baseappdatapath=","Set the base config and appData path", data => map.Add(data, x => x.BaseAppDataPath)}, - { "hostname=", "Specifies the server hostname. Used in auto-generated TLS certificate if enabled.", data => map.Add(data, x => x.ServerOptions.HostName) }, + { "hostname=", "Specifies the server hostname. Used in auto-generated TLS certificate for SMTP if enabled.", data => map.Add(data, x => x.ServerOptions.HostName) }, { "allowremoteconnections", "Specifies if remote connections will be allowed to the SMTP and IMAP servers. Use -allowremoteconnections+ to enable or -allowremoteconnections- to disable", data => map.Add((data !=null).ToString(), x => x.ServerOptions.AllowRemoteConnections) }, { "disableipv6", "If true, SMTP and IMAP servers will NOT listen using IPv6 Dual Stack", data => map.Add((data !=null).ToString(), x => x.ServerOptions.DisableIPv6)}, { "smtpport=", "Set the port the SMTP server listens on. Specify 0 to assign automatically", data => map.Add(data, x => x.ServerOptions.Port) }, { "db=", "Specifies the path where the database will be stored relative to APPDATA env var on Windows or XDG_CONFIG_HOME on non-Windows. Specify \"\" to use an in memory database.", data => map.Add(data, x => x.ServerOptions.Database) }, { "messagestokeep=", "Specifies the number of messages to keep", data => map.Add(data, x => x.ServerOptions.NumberOfMessagesToKeep) }, { "sessionstokeep=", "Specifies the number of sessions to keep", data => map.Add(data, x => x.ServerOptions.NumberOfSessionsToKeep) }, - { "tlsmode=", "Specifies the TLS mode to use. None=Off. StartTls=On demand if client supports STARTTLS. ImplicitTls=TLS as soon as connection is established.", data => map.Add(data, x => x.ServerOptions.TlsMode) }, - { "tlscertificate=", "Specifies the TLS certificate to use if TLS is enabled/requested. Specify \"\" to use an auto-generated self-signed certificate (then see console output on first startup)", data => map.Add(data, x => x.ServerOptions.TlsCertificate) }, - { "tlscertificateprivatekey=", "Specifies the TLS certificate private key. Ignored if tlscertificate is blank", data => map.Add(data, x => x.ServerOptions.TlsCertificatePrivateKey) }, + { "tlsmode=", "Specifies the TLS mode to use for SMTP. None=Off. StartTls=On demand if client supports STARTTLS. ImplicitTls=TLS as soon as connection is established.", data => map.Add(data, x => x.ServerOptions.TlsMode) }, + { "tlscertificate=", "Specifies the TLS certificate to use for SMTP if TLS is enabled/requested. Specify \"\" to use an auto-generated self-signed certificate (then see console output on first startup)", data => map.Add(data, x => x.ServerOptions.TlsCertificate) }, + { "tlscertificateprivatekey=", "Specifies the TLS certificate private key for SMTP. Ignored if tlscertificate is blank", data => map.Add(data, x => x.ServerOptions.TlsCertificatePrivateKey) }, { "relaysmtpserver=", "Sets the name of the SMTP server that will be used to relay messages or \"\" if messages relay should not be allowed", data => map.Add(data, x => x.RelayOptions.SmtpServer) }, { "relaysmtpport=", "Sets the port number for the SMTP server used to relay messages", data => map.Add(data, x => x.RelayOptions.SmtpPort) }, { "relayautomaticallyemails=", "A comma separated list of recipient addresses for which messages will be relayed automatically. An empty list means that no messages are relayed", data => map.Add(data, x => x.RelayOptions.AutomaticEmailsString) }, diff --git a/Rnwood.Smtp4dev/appsettings.json b/Rnwood.Smtp4dev/appsettings.json index 3f0757455..e31bbfbe0 100644 --- a/Rnwood.Smtp4dev/appsettings.json +++ b/Rnwood.Smtp4dev/appsettings.json @@ -17,7 +17,7 @@ // Default value: "/" "BasePath": "/", - // Specifies the server hostname. Used in auto-generated TLS certificate if enabled. + // Specifies the server hostname. Used in auto-generated TLS certificate for SMTP if enabled. // Default value: //"HostName": "localhost", @@ -45,18 +45,18 @@ // Default value: 100 "NumberOfSessionsToKeep": 100, - // Specifies the TLS mode to use. Valid options are: None, StartTls or ImplicitTls. + // Specifies the TLS mode to use for SMTP. Valid options are: None, StartTls or ImplicitTls. // Default value: "None" "TlsMode": "None", - // Specifies the TLS certificate to use if TLS is enabled/requested. Specify "" to use an auto-generated self-signed certificate (then see console output on first startup) + // Specifies the TLS certificate to use for SMTP if TLS is enabled/requested. Specify "" to use an auto-generated self-signed certificate (then see console output on first startup) // Default value: "" "TlsCertificate": "", - //Specifies the TLS certificate password. Specify "" if the certificate is not password-protected. + //Specifies the TLS certificate password for SMTP. Specify "" if the certificate is not password-protected. //Default value: "" "TlsCertificatePassword": "", - // Specify location of the Certificate private .key file. Ignored if TlsCertificate is blank. + // Specify location of the Certificate private .key file for SMTP. Ignored if TlsCertificate is blank. //"TlsCertificatePrivateKey": "", // Specifies the port the IMAP server will listen on - allows standard email clients to view/retrieve messages