Thursday, August 30, 2007

Change SMTP port 25 in Exchange 2007

For some reason you might want to change default SMTP port number 25 Exchange 2007 is using. Exchange 2007 uses RECEIVE AND SEND connectors, one for receiving mails and other for sending mails (obviously ;)

So you need to change ports on those connectors. I will not say those two, because you might be using more than two.

You change Receive connector port by opening the connector properties in Exchange Management Console --> Hub Transport --> RECEIVECONNECTORNAME --> Properties --> Network --> Local IP Addresses (Edit Receive Connector Binding)

 
Just to clarify what "Local IP Addresses" and "Remote Servers" are (from Exchange 2007 help), because I find it little bit confusing:
 
Use these local IP Addresses to receive mail
Use this list to specify the IP addresses and port numbers on which this Receive connector listens for incoming mail.
 
Receive mail from remote servers which have these IP addresses
Use this list to specify the remote IP address range from which this Receive connector accepts connections.

You change Send Connector port by using PowerShell. Open Exchange Management Shell and type:

Get-SendConnector -Identity "SENDCONNECTORNAME" | fl

Check the port number then type:

Set-SendConnector -Identity "SENDCONNECTORNAME" -port 26

In this example I set port 26 as SMTP port for sending messages. Check the change by typing

Get-SendConnector -Identity "SENDCONNECTORNAME" | fl


HUB and EDGE servers are responsible for mail transport, so include all the servers you need in your requirement.

Tuesday, August 28, 2007

How can you bypass sender or sender's domain in Exchange 2007 Content filter anti-spam agent

You can bypass Content Filter agent for sender or senders that you know are ok. You do that by entering sender's e-mail address into the allowed list.

Set-ContentFilterConfig -BypassedSenders dusan@exchangelog.info



If you want to bypass Content Filter agent for whole domain name then you use -BypassedSenderDomains within set-ContentFilterConfig command.

Set-ContentFilterConfig -BypassedSenderDomains burek.si, burek.info

Friday, August 24, 2007

Warning: The name of the security certificate is invalid or does not match the name of the site

If you use commercial SSL certificate for your organization's Outlook Web Access (OWA) you will have to manually change the certificate OWA uses since by default OWA uses self-signed certificate.

When you do that you need to enable new certificate for Exchange 2007 services. You do that by using Enable-ExchangeCertificate cmdlet in Exchange Management Shell. First:

Get-ExchangeCertificate | fl Subject, Thumbprint, Services

... to get the thumbprint of the certificate you want to enable for IIS and you previously imported into IIS. Then:

Enable-ExchangeCertificate -Thumbprint (COPYTHECORRECTTHUMBPRINTFROMPREVIOUSCOMMAND) -Services IIS

Now that your certificate is in place and enabled for IIS services you need to change Internal URL's to use new FQDN you are using in your certificate. If you don't do that you will get "The name of the security certificate is invalid or does not match the name of the site" warning when you start Outlook 2007. Let's presume your CAS server's name is CASSRV and the FQDN of the certificate is mail.exchangelog.info. So, to change internal URL's you need to run following commands:

Set-ClientAccessServer -Identity CASSRV -AutodiscoverServiceInternalUri https://mail.exchangelog.info/autodiscover/autodiscover.xml

Set-WebServicesVirtualDirectory -Identity "CASSRV\EWS (Default Web Site)" -InternalUrl https://mail.exchangelog.info/ews/exchange.asmx

Set-OABVirtualDirectory -Identity "CASSRV\OAB (Default Web Site)" -InternalUrl https://mail.exchangelog.info/oab

Set-UMVirtualDirectory -Identity "CASSRV\unifiedmessaging (Default Web Site)" -InternalUrl https://mail.exchangelog.info/unifiedmessaging/service.asmx

I suggest that you run get-WILLBEUSEDCOMMAND before you run Set- command where WILLBEUSEDCOMMAND is a command you plan to use in order to check/write down current settings always before you start changing things.

Related article: http://support.microsoft.com/default.aspx/kb/940726