Exchange 2007 / 2010 change the SMTP Banner

KB ID 0000327

Problem

If you want to shield the outside world from seeing what mail platform you are running, or even if you just want to deter the casual script kiddy who is trying to remote fingerprint a massive range of IP addresses. Changing the SMTP response banner is quite simple to do.

Out of the box we know we are running a Microsoft mail platform

Solution

1. Open Exchange System Manager and find the name of your “Receive Connector” (Server Configuration > Hub Transport > Receive Connectors).

2.Open the “Exchange Management Shell” and issue the following powershell command,

[box]Set-ReceiveConnector “name of the connector” -Banner “220 The text you want to display”[/box]

3. Then your banner should be changed (you don’t need to restart anything).

Changing the SMTP Banner for Exchange 2000 / 2003

1. Drop to command line and issue the following commands,

[box]

cd c:inetpubadminscripts
cscript adsutil.vbs set smtpsvc/vsi number/connectresponse “220 The text you want to display”

[box]

Note: c:inetpubadminscriptsadsutil path may be different in your Exchange server. And “vsi number” is the number of your SMTP virtual server, this is nearly always 1, check in your Exchange System Management console to make sure.

How to locate your VSI Number

2. Then restart the SMTP service.

Related Articles, References, Credits, or External Links

NA

Exchange 2007 / 2010 Search for and Delete Emails Containing “yoursearchtext”

KB ID 0000343

Problem

You have a nasty email that contains a virus or some offensive content and you want to delete ALL instances of it.

Solution

1. Log on as the domain administrator > Open the Exchange Command Shell.

2. First grant the correct rights to the administrator account.

This gives the Administrator FULL rights to ALL mailbox’s

[box]Get-mailbox -Database “Mailbox Database”| add-mailboxpermission -user administrator -AccessRights FullAccess[/box]

Note: this assumes your mailbox database is called “Mailbox Database”.

3. Then locate and delete the emails containing “yoursearchtext”.

[box]Get-Mailbox -Database “Mailbox Database” | Export-Mailbox -SubjectKeywords “yoursearchtext” -DeleteContent[/box]

Note: If you are unable to use the export-mailbox command then see here

Related Articles, References, Credits, or External Links

NA