• Home
  • Blog
  • Quotes
  • Words
  • Links

Curtis's Blog

The World From My Point Of View

You are here: Home / Geeky / Configure Qmail to Send Outgoing Email Through a Barracuda Spam Firewall

Configure Qmail to Send Outgoing Email Through a Barracuda Spam Firewall

December 22, 2008 by Curtis Leave a Comment

Well the title pretty much says it all.  This post is going to address a pretty specific situation.  You’re running qmail and you want to send all outgoing emails through your Barracuda spam firewall.  Easy right?  No, not easy… well not easy if you have no clue what you are doing.  And try to find some documentation on how to do it, I dare you.  It pretty much doesn’t exist.  After a couple weeks of searching and trying to get it to work myself, I decided to put together this little guide.

Now if you are installing qmail for the first time and are trying to figure out how to do this, then you are in an easier situation than I was.  Unfortunatly for me, my install of qmail was in full production mode and relied on daily by 30,000+ users.  I didn’t have the luxury of messing things up.

NOTE: This guide assumes that your qmail install is working to be able to at least send email.  If you need help with initial configuration, I suggest you check out qmailrocks.org.


The Guide

Configuring qmail to send outgoing mail to a spam filter requires setting up an SMTP smartroute. 

1.  Navigate to the qmail control files on your local machine.  The default location is /var/qmail/control

cd /var/qmail/control

2.  Open your smtproutes file for editing using your favorite text editor.

vi smtproutes

3.  Add the following line to this file:

:o utbound.yournetwork.com

Where (outbound.yournetwork.com) is the hostname of your barracuda spam firewall.  You can also use the ip address here if you would like.  The important thing is to remember the “:” in front.  This tells qmail to send all email to the spam firewall.  Other configurations are available.  They are as follows

aol.com:outbound.yournetwork.com
hotmail.com:
:smtpout.yournetwork.com

This tells qmail to send all mail addressed to aol.com addresses through outbound.yournetwork.com, all mail to hotmail.com addresses through the mail server normally, and all other email out through smtpout.yournetwork.com.

Once you have the proper configuration of your smtproutes file, save it.

Now create a new file for editing in the same directory called helohost.

vi helohost

Add the following line:

me

Now all you have to do is reload your qmail configuration by typing the following command.

qmailctl reload


Barracuda Configuration

There is a lot to properly configuring a Barracuda spam firewall and most of it is beyond the scope of this article.  However, I will tell you that there are two ways that it can be done.  If you are already filtering incoming email with your Barracuda and you don’t feel like forking over the cash for new hardware and subscriptions, then you won’t have much of a choice on how to do it.  Setup for this is easy.  Log in to your Barracuda admin panel as… well… an admin.  Click on the Advanced tab at the top.  Then click on Outbound Relay.  You will have to add the ip address of the machine that your qmail mail server is running on.  If you are adding a single ip address, make sure you use a subnet mask of 255.255.255.255.

That’s it.  You can test your configuration by simply sending an email through qmail like you normally would.  If it worked, you should see that in email in your Barracuda’s message log.

NOTE:  If you are using your Barracuda for both incoming and outgoing emails, it won’t filter the outbound email for spam score.  But it will compare them to external blacklists, scan for viruses, and significantly cut down on backscatter.

I realize that my quide may be vague.  But’s thats really all it takes.  Nevertheless, if you have any questions, please feel free to ask.  I will gladly try to help.  Cheers!

Filed Under: Geeky Tagged With: barracuda, firewall, outgoing, qmail, smartroute, smtp, spam

Comments

  1. Ben Thompson says:
    December 26, 2008 at 6:02 pm

    There’s some more information here if anyone’s interested

    Reply

Speak Your Mind Cancel reply

*

*

Subscribe below to be notified of new posts!


 

Return to top of page

Copyright © 2012 · Delicious Theme on Genesis Framework · WordPress · Log in