Email Delivery Troubleshooting

To check.

Is SPF records setup correctly?

IS the IP added to the SPF records?

Does the SPF contain hard fail which could prevent email delivery?

Has the server been changed recently e.g. moved to a different provider.

IS MX records setup correctly


Images in Emails.

If images are not displaying in Emails then it might means that “wrong SSL” is used or the receiver does not have CA of the sender.


How to setup mail relaying in postfix

In postfix

edit the following file

add the below line to /etc/postfix/sender_relay file []

run “sudo postmap /etc/postfix/sender_relay”

reload is not required.

Then check logs in /var/logs . tail -f /var/log/cluster.log | grep –line-buffered “” command might proof useful.

How to cleanup Winsxs folder on Windows 2008 R2 and Windows 7

For many years there was no feature which allowed removing unnecessary files from WinSxS folder. The size only grew to the point where nothing could be removed to free up some space on C: drive.

The below has also been described on Windows Sites but it seems it’s hard to find hence my post below.

  1. First please refer to
  2. You need to download one of the following files which are right for your system.
Operating system Update
All supported x86-based versions of Windows 7 DownloadDownload the update package now.
All supported x64-based versions of Windows 7 DownloadDownload the update package now.
All supported x64-based versions of Windows Server 2008 R2 DownloadDownload the update package now.

3. You need to enable the cleanmgr. This can be done by installing “Desktop Experience” from “Add feature” or by manually enabling cleanmgr.

I have described the manual process under my other post.

Once enabled.

4. Install the hotfix. From my experience, the reboot is not required so it should be fine to install it on the production server. I personally prefer to manually enabling the cleanmgr as you don’t need to install additional software which comes from Desktop Experience e.g. Windows Media Player.

5. Once installed run cleanmgr.

6. Cleanmgr should now discover few GB of old updates which can be removed.

If it does not work any reason or the files are not being removed then you may need to add Windows Desktop Experience Feature and try again.

Windows also mentioned that the reboot is required although it does not require a reboot or force you to do it.

How to change an exchange hostname to a new one with new FQDN SSL

Please make sure that you make a note of all the changes. There might be other configuration changes which are not included in the scope of this article.

This should not be treated as a guide/tutorial and it should only be used for informational only or training purposes.

There might an alert being displayed up to 24h from when it has been changed.

  1. Replace you SSL under IIS -> Default Site-> Security with a new one.
  2. Then correct Outlook Anywhere in Exchange Management Console under Client Server.
  3. Then issue the following powershell commands to  check your current configuration.

Get-ClientAccessServer | Select Name, *Internal* | fl

Get-UMVirtualDirectory | select identity,Name, *url* | fl

Get-ActiveSyncVirtualDirectory | select identity,Name, *url* | fl

Get-WebServicesVirtualDirectory | select identity,name,*url* | fl

Get-OABVirtualDirectory | select identity,name,*url* | fl

then you can amend the site using the new hostname/FQDN

Set-ClientAccessServer –Identity SERVER_NAME -AutoDiscoverServiceInternalUri:

Set-UMVirtualDirectory –Identity: “SERVER_NAME\UnifiedMessaging (Default Web Site)” –InternalURL:

Set-UMVirtualDirectory –Identity: “SERVER_NAME\UnifiedMessaging (Default Web Site)” –ExternalURL:

Set-ActiveSyncVirtualDirectory –Identity: “SERVER_NAME\Microsoft-Server-ActiveSync (Default Web Site)” -InternalURL:

Set-ActiveSyncVirtualDirectory –Identity: “SERVER_NAME\Microsoft-Server-ActiveSync (Default Web Site)” -ExternalURL:

Set-WebServicesVirtualDirectory –Identity “SERVER_NAME\EWS (Default Web Site)” –InternalUrl:
Set-WebServicesVirtualDirectory –Identity “SERVER_NAME\EWS (Default Web Site)” –ExternalUrl:

Sometimes it may take up 24h for the Outlook client reshresh settings.

You can also try to recycle app pool in IIS for

MSExchangeAutodiscoverAppPool or you may want to run iisreset /noforce on the server. To restart IIS Services.

Some more useful info:



How to fix [DBNETLIB]ConnectionOpen (SECDoClientHandshake()) SSL Security error CODE 80004005

I have recently have this issue on SQL Server 2012 with Windows Server 2012 R2.

The error was displayed one using OLE DP Provider in the VB script connection strings.
After looking at various google post explaining this issue nothing has worked.

To confirm the server is PCI DSS compliant and TLS 1.0 < and SSL are disabled.

I have changed the connection string from

‘connstring = “Provider=SQLOLEDB.1;


connstring = “Provider=SQLNCLI11;

this is to use native SQL Client Drivers to connect.

This has worked and no more issues the script complained.

Some background:

Connection Strings for SQL Server 2012

How to install SqlServerCmdletSnapin100 and SqlServerProviderSnapin100 – guide

How to Install Missing PowerShell Snap ins when you get

Add-PSSnapin : No spans-ins have been registered for Windows Powershell Version

Check if PSSnapin are already installed

get-PSSnapin –registered

If empty, then follow the process below.

Open up the following sites and download the following

Make sure you are downloading 64bit version for 64-bit powershell version

Microsoft® System CLR Types for SQL Server® 2008 R2

X64 Package (SQLSysClrTypes.msi)

Microsoft® Windows PowerShell Extensions for SQL Server® 2008 R2

X64 Package (PowerShellTools.msi)

Microsoft® SQL Server® 2008 R2 Shared Management Objects

X64 Package (SharedManagementObjects.msi)

Once installed

Check this location for files

C:\Program Files\Microsoft SQL Server\100\Tools\Binn\Redist

Or here

C:\Program Files\Microsoft SQL Server\100\Tools\Binn\

You need to find the following files




Very important for 64bit version use 64 bit version of framework.

Issue the following to check which version of framework your powershell is running


PS S:\> [environment]::version


Major  Minor  Build  Revision

—–  —–  —–  ——–

4      0      30319  42000


You need to point to v4 of framework or version v2 depends on your result and to a correct bit version!

The below is for .Net 2.0 Version

For 32bit use

set-alias installutil C:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil

for 64 bit use

set-alias installutil C:\Windows\Microsoft.NET\Framework64\v2.0.50727\InstallUtil

In this case my version of .net is 4 so I need to use the following

set-alias installutil C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil

then to the following

installutil -i “c:\Program Files\Microsoft SQL Server\100\Tools\Binn\Redist\Microsoft.SqlServer.Management.PSProvider.dll”

installutil -i “c:\Program Files\Microsoft SQL Server\100\Tools\Binn\Redist\Microsoft.SqlServer.Management.PSSnapins.dll”


If it does not install for any reason then make sure that your installutil point to the correct 32/64 bit version and to the correct framework. If this is not correct your installation will fail

Then issue the following

Add-PSSnapin SqlServerCmdletSnapin100

Add-PSSnapin SqlServerProviderSnapin100

And check

get-PSSnapin –registered

Name        : SqlServerCmdletSnapin100

PSVersion   : 2.0

Description : This is a PowerShell snap-in that includes various SQL Server cmdlets.


Name        : SqlServerProviderSnapin100

PSVersion   : 2.0

Description : SQL Server Provider

Any issues please let me know🙂



How to fix Fix the hostname does not match the server certificate error in bitnami redmine

if you are having the following error in Bitnami Redmine or just Redmine

Email delivery error: hostname “your domain” does not match the server certificate then you can fix it by adding the following to the config.

This is sometime ok if you are using smtp relay and don’t need to have the certification.

To fix this problem edit the following file

vim /opt/bitnami/apps/redmine/htdocs/config/configuration.yml

delivery_method: :smtp
address: your_server_sending_emails
port: 25
domain: your_domain
authentication: :none
    openssl_verify_mode: ‘none’

Make sure that is under smtp settings (use spaces insted of tabs in this config file) then you can reload the bitnami

./ restart apache