Skip to content

Commit

Permalink
Core(Docs): Clarify TLS etc options to clarify they are SMTP specific. (
Browse files Browse the repository at this point in the history
  • Loading branch information
rnwood authored Apr 26, 2024
1 parent 64bc55c commit 5443d66
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions Rnwood.Smtp4dev/CommandLineParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ public static MapOptions<CommandLineOptions> TryParseCommandLine(IEnumerable<str
{
{ "h|help|?", "Shows this message and exits", _ => 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) },
Expand Down
10 changes: 5 additions & 5 deletions Rnwood.Smtp4dev/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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: <DNS name of machine>
//"HostName": "localhost",

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5443d66

Please sign in to comment.