Mail Servers
  • 06 Nov 2024
  • 2 Minutes to read
  • Dark
    Light
  • PDF

Mail Servers

  • Dark
    Light
  • PDF

Article summary

Get-LiquitMailServer

Synopsis

This command displays a list of all mail servers defined within the Liquit zone.

Syntax

 Get-LiquitMailServer 
	[-LiquitContext <LiquitContext>]  
	[<CommonParameters>]

 Get-LiquitMailServer 
	[-ID] <guid[]> 
	[-LiquitContext <LiquitContext>]  
	[<CommonParameters>]

 Get-LiquitMailServer 
	[-EntityRef] <EntityRef[]> 
	[-LiquitContext <LiquitContext>]  
	[<CommonParameters>]
    
Get-LiquitMailServer 
    [-Search] <string> 
    [-LiquitContext <LiquitContext>]
    [<CommonParameters>]

Get-LiquitMailServer 
    [-Name] <string> 
    [-LiquitContext <LiquitContext>]  
    [<CommonParameters>]

Examples

Example 1: Get-LiquitMailServer

 Get-LiquitMailServer 

This command displays all mail servers defined in the Liquit Workspace.

Example 2: Get-LiquitMailServer

 Get-LiquitMailServer -id 00000000-0000-0000-0000-000000000000

This command selects a specific mail server.

Parameters

NameValueDescriptionRequiredDefault value
Search<string>This parameter serves a similar purpose to the search box found in the mail settings table from the Liquit Workspace UI. It enables users to search multiple columns within the table, such as Name and Server. When a search term is provided, the parameter filters records by matching values in these indexed columns. However, it's important to note that not all columns in the table are indexed, meaning that searches for values in these non-indexed columns will not return results. Non-indexed columns include for example the ID and columns containing checkboxes.
Name<string>Searches on the mail server name itself.
LiquitContext<LiquitContext>Determines the selected zone.NoDefault

New-LiquitMailServer

Synopsis

This command creates a new mail server.

Syntax

 New-LiquitMailServer 
	[-Name] <string> 
	-From <string> 
	-Server <string>
	[-Secure <bool>] 
	[-Port <int>] 
	[-Priority <int>] 
	[-Credential <pscredential>] 
	[-Description <string>] 
	[-Enabled <bool>] 
	[-LiquitContext <LiquitContext>] 
	[-WhatIf]
	[-Confirm]  
	[<CommonParameters>]

Example

     New-LiquitMailServer -Name "PowerShell Mail Server" -From "post@liquit.com" -Server "mail.liquit.com"

This command creates a new mail server named "PowerShell Mail Server".

Parameters

NameValueDescriptionRequiredDefault value
Name<string>Provide a name for the mail server.Yes
From<string>The sender address.Yes
Server<string>The server address.Yes
Secure<bool>Whether or not the connection is secure.NoFalse
Port<int>The port that should be used.No25
Priority<int>The priority the mail server takes.No10
Credential<pscredential>The credential used to authenticate to the mail server.No
Description<string>The description of the mail server.No
LiquitContext<LiquitContext>Determines the selected zone.NoDefault

Set-LiquitMailServer

Synopsis

This command lets you edit the properties of a mail server.

Syntax

 Set-LiquitMailServer 
	[-MailServer] <MailServer[]> 
	[-Name <string>] 
	[-From <string>] 
	[-Secure <bool>] 
	[-Server <string>] 
	[-Port <int>] 
	[-Priority <int>] 
	[-Credential <pscredential>] 
	[-Description <string>]
	[-Enabled <bool>] 
	[-LiquitContext <LiquitContext>] 
	[-WhatIf] 
	[-Confirm]  
	[<CommonParameters>]

Example

  $mailServer = New-LiquitMailServer -Name "PowerShell Mail Server" -From "post@liquit.com" -Server "mail.liquit.com"
 Set-LiquitMailServer -Name "Updated PowerShell Mail Server" 

This command updates an existing mail server and renames it "Updated PowerShell Mail Server".

Parameters

NameValueDescriptionRequiredDefault value
Name<string>Provide a name for the mail server.No
From<string>The sender address.No
Server<string>The server address.No
Secure<bool>Whether or not the connection is secure.NoFalse
Port<int>The port that should be used.No25
Priority<int>The priority the mail server takes.No10
Credential<pscredential>The credential used to authenticate to the mail server.No
Description<string>The description of the mail server.No
LiquitContext<LiquitContext>Determines the selected zone.NoDefault

Remove-LiquitMailServer

Synopsis

This command removes a mail server from the Liquit Workspace.

Syntax

 Remove-LiquitMailServer
	[-MailServer] <MailServer[]> 
	[-LiquitContext <LiquitContext>] 
	[-WhatIf] 
	[-Confirm]  
	[<CommonParameters>]

Example

  $mailServer = New-LiquitMailServer -Name "PowerShell Mail Server" -From "post@liquit.com" -Server "mail.liquit.com"
 Remove-LiquitMailServer -MailServer $mailServer 

This command removes the selected mail server from the Liquit Workspace.

Parameters

NameValueDescriptionRequiredDefault value
MailServer<MailServer[]>The mail server you wish to remove.Yes
LiquitContext<LiquitContext>Determines the selected zone.NoDefault

Was this article helpful?