Home > GroupWise > SPAM Filter Whitelisting on a Barracuda

SPAM Filter Whitelisting on a Barracuda

We just got a new Barracuda SPAM firewall for our GroupWise system. We had an older SPAM filtering solution, but it hasn’t kept up with the latest SPAM techniques, so it is starting to lose effectiveness in blocking SPAM. On the old system we had built up a big (about 120 entries) whitelist that prevents our client’s emails from being tagged as spam. I have the whitelist in a big file, and I wanted to add it to the Barracuda. Unfortunately, the Barracuda’s user interface only allows the addition of any list parameters one item at a time.

firewall-whitelist.png

This would have made loading the whitelist really annoying. I figured there must be a way to automate it, and I started out by trying to reverse-engineer the form by looking at the page source. This probably would have worked, but when I was looking at the Barracuda documentation, I noticed an API document. It tells you how to use some administration CGI scripts to automate configuration changes. I wrote a little C# program and bash script to stuff my whitelist into the SPAM firewall, and it worked. You can modify any configuration parameters using this technique in the Barracuda. Here’s my little program listing. I used mono to run it, and stuffed each whitelist entry into the firewall one at a time with a looping bash script.

// file:  change.cs
using System;
using System.Text;
using System.Net;
using System.Net.Sockets;

public class change
{
  public static int Main(string[] args)
  {
    if(args.Length!=2)
    {
       Console.WriteLine("change parameter value");
       return -1;
    }

    string web_url = "http://cuda.mynet.com:8000/cgi-bin/config_add.cgi";
    string param = "?variable=" + args[0] + "&value=" + args[1];
    Console.WriteLine(web_url + param);
    WebClient web_client = new WebClient();
    Byte[] page_in_bytes = web_client.DownloadData(web_url + param);
    string page_source = Encoding.ASCII.GetString(page_in_bytes);

    Console.WriteLine(page_source);
    return 0;
  }

}

Build the program like this:

mcs change.cs

.
Then, call it like this to add items to the whitelist:

mono change.exe mta_acl_domain_allow_name whitehouse.gov

This would whitelist whitehouse.gov. Do that once per domain name you want to whitelist, and voila!

About these ads
Categories: GroupWise
  1. Matt Schlawin
    2009-10-06 at 05:55

    Hi Scott,
    I am looking for a GroupWise plugin for the Barracuda SPAM filter to update the one that I have. You were referred to me as someone who might be doing that.

    I have been running Barracuda since 2004 and I had a plugin that added SPAM and NOT SPAM buttons to the GroupWise interface. It was working great until I updated the firmware on the Barracuda last weekend. I have the source code but have no clue on how to update it.

    Are you thinking of writing a plugin for Barracuda? I”d be interested!

    Thanks for your time.

    Matt

  2. aybee
    2011-03-30 at 13:18

    Hi Scott, interesting blog, wonder if you can help, i work at a hosting company and need to retrieve black and white lists from barracuda 4 using the api for each domain that we have sat on barracuda. Is this possible? I can get all the domains listed aswell as all the users but not sure how i can get custom rbls off it along with allowed, we are looking at migrating away from barracuda.

    Thanks

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: