Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 13th December 2010, 23:49
mintydave mintydave is offline
Junior Member
 
Join Date: Dec 2010
Posts: 23
Thanks: 2
Thanked 0 Times in 0 Posts
Default The Perfect SpamSnake - Ubuntu Jeos 10.10 - Managing transport relay_domains etc

First, thank you for the SpamSnake. I've been running two for almost 3 years now and have filtered MILLIONS of emails.

On my Hardy (Ubuntu 8.04) SpamSnake, I got used to using Webmin's MySQL to manage the greylisting "whitelist" table, and the file in /etc/postfix for "transport", "relay_domains" and "relay_recipients" and others.

I see now that MySQL is playing a bigger roll in the spamsnake.

I copied my "transport" "relay_domains" etc.. from my old hardy spamsnake to my new spamsnake. Did a "postmap transport" and fed the snake a simple email from the command line using telnet.

I tailed the "/var/log/mail.log" file and found that postfix used DNS to deliver the email instead of using the designated IP addresss of the host for deliver from the "transport" list.

Is there a rerference for managing the postfix features now? Do we use MySQL or continue using the local files in /etc/postfix.

Any assistance is GREATLY apreciated.


Regards,
David,
Deconn Technical Services
Reply With Quote
Sponsored Links
  #2  
Old 14th December 2010, 05:09
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Hey,

3yrs is indeed a long time. I'm happy that it's working out for you.

If you want to use the relay_domain and transport files from your older boxes, you'd have to edit /etc/postfix/main.cf and make it look like:

relay_domains = hash:/etc/postfix/relay_domains
transport_maps = hash:/etc/postfix/transports

Make sure to edit those files accordingly and postmap them.

I've gone with a much easier approach to setting up the Snake,
almost everything can be done through Baruwa. The mysql setup is
the best way to do it now, since all the records can be created through
the frontend with the exception of relay_recipients. Of course you can
always use the system the old school way, the way you've been doing it
without any issues. You just have to make sure main.cf is set up
appropriately and also the associated files.

Rocky
__________________
Home of the SpamSnake
Reply With Quote
The Following User Says Thank You to Rocky For This Useful Post:
feeninuoumn (19th December 2013)
  #3  
Old 14th December 2010, 05:26
mintydave mintydave is offline
Junior Member
 
Join Date: Dec 2010
Posts: 23
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Rocky View Post
I've gone with a much easier approach to setting up the Snake,
almost everything can be done through Baruwa.
I greatly appreciate you response and your work on the snake.

Where in Baruwa do I manage the greylist feature's whitelist? I have hundreds of IP addresses that I would like the greylist to ignore.

The way I use the snake is all the mx's for my clients point inbound to the snake, then the snake, sitting behind the firewall, delivers the email to my client's email server via IPSEC tunnels. I was not able to find out where to configure the transport host for a domain. i.e. where is the equivalent of this entry from the "transport" file in /etc/postfix:

Code:
deconn.com   smtp:[192.168.100.10]

Regards,
Dave.
Reply With Quote
  #4  
Old 14th December 2010, 05:54
mintydave mintydave is offline
Junior Member
 
Join Date: Dec 2010
Posts: 23
Thanks: 2
Thanked 0 Times in 0 Posts
Default

So i'm digging around looking for the answers anyway.

Found this:
http://www.baruwa.org/users.html

The document says:

Quote:
Settings

The settings tab provides access to the following::

* User accounts management
* Domain management
o SMTP delivery host management
o Authentication management

* Scanner engine configuration
Looks like "SMTP delivery host management may be what I'm looking for. But on my Baruwa user interface, I only have "Accounts" and "Scanners" options. I don't have a "Domain Management" option, however I do see there is are "Domain Name", "Owner", "Status" and "Actions" columns when I click on the "Settings" tab.

From that screen, I do not see any option buttons or text boxes to make any SMTP delivery host changes.

Making the SMTP delivery settings is a critical feature for me. Thanks for your help.


Regards,
Dave.
Reply With Quote
  #5  
Old 14th December 2010, 14:10
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Hey,

This should walk you through the process.

Baruwa Setup Instructions:

Log into Baruwa as admin --> Settings --> Accounts --> Create Account
Once you've created the user, you'll get 2 new tabs on that page, Profile Settings and Associated Addresses

Fill out Profile Settings choosing Domain Admin and set a low score of 6 and a high score of 9 and check scan email.

Fill out the Associated Addresses or domains for which the user is the admin of eg. domain.com. domain.com will show up under the Associated Addresses header.

Click on domain.com and you'll be taken into Domain Information, where you'll be able to setup SMTP delivery information. Go ahead and add the smtp server, or the ip of the receiving smtp server. Select enable and if you use a non-standard port, set it, otherwise use 25. Once you've done that, you can click on the test button next to the pencil, to see if your receiving server will accept the connection.

Now, you can log out as admin, and log in as the user you just setup and mails should start flowing.
*Note: The user will be the Domain Admin for whatever domains you specify in Associated Addresses.

The relay_domains and transports settings in main.cf will use the entries you've provided in Baruwa. Therefore, no hash file is required. The queries will pull the result in the proper format and feed it to postfix for use.

However, if you'd like to use a hash for any of your config files, just set your /etc/postfix/main.cf to look like this example:
relay_recipient_maps = hash:/etc/postfix/relay_recipients
Of course, you would have to create the hash file, populate it and postmap it for postfix to use. You can also do this with relay_domains and transports if you'd like.
*Note: If you do end up using a hash for relay_recipients, you'll have to remove the look_ahead feature.

Also, since you need to do mx lookups, you'll have to edit /etc/postfix/mysql-transports.cf to look like:
concat('smtp:', mail_hosts.address, ':', port) 'transport'I removed the [ and ] to allow MX lookups.

Rocky
__________________
Home of the SpamSnake
Reply With Quote
  #6  
Old 15th December 2010, 17:36
mintydave mintydave is offline
Junior Member
 
Join Date: Dec 2010
Posts: 23
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Once again, thank you for your help. I am super impressed with the new architecture of the snake.

I actually did this howto on top of Ubuntu 10.04 Lucid because I wanted to run this box for quite a while.

I got Baruwa configured and I like it mutch better as a front end for MailScanner. I actually had no idea that I could set up accounts for each client to manage their own spam trails, so I will continue to monitor my now 'in-production' snake and then slowly disclose to my clients how to log into the Baruwa and manage and track their own spam and quarantines.

As I continue to monitor my snake, I see that the greyfix is a busy process. I use Splunk to monitor the box and there are a lot of greylist entries.

I know the Hardy-based snake used PostGrey and I managed the greylist in MySQL (where I have almost 1000 entries.) As effective as the greylist feature is, it did create some confusion for my client's senders and for my help desk. Should I just try out the new greylist system and live with it's out-of-the box functionality? -- or -- should I use the suggestions from the website (http://www.kim-minh.com/pub/greyfix) to implement the whitelist?

One of my next projects related to the snake is to setup either a central MySQL server so I can run two postfix gateways and one MySQL server. Alternatively, I will learn how and implement a MySQL synchronization so the databases will use the same features and I can have a truly centralized way to manage the snake "heads".

I wonder how the snake compares in features and performance to the Baracuda appliance.

Thanks again.

Dave.
Deconn Technical Services
Reply With Quote
  #7  
Old 15th December 2010, 18:10
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Hey Dave,

Greyfix is much like postgrey or sqlgrey in that it does the same thing when it sees a mail for the first time. The actions are identical, but greyfix is much lighter than any of those. Yes, you'll see those processes running because greyfix is setup to kill old processes and start new ones. This keeps the processes running and stops any from locking up.

As for the whitelist entries, what I've done with this Snake was setup a global whitelist. If you log in to Baruwa --> List, you can add whitelist/blacklist entries. These entries are queried by postfix using the mysql-global_whitelist.cf file. If an entry is found in the whitelist, it bypasses grey, rbl, spf and mailscanner checks. This was something I thought long and hard about because I wanted to have a common whitelist.

As for running multiple instances, the developer of Baruwa has that on his roadmap. He's going to develop Baruwa so that we can use a common database. Of course this is a way down the line.

Give it a go, test it out. I think hooking Baruwa into the common db will be the trick, but the mysql replication is not hard at all.
__________________
Home of the SpamSnake
Reply With Quote
The Following User Says Thank You to Rocky For This Useful Post:
mintydave (15th January 2011)
  #8  
Old 15th December 2010, 18:33
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

Quote:
Originally Posted by Rocky View Post
Hey Dave,

As for running multiple instances, the developer of Baruwa has that on his roadmap. He's going to develop Baruwa so that we can use a common database. Of course this is a way down the line.

Give it a go, test it out. I think hooking Baruwa into the common db will be the trick, but the mysql replication is not hard at all.
Actually you already can do that. You can run two nodes with multi master replication with both nodes logging to their own DB and the DB's replicating the changes between each other, you can login in to either box and you will see the same thing. You will not even notice that you are using a two node cluster.
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
The Following User Says Thank You to topdog For This Useful Post:
feeninuoumn (20th December 2013)
  #9  
Old 15th December 2010, 19:34
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

There you go Dave, that's coming from the man who's making all this possible. I totally forgot that it's already capable, since I don't really use that feature.
__________________
Home of the SpamSnake
Reply With Quote
  #10  
Old 17th December 2010, 17:46
mintydave mintydave is offline
Junior Member
 
Join Date: Dec 2010
Posts: 23
Thanks: 2
Thanked 0 Times in 0 Posts
 
Default

Quote:
Originally Posted by topdog View Post
Actually you already can do that. You can run two nodes with multi master replication with both nodes logging to their own DB and the DB's replicating the changes between each other, you can login in to either box and you will see the same thing. You will not even notice that you are using a two node cluster.
Not being a DB Admin I'll have to dig in and research, but I'm sure I can figure it out. Thanks for pointing my sail on this.


Dave.
Deconn Technical Services
Reply With Quote
Reply

Bookmarks

Tags
maverick, postfix, spamsnake

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Perfect SpamSnake - Ubuntu Jeos 10.10 Maverick Meerkat - transportmaps tahussle HOWTO-Related Questions 21 5th December 2010 04:17
The Perfect SpamSnake - Ubuntu Jeos 10.10 Maverick Meerkat tahussle HOWTO-Related Questions 4 3rd December 2010 12:06
Connection timed out on intermail outgoing mails gouravgarg Server Operation 6 5th March 2010 20:31
MailScanner trouble with DBD-MYSQL sergio.arnaldo Server Operation 11 26th August 2009 18:08
SpamSnake SpamAssassin not working? getrav HOWTO-Related Questions 5 23rd June 2008 23:02


All times are GMT +2. The time now is 13:59.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.