Email Delivery Troubleshooting

To check.

Is SPF records setup correctly? http://mxtoolbox.com/

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
@example.com [mail.example.com]

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 “example.com” 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 https://support.microsoft.com/en-us/kb/2852386
  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.

https://amionrails.wordpress.com/2016/04/12/how-to-enable-cleanmgr-windows-cleaning-program-on-windows-2008/

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: https://example.com/Autodiscover/Autodiscover.xml

Set-UMVirtualDirectory –Identity: “SERVER_NAME\UnifiedMessaging (Default Web Site)” –InternalURL: https://example.com/UnifiedMessaging/Service.asmx

Set-UMVirtualDirectory –Identity: “SERVER_NAME\UnifiedMessaging (Default Web Site)” –ExternalURL: https://example.com/UnifiedMessaging/Service.asmx

Set-ActiveSyncVirtualDirectory –Identity: “SERVER_NAME\Microsoft-Server-ActiveSync (Default Web Site)” -InternalURL: https://example.com/Microsoft-Server-ActiveSync

Set-ActiveSyncVirtualDirectory –Identity: “SERVER_NAME\Microsoft-Server-ActiveSync (Default Web Site)” -ExternalURL: https://example.com/Microsoft-Server-ActiveSync

Set-WebServicesVirtualDirectory –Identity “SERVER_NAME\EWS (Default Web Site)” –InternalUrl: https://example.com/EWS/Exchange.asmx
Set-WebServicesVirtualDirectory –Identity “SERVER_NAME\EWS (Default Web Site)” –ExternalUrl: https://example.redtechnology.com/EWS/Exchange.asmx

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:

http://exchange.sembee.info/2007/install/multiplenamessl.asp

https://www.sslshopper.com/article-how-to-use-ssl-certificates-with-exchange-2007.html

 

 

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;

to

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:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=50131

Connection Strings for SQL Server 2012

https://www.connectionstrings.com/sql-server-2012/

https://www.connectionstrings.com/sql-server-native-client-11-0-oledb-provider/

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

https://www.microsoft.com/en-us/download/details.aspx?id=16978

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

Microsoft.SqlServer.Management.PSProvider.dll

Microsoft.SqlServer.Management.PSSnapins.dll

 

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

default:
delivery_method: :smtp
smtp_settings:
address: your_server_sending_emails
port: 25
domain: your_domain
authentication: :none
user_name:
password:
    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

./ctlscript.sh restart apache