Test Send SMTP email using Telnet

Commands to Test SMTP routing: 

 

·       Telnet into the mail backbone using TCP port 25 : telnet 10.100.201.17 25  

·       Start communication by this command: HELO sp011.xyz.com 

·       Type the following command to tell the receiving SMTP server who the message is

from: mail from: user@xyz.com 

                  response should be - 250 2.1. user@xyz.com .... Sender OK 

 

·       Type the following command to tell the receiving SMTP server whom the message is to. Use a valid recipient SMTP address in the domain that you are sending to. 

 

rcpt touser2@xyz.com  <enter>   

                   response should be - 250 2.1.5  user2@xyz.com  

 

·       Type this command to tell the SMTP server that you are ready to send data: 

data<enter> 

        response should be - 354 Start mail input; end with <CRLF>.<CRLF> 

This is a test from SP011 

             Queued mail for delivery 

 

·       Close the connection by typing the following command: QUIT 

 

·       Check if email is received or not. 

Email Purge

 

Steps for mail purge


STEP 1: CREATING THE CONTENT SEARCH RULE

1.      Head over to https://purview.microsoft.com/ediscovery

2.      Click Ediscovery => Content Search and click the plus icon to create a “Create a Search”.

3.      Give the search a name and a description if desired and click “Create

4.      Condition Builder – WHERE WE DEFINE WHAT EMAIL(S) WE WANT TO DELETE

5.      In the “Condition Builder” section click the “Add conditions” button (you may have to scroll down)

6.      Add the condition(s) relevant to what you are searching for. In my case emails which contain the sender “test@xyz.com” and that were received after a certain date.

 

Source SECTION – WE ONLY WANT TO SEARCH EXCHANGE

1.      Under the Source section select “Add tenant-wide sources”.

2.      Only enable the Mailboxes section.

 

3.      Click Save.

 

FINISHING THE RULE

a)     Click “Run Query”.

b)     At this point the search will run. It is very important you take a good look to confirm only the email(s) you want to delete are returned.

 

 

 

 

STEP 2: DELETING THE MATCHED EMAILS VIA POWERSHELL

 

1.      Connect to Powershell using command “Connect-IPPSSession

2.      Deleting the emails matching the content search rule

New-ComplianceSearchAction -SearchName "RuleName" -Purge -PurgeType SoftDelete

 

 

*Rule name will be the name that we have created during content search.

 

STEP 3: CHECKING THE STATUS

1.      Using the command below, you can get a summary of the status of the action.

Get-ComplianceSearchAction

 

2.      Or you can get a detailed output for the action using the below.

Get-ComplianceSearchAction -Identity "RuleName_Purge" | Format-List

 


Purge command --

New-ComplianceSearchAction -SearchName "Mail purge" -Purge -PurgeType SoftDelete


Check status ---

Get-ComplianceSearchAction -Identity "Mail purge"


Display Organizer Name in Room Calendars

Display Organizer Name in Room Calendars

1.    Prerequisites:

·       You must be assigned the Exchange Online PowerShell role or have appropriate permissions in Exchange Management Shell.

·       Connect to Exchange Online PowerShell using:

Connect-ExchangeOnline -UserPrincipalName youradmin@domain.com

 

2.    Steps

 

1.     Connect Exchange online PowerShell

2.     Run the command below:

 

Set-CalendarProcessing -Identity conferenceroom@domain.com -DeleteComments $true -DeleteSubject $true -AddOrganizerToSubject $true -RemovePrivateProperty $true

 

Parameters:

  • -Identity conferenceroom@domain.com: Specifies the resource mailbox (conference room).
  • -DeleteComments $true: Removes any comments from meeting requests.
  • -DeleteSubject $true: Clears the subject line from the calendar entry.
  • -AddOrganizerToSubject $true: Adds the organizer’s name to the subject line.
  • -RemovePrivateProperty $true: Removes the “Private” flag from calendar items.

 

3.     Run this command to verify the changes:
Get-CalendarProcessing -Identity conferenceroom@domain.com | Format-List

 

The command does not delete information for the meeting organizer or attendees. Instead, it controls how the room mailbox displays meeting details to users who view the room's calendar (typically for availability purposes).


  • Meeting Organizer and Attendees:
    They still see the full meeting details (subject, comments, etc.) in their own calendars. Nothing is deleted from them.

  • Room Mailbox Calendar View (for others):
    These settings affect how the room's calendar appears to users who are not part of the meeting but are checking the room's availability.


Breakdown of Effects:

Setting

Impact

-DeleteComments $true

Comments in the meeting invite are removed from the room's calendar entry.

-DeleteSubject $true

Subject line is removed from the room's calendar entry.

-AddOrganizerToSubject $true

The organizer's name is added to the subject line (e.g., "Reserved by Rajat ").

-RemovePrivateProperty $true

Removes the "Private" flag so the meeting is not hidden from users with calendar access.


People who look at the room's calendar will not see the subject or comments, but will see who booked the room, which helps with transparency while maintaining privacy.

 

How to Cancel Future Meetings

 How to Cancel Future Meetings

Steps

The Remove-CalendarEvents cmdlet is used to cancel future meetings organized by a mailbox (typically when a user leaves the organization), without deleting their mailbox immediately.

 

1.     Connect to Exchange Online PowerShell

Connect-ExchangeOnline -UserPrincipalName youradmin@domain.com

 

2.     Preview Future Meetings (Optional but Recommended)

 

Remove-CalendarEvents -Identity user@xyz.com 

  -CancelOrganizedMeetings `

  -QueryWindowInDays 120 `

  -PreviewOnly

 

To preview which meetings will be canceled (without actually canceling them):

-Identity: The mailbox of the user.

-CancelOrganizedMeetings: Targets meetings organized by the user.

-QueryWindowInDays: Looks ahead 120 days from today.

-PreviewOnly: Shows what would be canceled without making changes.

 

3.     Cancel Future Meetings

 

Run the command without -PreviewOnly to cancel the meetings:

 

Remove-CalendarEvents -Identity user@xyz.com `

  -CancelOrganizedMeetings `

  -QueryWindowInDays 120

 


4.     Alternatively, you can also use a specific start date to preview and cancel meetings organized by a user.

 

Remove-CalendarEvents -Identity "user@xyz.com" -CancelOrganizedMeetings -QueryStartDate 01-01-2022 -QueryWindowInDays 900 -PreviewOnly

 

·       This cmdlet only affects meetings organized by the user, not meetings he was invited to.

·       Attendees will receive cancellation notices.

·       You must have the appropriate permissions (e.g., Organization Management role).

Steps to update Alias

 

Steps to update Alias

Step 1: Open Exchange Management Shell

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://s-exhybrid1.xyz.com/PowerShell/ -Authentication Kerberos -Credential $UserCredential

Import-PSSession $Session -DisableNameChecking

 


Step 2: Run the Command to Update Alias

Use the following command, replacing the placeholders with actual user details:

Set-RemoteMailbox -Identity "current.username@domain.com-Alias "newalias"

 

Parameters:

-Identity: The current user’s email or username.

-Alias: The new alias you want to assign.


Step 3: Verify the Change

To confirm the alias has been updated:

 

Get-RemoteMailbox -Identity "john.doe@company.com" | Select Name, Alias