Friday, 18 May 2012

Test SMTP through Telnet

Sometimes you need a tool to verify if SMTP is enabled and if it is able to relay messages.  Telnet is great for that.  Also Putty is a great Telnet client.

Below are the steps to send a mail using telnet or Putty.

You do/type this Server responds with
Telnet to hostname on port 25 220 (then identifies itself - possibly with several lines of 220 + text)
HELO your_domain_name or whatever 250 (followed by human readable message)
MAIL (ie, your email address) 250 is syntactically correct (or similar)
RCPT (email address you want to send to) 250 is syntactically correct
DATA Tells you to send data then CRLF period CRLF at end
You type your message then CRLF period CRLF (ie, type a period on a line by itself then hit ENTER) 250
QUIT Signoff message

Thursday, 17 May 2012

Installing a SSL Certificate in Exchange 2010

To import a SSL Certificate use the below command

Import-ExchangeCertificate -FileData ([Byte[]]$(Get-Content -Path c:\CERTNAME.pfx -Encoding byte -ReadCount 0)) -Password:(Get-Credential).password

To enable a service on the cert, make sure you get the thumbprint of the cert which you can get by using the following command Get-exchangecertificate |fl  and then use the below command to assign a certificate.

Enable-ExchangeCertificate -Thumbprint E8C1BB735FA57C4E70988420CE247263AD92DC65 -Services "iis,imap,pop"

If you do SSL offloading then make sure you use the DoNotRequireSSL tag after the command look below for example

Enable-ExchangeCertificate -Thumbprint E8C1BB735FA57C4E70988420CE247263AD92DC65 -Services "iis,imap,pop" -DoNotRequireSsl

Monday, 7 May 2012

Manually Update the Global Address List in Exchange 2010

Here is the command to update the GAL in exchange.  If your address list is not the default add the name in.

update-globaladdresslist -identity "default global list"

To update the users cache copy faster also make sure you sync your CAS server's also.

Update-FileDistributionService -Identity Server1 -Type "OAB"

Now if the user manually updates their address book using outlook they will download the latest copy.