Exchange Server Share

… Information sharing on Exchange Server …

How To: Customize RBL Rejection Response in Exchange 2007

When RBL is configured in Exchange Server and any message gets blocked, sender gets the bounce back response. This response can be customize to provide some vital information to sender like which IP blocked, why and where so it makes easier for them to go for further digging.

Exchange 2003:
It is explained in below couple of articles that how to configure RBL with custom error message to return.
- Exchange Server 2003 Real-Time Block Lists
- How to configure connection filtering to use Realtime Block Lists (RBLs) and how to configure recipient filtering in Exchange 2003

Default error RBL message is following in Exchange 2003:
     <IP address> has been blocked by <Connection Filter Rule Name>

And we can set custom error message with below variables.
%0: IP address of the sending mail server
%1: Rule name of the connection filter
%2: The RBL provider

For example, if you want custom message to read:
The IP address <IP address> has been blocked by the following RBL provider <RBL provider name>
You would enter the following in the custom error message:
The IP address %0 has been blocked by the following RBL provider %2.

Exchange 2007:
It is explained in below article that how to configure IP block list provider with rejection response.
How to Configure IP Allow List and IP Block List Providers

But how to set custom inputs based on RBL response to the rejection response? Looks like it is not documented on TechNet. Well, here is the trick…

To configure custom rejection response we can use below variables.
{0}: IP address of the sending mail server
{1}: Rule name of the connection filter
{2}: The RBL provider

An Example:
Add-IPBlockListProvider -Name:SpamCom -LookupDomain:bl.spamcop.net -AnyMatch $True -RejectionResponse "IP address {0} has been blocked by the RBL provider {2} due to rule ({1}). Please check http://www.spamcop.net/w3m?action=checkblock&ip={0} for further detail."

 

Why I wrote this blog article?
Thanks to my friend Mike Crowley for raising hand on this :)

About these ads

Written by Amit Tank

February 6, 2009 at 2:53 pm

8 Responses

Subscribe to comments with RSS.

  1. Wow, now I know what its like to be famous!!! Seriously though, thanks again! How did you learn this? Trial and error with every button on the keyboard? Or is this standard Powershell syntax and you just translated it to Exchange?

    Mike Crowley

    February 6, 2009 at 5:13 pm

  2. […] How To: Customize RBL Rejection Response in Exchange 2007 […]

  3. […] Posted by Amit Tank on 2009/02/08 How To: Customize RBL Rejection Response in Exchange 2007 […]

  4. Кстати, я сейчас посмотрел, ваш блог в Яндексе хорошие места занимает ,если название сайта туда вбивать.

    Xray

    April 13, 2009 at 3:34 am

  5. Excellent sharing!!!

    James Luo

    April 13, 2009 at 6:55 am

  6. Thanks James… :)

    Amit Tank

    April 13, 2009 at 11:52 am

  7. Can you just drop the message without sending the Rejection Response back to the sender?

    Thx,
    Julian

    Julian

    August 8, 2009 at 2:52 am

  8. Сайт посвящён самому важному аспекту в интернете – это фильмы, игры, музыка, новости, юмор, интересные статьи, софт, скрипты и так далее…

    Andreyy Folangovich

    October 3, 2009 at 4:21 pm


Comments are closed.

Follow

Get every new post delivered to your Inbox.

Join 34 other followers

%d bloggers like this: