If you are using the POP3 Connector on Windows SBS 2008, you may encounter this error in the event log
One or more (5) e-mail messages in the POP3 mailbox account ‘<email address>’ on the POP3 server ‘<server name>’ have invalid header fields. Because of this, the messages cannot be delivered to the Exchange Server mailbox ‘<mailbox>’ in Windows Small Business Server. The messages are still on the POP3 server. To resolve this issue, connect to the POP3 mailbox account, and then manually retrieve or delete the messages.
By default the POP3 connector will stop processing new messages after 5 protocol errors so once this happens, you will not receive any email.
The quickest and easiest thing to do is to increase the MaxProtocolErrors from 5 to something bigger like 999. You can do this with the following command:
Set-ReceiveConnector -identity ($Env:computername + “\Windows SBS Fax Sharepoint Receive ” + $Env:computername) -MaxProtocolErrors 999
This will allow the remaining messages to be downloaded, but the messages with invalid headers will still not be downloaded. Once you accumulate 999 messages with invalid headers, the problem will still occur.
To fix this you either have to login to your ISP’s mail server and delete the messages manually or figure out why the messages have bad headers. In my case, the problem was that the messages had an invalid Return-Path: header that looked like this:
I noticed that most of the messages were automated responses such as “out-of-office” replies. The problem is the MAILER-DAEMON is not a valid email address format. Valid email addresses must have an @ sign in them. The workaround I found was to tell Exchange to append the local domain name. Here is the command for that:
Set-ReceiveConnector -Identity ($Env:computername + “\Windows SBS Fax Sharepoint Receive ” + $Env:computername) -DefaultDomain $Env:UserDNSDomain
Once I did that, the POP3 connector was able to download the messages with invalid headers and the errors in the event log went away.