Enterprise Vault™ PowerShell Cmdlets
- Introducing the Enterprise Vault PowerShell cmdlets
- Archiving: Exchange
- Archiving: FSA
- Archiving: Skype for Business
- Archiving: SMTP
- Backup
- Classification
- Databases
- IMAP access
- Indexing
- Records management
- Retention plans
- Roles-based administration
- Sites and servers
- Tasks and services
- Vault stores and archives
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 the snap-in Symantec.EnterpriseVault.PowerShell.AdminAPI.dll
.
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>] [-MessageTracking <Boolean>] [-IncludeSubjectLineInLogs <Boolean>] [-DaysToKeepMessageTrackingLogs <Integer>] [<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. |
-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. |
-MessageTracking | Specifies whether message tracking is enabled for all the SMTP servers in the site. Set to $true to enable SMTP message tracking. Set to $false to disable message tracking. When message tracking is enabled, Enterprise Vault logs the details of messages that each SMTP server receives. By default, the message tracking log file is stored in |
-IncludeSubjectLineInLogs | Specifies whether to log the subject line of the message in the message tracking log file and the DTrace logs. Set to $true to log the subject line. The default is not to log the subject line ($false). |
-DaysToKeepMessageTrackingLogs | Specifies the number of days to keep the SMTP message tracking log files on the server. Log files that are older than the specified number of days are deleted. Enter a value in the range 1 to 999. The default value is 30. |
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) -MessageTracking $true -IncludeSubjectLineInLogs $true -DaysToKeepMessageTrackingLogs 45
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, both encrypted and unencrypted connections are supported, message tracking is enabled, the subject line of each message is logged, and the log file is retained for 45 days from the date when the file was created.
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 -MessageTracking : $true -IncludeSubjectLineInLogs $true -DaysToKeepMessageTrackingLogs 50
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 MessageTracking : True IncludeSubjectLineInLogs : True DaysToKeepMessageTrackingLogs: 50
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, both encrypted and unencrypted connections are supported, message tracking is enabled, the subject line of each message is logged, and the log file is retained for 50 days from the date when the file was created. 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. |
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. |
AuthenticationEmailAddress | String | The identity of the authentication user, if authentication is enabled. |
DaysToKeepMessageTrackingLogs | Integer | The number of days to keep the SMTP message tracking log files on the server. Log files that are older than the specified number of days are deleted. |
IncludeSubjectLineInLogs | Boolean | Specifies whether the subject line of the message is logged in the message tracking log file and the DTrace logs. $true if the subject line is included in the logs, or $false if the subject line is not logged. |
MaxMessageSize | Integer | Maximum SMTP message size (in MB). |
MessageTracking | Boolean | Specifies whether message tracking is enabled. $true if SMTP message tracking is enabled, or $false if message tracking is disabled. |
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. |