Forget SpamAssassin, Use MailWasher with Scalix!

Best practice information from Scalix users relating to integration of Scalix with other products.

Moderator: ScalixSupport

jpreston
Posts: 26
Joined: Thu Mar 02, 2006 6:17 pm
Location: Columbus, OH
Contact:

Forget SpamAssassin, Use MailWasher with Scalix!

Postby jpreston » Tue Jun 13, 2006 2:50 pm

This HOWTO is no longer maintained here!

Please visit the Wiki HOWTO page located at http://www.scalix.com/wiki/index.php?title=HowTos/Mailwasher

==============================================

Hey everyone!

I thought I'd write up a quick MailWasher + Scalix HOWTO.

First, let's start with some disclaimers, basic links and reference information.

==================================================================================

MailWasher and Scalix v.99

==================================================================================

Disclaimer

I am not, nor do I profess to be any sort of Sendmail, Scalix or MailWasher expert. Furthermore, while the techniques I describe below worked for me, your mileage may vary. To that extent, please be sure to read all documentation available to you as I will not take responsibility for any mistakes or typos made. I have checked this document for its accuracy, but I may have missed something during the process, or your configuration may require additional steps or options not discussed in this HOWTO.

Neither Scalix, MailWasher, nor Sendmail have officially supported this setup in any fashion, and they probably do not claim it to be functional and probably will NOT offer any support. If you have any problems, I can assist you with basic help, but you're pretty much on your own. I may offer more detailed instructions as time permits, however, I am mainly writing this as reference for myself in the event I need to do it again.

==================================================================================

Links to required software

http://www.scalix.com
http://oss.firetrust.com

Please note that MailWasher is setup as a Sendmail Milter, which may not be recommended by Scalix.

==================================================================================

Reference Information

http://oss.firetrust.com/docs/linux-install.html
http://www.scalix.com/wiki/index.php?title=Scalix/Sendmail_%26_Amavisd-New_HOWTO

==================================================================================

What is MailWasher Server?

<exerpt from oss.firetrust.com>

Code: Select all

MailWasher Server is an open-source, server-side junk mail filter package for businesses. MailWasher Server differs from other open-source server anti-spam packages in that it offers a polished, well-integrated web interface and built-in quarantine management facilities. MailWasher Server is easier for administrators to set up and manage and easier for users to use the product on a day-to-day basis. MailWasher Server fully supports Windows Server/Exchange Server systems, in addition to Unix-based systems such as Linux and Solaris.


==================================================================================

Why MailWasher Server?

Well, as the description above indicates, MailWasher Server possesses an extremely well polished web interface for quarantined messages. It is simple, easy and effective. It's ease of use hits a home run with non-expert users and it provides very powerful system for efficient administration of the SPAM filtering process.

Additionally, some of its nice features include a global white and black list, per user white and black list, as well as per user configuration changes. While complete integration with Scalix is not there, end users will be right at home with the easy and simple to use interface.

MailWasher Server is also Open Source with commercial support available at the per incident or contract level, which may ease the concern for some users.

I prefer it because of the ability to send Quarantined Message Summaries on a great number of customizeable (on the global level and per user level) options, such as, once per week, month, or per any number of quarantined messages. It also allows users to manage their own spam retrieval instead of forcing the administrator to assist or otherwise control it.

==================================================================================

Assumptions

For the sake of NOT repeating installation instructions that can be found elsewhere, I will stop here and say that you MUST have a working Scalix installation. I will point you to the document on proper installation of MailWasher which you must follow up to the "Installing the mail conduit" and "Sendmail" portions of the MailWasher Linux Installation document listed above.

I personally downloaded and installed the MailWasher RPM for Fedora Core 4, which I would recommend as the easiest method of MailWasher installation.

==================================================================================

Installing the mail conduit

This assumes you are using Scalix in the STOCK configuration, meaning Sendmail is your MTA, and you have completed all installation tasks up to Installing the mail conduits in the MailWasher installation documents or installed via RPM.

Let's turn on MailWasher debugging by editing /etc/mwserver.conf and adding the following line to the end.

Code: Select all

log_level=debug


Setup MailWasher to start at boot.

(On Fedora at least)

Code: Select all

chkconfig --level 345 mwserver-mpd.sh on
chkconfig --level 345 mwserver-mwi.sh on


Additionally, I had to perform the following after the RPM installation of MailWasher, but prior to starting the services.

Code: Select all

chown -R mwserver:mwserver /var/run/mwserver
chmod 750 /var/run/mwserver
chown -R mwserver:mwserver /var/log/mwserver
chown -R mwserver:mwserver /var/lib/mwserver


Start MailServer if not already started.

Code: Select all

/etc/init.d/mwserver-mpd.sh start
/etc/init.d/mwserver-mwi.sh start


Be sure to configure MailWasher if you have not done so already. Configuration is performed via a web based configuration process which is fairly simple and provides online help.

Point a web browser to:

http://your.server.name.local:4044 and follow the instructions.

Note: During the installation process, you will be prompted for FirstAlert! information. While you do NOT have to set this up at this time, you can either purchase a new subscription to FA! or get a trial account by visiting http://oss.firetrust.com/shop/. If you opt to not configure it now, you can always add the support at any time by logging into MailWasher as an administrator and setting it up at a later date.

Backup your sendmail configuration.

Code: Select all

cp -Rp /etc/mail /etc/mail.backup
cp -p /var/opt/scalix/sys/smtpd.cfg /var/opt/scalix/sys/smtpd.cfg.orig


Next, we need to add two lines to the end of your /etc/mail/sendmail.mc file.

Code: Select all

INPUT_MAIL_FILTER(`mailwasher_server',    `S=unix:/var/run/mwserver/mpd.sock, F=T, T=S:4m;R:4m')
define(`confINPUT_MAIL_FILTERS', `mailwasher_server')


NOTE: For the sake of argument, do not include any blank lines between commands in the sendmail.mc file!

Now, we need to compile the sendmail configuration. This step requires the sendmail-cf package to be installed, so if it isn't installed, please do so before proceeding.

Code: Select all

m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf


Now, let's tell Scalix to use an SMTPFILTER, edit /var/opt/scalix/sys/smtpd.cfg and add the following to the end of the file.

Code: Select all

SMTPFILTER=TRUE


Now, configure Scalix to modify your sendmail.cf file and restart all the required services by running the following command.

Code: Select all

omsendin


Be sure to say YES to install it.

I also restarted sendmail and Scalix with the following:

Code: Select all

/etc/init.d/sendmail restart
/etc/init.d/scalix restart
/etc/init.d/scalix-tomcat restart


Additionally I also had issues with MailWasher quarantining local mail going to the Internet. I fixed it by adding a global whitelist for the address *@domain.tld which took effect immediately.

Important log files to watch are:

Code: Select all

/var/log/mwserver/mpd.log
/var/log/mwserver/mwi.log
/var/log/maillog


Finally, after you have completed the initial training, make sure you turn off debug logging by deleting the log_level=debug from your /etc/mwserver.conf and restart MailWasher once you are positive it is working properly as extremely verbose logging has a tendency to fill up hard drives ;-)

Congratulations, you should now have a fully functional MailWasher/Scalix system!

==================================================================================

Notes

My installation was using all default values for all installations. MailWasher required the first 100 messages to be classified in order to apply a statistical filter to incoming e-mails. This was easy enough as it sent my administration user an e-mail letting me know when it required this to be done (after it recieved 100 e-mails). I marked them as Junk, Legitimate or Unsure and suddenly the statistical filtering started with out a hitch.

There is no synchronization between MailWasher and Scalix. When a user recieves e-mail, if they do NOT have a MailWasher account, it creates them an account and e-mails them their password which they can change. Users are able to retrieve quarantined messages from the e-mail (after verifying their password) without administrator assistance.

If you run into any problems or have any comments, questions or compliments, please send me an e-mail to: joshua@prestoncentral.com

Thanks!

Joshua Preston.

==================================================================================

Changelog

    Fixed typographical error in backing up Scalix configuration
    Added information regarding the FirstAlert! service offered by FireTrust
    Added recommendation to turn off debug logging in MailWasher
Last edited by jpreston on Tue Sep 26, 2006 2:36 pm, edited 3 times in total.

RogerMaynard

Postby RogerMaynard » Thu Jun 15, 2006 12:05 pm

Joshua - that is perfect!!

Having spent 3 days, granted that I am a relative Linux newbie, setting up SpamAssassin and still with some issues over permissions and spamd, I was keen to try this approach.

From start to finish, including downloading the rpm from sourceforge, which wasn't that easy to find, the whole installation and configuration to a working setup took me less than 1 hour.

I am a very happy person :-))

There are only two minor points to add to your otherwise perfect HOW-TO and they are:

1. On first logging into the Web Browser to set up MailWasher, it talks about sending to FirstAlert - you need to subscribe to this before configuration AND you also need to have purchased the PRO edition. Using the OpenSource version does not allow you to subsscribe to First Alert - that was my impression anyway. I just unitcked it and continued with the setup. I may well go for the Pro version once I have fully evaluated it.

2. In the next paragraph you indicate to make a copy of the smtpd.cfg file in the example you show the SAME file name - minor typo. I did this

Code: Select all

cp -p /var/opt/scalix/sys/smtpd.cfg /var/opt/scalix/sys/smtpd.cfg.orig


and a very useful looking web based configuration screen - Fantastic!!

Kind regards
Roger Maynard
Somerset UK

jpreston
Posts: 26
Joined: Thu Mar 02, 2006 6:17 pm
Location: Columbus, OH
Contact:

Postby jpreston » Thu Jun 15, 2006 12:51 pm

Roger,

Thanks for the fixes, like I said, not the best at error corrections ;-)

I am very glad you found it useful! When I stumbled across MailWasher on accident, I was immediately skeptical. However, I was truly delighted and amazed that it does everything it says!

For your response:

1. On first logging into the Web Browser to set up MailWasher, it talks about sending to FirstAlert - you need to subscribe to this before configuration AND you also need to have purchased the PRO edition. Using the OpenSource version does not allow you to subsscribe to First Alert - that was my impression anyway. I just unitcked it and continued with the setup. I may well go for the Pro version once I have fully evaluated it.


As for the FirstAlert! service offered from FireTrust.

I do NOT utilize the FirstAlert! service at this time. I find that the filter works equally well with out it. And specifically in my case, works better than SpamAssassin. However, if you would like to test the service, they provide a user account that you can use on a trial basis, ie try before you subscribe.

You can obtain the current trial username/password from:

http://oss.firetrust.com/shop/

As I said, I do not subscribe as I am not sure what licensing model is best for my specific needs and the filter works at least as well as, if not better, than SpamAssassin even without the FA! service. --add the benefit of a nice user interface, and it is very nice.

However, the pricing for the FirstAlert! service seems quite reasonable for small to large installations.

In regards to mentioning that you must configure the FirstAlert! service prior to use.

You do not have to configure it at all upon initial installation. You can disable it or skip it during the installation process and still activate it at any time afterwards by logging into the MWI (web interface) as an "administrator".

2. In the next paragraph you indicate to make a copy of the smtpd.cfg file in the example you show the SAME file name - minor typo. I did this

cp -p /var/opt/scalix/sys/smtpd.cfg /var/opt/scalix/sys/smtpd.cfg.orig


Yeah, I'll see if I can edit the original and make that fix ;-) Thanks!
-- Joshua Preston
joshua@prestoncentral.com

RogerMaynard

Postby RogerMaynard » Thu Jun 15, 2006 12:57 pm

Joshua - thanks for that.

I'll review the situation when I have received the 100 training emails - which won't be too long!!

You're right, the pricing for the Firstalert did seem quite reasonable anyway. But I'll see how the filtering goes.

Have you tried adding any Blacklists - I added a couple but they seem to block most mail !! If you have can you recommend any?

Kind regards
Roger

jpreston
Posts: 26
Joined: Thu Mar 02, 2006 6:17 pm
Location: Columbus, OH
Contact:

Postby jpreston » Thu Jun 15, 2006 1:41 pm

Roger,

I currently utilize the nice Realtime Blackhole Services feature in MailWasher.

First, I looked up some of the black list services from:

http://www.email-policy.com/Spam-black-lists.htm

MailWasher supports both IP based lookups and send domain lookups. I currently only use as IP based lookups:

    relays.ordb.org
    sbl.spamhaus.org


I will say that there seemed to be some discussion on the MailWasher forums regarding v 2.1.0 and its inability to utilize blacklist services. The problem was supposedly fixed for v2.1.1, however, I've not been able to locate it for Linux or Solaris, and it appears that the Windows only version is available. I've got a few e-mails waiting to hear back on the definitive answer regarding this.

Thanks!

Joshua Preston.
-- Joshua Preston

joshua@prestoncentral.com

jpreston
Posts: 26
Joined: Thu Mar 02, 2006 6:17 pm
Location: Columbus, OH
Contact:

Postby jpreston » Thu Jun 15, 2006 2:31 pm

I've created a WIKI for this HOWTO which can be located at:

http://www.firetrust.org/wiki/index.php/ScalixSetup

Thanks!

Joshua Preston.
-- Joshua Preston

joshua@prestoncentral.com

init3
Posts: 20
Joined: Thu Feb 16, 2006 3:49 pm

Postby init3 » Tue Jun 27, 2006 11:55 am

Hi All,

I am having problems finding the rpms or even a source tarball for this. All I see is is a win exe and a zip containing the same exe. Where do I find the source or rpm for this? Am i missing something?

Regards

**nevermind, found it

init3
Posts: 20
Joined: Thu Feb 16, 2006 3:49 pm

Postby init3 » Tue Jun 27, 2006 2:41 pm

Has anyone run into an issue where web access or sac doesn't work after installing the rpm?

Regards

jpreston
Posts: 26
Joined: Thu Mar 02, 2006 6:17 pm
Location: Columbus, OH
Contact:

Postby jpreston » Tue Jun 27, 2006 2:46 pm

init3,

No, I've not run into this problem at all. The only problem I've had is forgetting to open the port to allow access to 4044 ;-)

I would suspect your apache, and/or scalix installation may need to be restarted.

You can also attempt a telnet to the server port 80 and see if it connects.

Thanks!

Joshua Preston.
-- Joshua Preston

joshua@prestoncentral.com

init3
Posts: 20
Joined: Thu Feb 16, 2006 3:49 pm

Postby init3 » Wed Jun 28, 2006 11:40 am

Hi Josh,

Thanks for the reply. Apache wasn't running (duh) and I didn't check that before I posted. I did have another problem though. It looked like everything was running fine but i was unable to recieve any mail to the server after I set everything up. It seemed to be a sendmail issue....I have since uninstalled Mailwasher and everything works fine. I will try to duplicate the problem and will post when that is done. thanks again

msweany
Posts: 22
Joined: Wed Jul 12, 2006 10:29 am

Postby msweany » Mon Jul 17, 2006 5:19 pm

Joshua,

Nice How To: After working on Spamassassin and Amavisd attempts, this was a nice change, it worked like a charm.

Thanks,

Mike

btisdall
Scalix Star
Scalix Star
Posts: 373
Joined: Tue Nov 22, 2005 12:13 pm
Contact:

Postby btisdall » Wed Jul 19, 2006 8:03 am

msweany wrote:Nice How To: After working on Spamassassin and Amavisd attempts, this was a nice change, it worked like a charm.


Great that you have a system that works for you, I must check Mailwasher out for myself.

Re. Amavisd were you trying to follow my HOWTO & if so, were you coming unstuck somewhere? If yes, I'd like to know where so I can improve it.
Ben Tisdall
www.redcircleit.com
London

msweany
Posts: 22
Joined: Wed Jul 12, 2006 10:29 am

Postby msweany » Wed Jul 19, 2006 2:17 pm

btisdall wrote:
msweany wrote:Nice How To: After working on Spamassassin and Amavisd attempts, this was a nice change, it worked like a charm.


Great that you have a system that works for you, I must check Mailwasher out for myself.

Re. Amavisd were you trying to follow my HOWTO & if so, were you coming unstuck somewhere? If yes, I'd like to know where so I can improve it.


Ben,

Hi, yes I used your how-to. It was nice and well documented, when I got to the end and I went to start all the services, the amavisd-milter wouldn't start. I went back through the document and retraced my streps and I dont know where I went wrong. At this point no mail was coming in or out so I undid everything and a couple of days later tried this solution.

On a side note, I really like the mail washer interface and I am looking to set it up to use with an Exchange box as an offering for some of my customers.

RogerMaynard

Postby RogerMaynard » Thu Jul 20, 2006 2:06 am

Does anyone know if it is possible to have MailWasher scan for keywords in the subject line or Body Text?

Roger

tahir
Posts: 12
Joined: Tue Jun 20, 2006 10:58 am

Postby tahir » Sun Jul 23, 2006 5:33 am

Do you have to make any changes to sendmail.cf?


Return to “Third Party Integration”



Who is online

Users browsing this forum: No registered users and 0 guests

cron