SharePoint: Why do alert emails work but others don’t?

Problem

We have set up the correct email SMTP server in Central Administration and everyone is receiving their email alerts correctly.  When we add new users to the site it always fails to send the email reporting an error has occurred.

Investigation

The error in the SharePoint ULS logs shows that the SMTP server connection failed. 

Cannot connect to SMTP host your.smtp.server

Analysis

For any SMTP testing you rely on Telnet by running the command

telnet your.smtp.server 25

This is likely to fail as well with a similar error,  which immediately leads you to the conclusion that the there is a problem with the SMTP server. 

However there is a niggling doubt – if the SMTP server is not working how do the alert emails get sent?

Root Cause

After a bit of investigation the problem can be traced back to the Anti Virus software.  You will likely have checked the Firewall and ensured that it was not blocking and thought nothing of the Anti Virus as this isn’t really what it’s for.

However most Anti Virus software will have some form of Email Worm protection built in and this will be enabled.  In my example the server had McAfee Anti Virus installed and has a protection called:

“Prevent Mass Mail Worms form sending emails”

Editing the properties shows an include wild card (* << meaning everything) and a list of excluded applications.  In this list of applications you will find OWSTIMER.EXE.

OWSTIMER.EXE is the SharePoint Timer Service and is used to send all email alerts.

Fix

Add W3WP.EXE to the list of excluded applications and McAfee Anti Virus will then allow your emails from forms like the Add Users page to be sent as well.

W3WP.exe is the worker process used by IIS to run your SharePoint sites.

The problem was not related to how SharePoint was configured but down to the fact that SharePoint sends emails using a number of processes and each of these need to be allowed to use SMTP.

This entry was posted in SharePoint and tagged , . Bookmark the permalink.