Wednesday, November 05, 2008

Customising the Error Message for IP Block List Providers in Exchange Server 2007

One of the things I did for blocklist error messages in Exchange Server 2003 was to provide the lookup URL for the affected IP address. This makes life easier for the other end when they try to diagnose why their mail wasn't delivered.

Microsoft's Knowledge Base article 823866 details how to go about doing this by using the variables %0, %1 and %2.

When I performed my SBS2003 to SBS2008 migration, I went to do customise the blocklist error messages, but found that %0, %1 and %2 don't work. After some mucking around I found that {0}, {1} and {2} work instead.

Here's the Powershell command I used to add a custom error message for lookups done against the Spamhaus list:

Add-IPBlockListProvider -Name zen.spamhaus.org -LookupDomain zen.spamhaus.org -AnyMatch $True -Enabled $True -RejectionResponse "{1} has blocked your IP address ({0}) using the list '{2}'. Please see http://www.spamhaus.org/query/bl?ip={0} for further information."

1 comment:

Anonymous said...

using ip block list providers in conjunction with the connection filter agent is a very good way of keeping spam out of exchange 2007. there is a very good post about this over here http://www.allspammedup.com/2008/12/using-ip-block-list-providers-and-the-connection-filter-agent-in-exchange-2007/ that explains in general how ip block list providers and the connection filter agent can be used to improve spam filtering for exchange 2007