Veritas Enterprise Vault™ PowerShell Cmdlets
New-EVSMTPServerSettings
New-EVSMTPServerSettings creates the initial settings for all Enterprise Vault SMTP servers in the specified site. If you do not specify a site ID using the -SiteID parameter, and New-EVSMTPServerSettings cannot determine the site, you are prompted to enter the site ID.
This cmdlet fails if SMTP settings for site already exist.
New-EVSMTPServerSettings is provided by Symantec.EnterpriseVault.PowerShell.AdminAPI.dll, which is loaded by the Enterprise Vault Management Shell.
New-EVSMTPServerSettings [[-SiteId] <string>] -Port <integer> [-MaxMessageSize <integer>] -Authentication <Symantec.EnterpriseVault.Admin._EV_SMTP_AUTHENTICATION enumeration value> [-AuthenticationCredentials <System.Management.Automation.PSCredential>] -AuthenticationAllowPlainText <Symantec.EnterpriseVault.Admin._EV_SMTP_AUTHENTICATION_ALLOWPLAINTEXT enumeration value> -Tls <Symantec.EnterpriseVault.Admin._EV_SMTP_TLS enumeration value> [-TlsCertificateFile <string>] [-TlsSecurePassphrase <System.Security.SecurseString>] [-SMTPConnectionControl <Symantec.EnterpriseVault.Admin.SMTPConnectionControlList>] [<CommonParameters>]
Table: New-EVSMTPServerSettings parameters
Parameter | Description |
---|---|
-SiteId | The ID of the site to which the SMTP settings apply. |
-Port (required) | The port number to be used by the SMTP servers in the site. |
-MaxMessageSize | The maximum message size that the SMTP servers accept (in MB). The SMTP servers will reject messages that are larger than the specified size. |
-Authentication (required) | The enumeration value specifies whether authentication is enabled for SMTP connections to the SMTP servers. If the value EV_SMTP_AUTHENTICATION_ENABLE is specified, hosts that connect to the SMTP servers must supply the credentials specified by the parameter -AuthenticationCredentials. If the value EV_SMTP_AUTHENTICATION_DISABLE is specified, then -AuthenticationCredentials is not required. For details of the enumerations used, type get-help about_SMTPEnumerations. |
-AuthenticationCredentials | The credentials that hosts must use when connecting to SMTP servers in the site. This parameter is only required if -Authentication is set to EV_SMTP_AUTHENTICATION_ENABLE. |
-AuthenticationAllowPlainText (required) | Enumeration value that specifies whether plain text authentication is enabled for SMTP connections to the SMTP servers. If -Authentication is set to EV_SMTP_AUTHENTICATION_DISABLE, this value is always set to EV_SMTP_AUTHENTICATION_ALLOWPLAINTEXT_NEVER. If EV_SMTP_AUTHENTICATION_ALLOWPLAINTEXT_TLS is specified, then TLS must be enabled on the SMTP servers or an appropriate exception message is generated. For details of the enumerations used, type get-help about_SMTPEnumerations at the PowerShell prompt. |
-Tls (required) | The enumeration value specifies the support for encrypted and unencrypted connections to the SMTP servers. The protocol supported for encrypted connections is Transport Layer Security (TLS). If encrypted connections are supported, then you must specify values for the parameters -TlsCertificateFile and -TlsSecurePassphrase. For details of the enumerations used, type get-help about_SMTPEnumerations. |
-TlsCertificateFile | The path of the TLS certificate file to use for encrypted connections to the SMTP servers. This parameter is not required if only unencrypted connections are supported. |
-TlsSecurePassphrase | The TLS certificate file secure passphrase required for encrypted connections to the SMTP servers. This parameter is not required if only unencrypted connections are supported. |
-SMTPConnectionControl | A list of hosts that can connect to the SMTP servers. For details of SMTPConnectionControlList object, type get-help about_SMTPConnectionControlList. |
New-EVSMTPServerSettings -Port 25 -Authentication EV_SMTP_AUTHENTICATION_ENABLE -AuthenticationCredentials (New-Object System.Management.Automation.PSCredential -ArgumentList "user@example.com", ("admin@123" | ConvertTo-SecureString -AsPlainText -Force)) -AuthenticationAllowPlainText EV_SMTP_AUTHENTICATION_ALLOWPLAINTEXT_TLS -Tls EV_SMTP_TLS_ENCRYPTED_AND_UNENCRYPTED -TlsCertificateFile "C:\rsa.p12" -TlsSecurePassphrase ("admin@123" | ConvertTo-SecureString -AsPlainText -Force)
Creates the initial SMTP server settings for all SMTP servers in the specified site. The SMTP servers listen on port 25, authentication is enabled, plain text authentication is enabled on TLS, and both encrypted and unencrypted connections are supported.
C:\PS> $xConnectionList = new-object Symantec.EnterpriseVault.Admin.SMTPConnectionControlList
C:\PS> $xConnectionList.Add("EV_SMTP_CONNECTION_HOSTNAME", "Test")
C:\PS> $xConnectionList.Add("EV_SMTP_CONNECTION_HOSTNAMESUFFIX", "smtp.example.com")
C:\PS> $xConnectionList.Add("EV_SMTP_CONNECTION_HOSTNAMEPATTERN", "as-[a-z0-9]*-[a-z0-9]*.example.local")
C:\PS> $xConnectionList.Add("EV_SMTP_CONNECTION_IPV4", "192.168.1.1")
C:\PS> $xConnectionList.Add("EV_SMTP_CONNECTION_IPV4INCIDR", "192.168.1.1/24")
C:\PS> $xConnectionList.Add("EV_SMTP_CONNECTION_IPV6", "0000:0000:0000:0000:0000:0000:0000:0001")
C:\PS> $xConnectionList.Add("EV_SMTP_CONNECTION_IPV6INCIDR", "0000:0000:0000:0000:0000:0000:0000:0001/128")
C:\PS> New-EVSMTPServerSettings -Port 25 -Authentication EV_SMTP_AUTHENTICATION_ENABLE -AuthenticationCredentials (New-Object System.Management.Automation.PSCredential -ArgumentList "user@example.com", ("admin@123" | ConvertTo-SecureString -AsPlainText -Force)) -Tls EV_SMTP_TLS_ENCRYPTED_AND_UNENCRYPTED -TlsC ertificateFile "C:\rsa.p12" -TlsSecurePassphrase ("admin@123" | ConvertTo-SecureString -AsPlainText -Force) -SMTPConnectionControl $xConnectionList
SiteId : 13E9...EV1101.example.com Port : 25 MaxMessageSize : 0 Authentication : EV_SMTP_AUTHENTICATION_ENABLE AuthenticationEmailAddress : user@example.com AuthenticationAllowPlainText : EV_SMTP_AUTHENTICATION _ALLOWPLAINTEXT_TLS Tls : EV_SMTP_TLS_ENCRYPTED_AND_UNENCRYPTED TlsCertificateInfo : Symantec.EnterpriseVault.Admin .TlsCertificate SMTPConnectionControl : Symantec.EnterpriseVault.Admin .SMTPConnectionControlList
This sequence of commands creates the initial SMTP server settings for all SMTP servers in the specified site. The SMTP servers listen on port 25, authentication is enabled, plain text authentication is enabled on TLS, and both encrypted and unencrypted connections are supported. The allowed connections are added to the SMTPConnectionControlList object using different address formats.
New-EVSMTPServerSettings returns an object of the type Symantec.EnterpriseVault.Admin.SMTPServerSettings, which contains the properties listed in the following table.
Table: Symantec.EnterpriseVault.Admin.SMTPServerSettings properties
Name | Type | Description |
---|---|---|
Authentication | Object | Symantec.EnterpriseVault.Admin._EV_SMTP_AUTHENTICATION enumeration value: Specifies whether authentication is required for incoming connections. For details of the enumeration values, type get-help about_SMTPEnumerations at the PowerShell prompt. |
AuthenticationEmailAddress | String | The identity of the authentication user, if authentication is enabled. |
AuthenticationAllowPlainText | Object | Symantec.EnterpriseVault.Admin. _EV_SMTP_AUTHENTICATION_ALLOWPLAINTEXT enumeration value: Enumeration value that specifies whether plain text authentication is allowed for incoming connections. If authentication is disabled this value defaults to EV_SMTP_AUTHENTICATION_ALLOWPLAINTEXT_NEVER. For details of the enumeration values, type get-help about_SMTPEnumerations at the PowerShell prompt. |
MaxMessageSize | Integer | Maximum SMTP message size (in MB). |
Port | Integer | The port number on which the SMTP servers listen. |
SiteId | String | The ID of the site to which the SMTP server settings belong. |
SMTPConnectionControl | Object | Symantec.EnterpriseVault.Admin.SMTPConnectionControlList: Provides a list of allowed connections to the SMTP servers. For more information on managing the list of allowed connections, type get-help about_SMTPConnectionControlList at the PowerShell prompt. |
Tls | Object | Symantec.EnterpriseVault.Admin._EV_SMTP_TLS enumeration value: Enumeration value that specifies the support for encrypted and unencrypted connections to the SMTP servers. For details of the enumeration values, type get-help about_SMTPEnumerations at the PowerShell prompt. |
TlsCertificateInfo | Object | Symantec.EnterpriseVault.Admin.TlsCertificate: Provides information about the TLS certificate used for SMTP connections. For more information on the TlsCertificate object, type get-help about_TlsCertificate at the PowerShell prompt. |