Exchange Server Share

February 6, 2009

How To: Customize RBL Rejection Response in Exchange 2007

Filed under: Exchange,Exchange 2007,PowerShell — Amit Tank @ 2:53 pm
Tags: , ,

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

8 Comments

  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?

    Comment by Mike Crowley — February 6, 2009 @ 5:13 pm

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

    Pingback by Weekend reading - subject: exchange — February 8, 2009 @ 12:13 pm

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

    Pingback by February 8, 2009 « Exchange Server Readings — February 8, 2009 @ 2:04 pm

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

    Comment by Xray — April 13, 2009 @ 3:34 am

  5. Excellent sharing!!!

    Comment by James Luo — April 13, 2009 @ 6:55 am

  6. Thanks James… :)

    Comment by Amit Tank — April 13, 2009 @ 11:52 am

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

    Thx,
    Julian

    Comment by Julian — August 8, 2009 @ 2:52 am

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

    Comment by Andreyy Folangovich — October 3, 2009 @ 4:21 pm


RSS feed for comments on this post.

The Rubric Theme Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 29 other followers

%d bloggers like this: