HowTos/Mailwasher

From Scalix Wiki
Revision as of 13:52, 7 August 2006 by Jpreston (Talk | contribs) (This is not completed, just adding the bulk of information, still needs editing and formatting.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

(incomplete)

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.

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


Links

[1] [2]


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:

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:

log_level=debug


Setup MailWasher to start at boot.

(On Fedora at least) Code:

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:

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.

To start MailWasher Server, use the following commands:

(at least on Fedora) Code:

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

Configuring MailWasher

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:

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:

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:

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:

SMTPFILTER=TRUE


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

Code:

omsendin


Be sure to say YES to install it.

I also restarted sendmail and Scalix with the following:

Code:

/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:

/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
  • Created Wiki on Scalix Wiki page