You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by sp...@incubator.apache.org on 2004/07/31 09:04:10 UTC
[SpamAssassin Wiki] New: RazorSiteWide
Date: 2004-07-31T00:04:10
Editor: WesMorgan <we...@libretech.org>
Wiki: SpamAssassin Wiki
Page: RazorSiteWide
URL: http://wiki.apache.org/spamassassin/RazorSiteWide
this took me awhile to get working, figured I'd share what I'd learned
New Page:
* Install Razor (this varies from system to system, see SingleUserUnixInstall for one option)
* Setup razor's config in a central location such as /etc/mail/spamassassin/.razor with these commands:
{{{razor-client}}}
{{{razor-admin -home=/etc/mail/spamassassin/.razor -create}}}
{{{razor-admin -home=/etc/mail/spamassassin/.razor -discover}}}
{{{razor-admin -home=/etc/mail/spamassassin/.razor -register}}}
* Make sure permissions are configured correctly
* This part can get tricky since multiple daemons running under several usernames may be trying to run spamassassin -r, for example (Apache and qmail are two examples from my configuration)
* One solution is to create a spam group and add all the usernames that need to report spam to that group, then enable that group to use this razor config
{{{add to /etc/group: spam:812:x:apache,qmailq}}} (Make sure the group id, 812 in this case, is unique. And change the username list to something appropriate for your site.)
{{{cd /etc/mail/}}}
{{{chgrp -R spam spamassassin/}}}
{{{chmod g+ws spamassassin/}}}
{{{chmod g+ws spamassassin/.razor/}}}
{{{cd spamassassin/}}}
{{{chmod g+w *}}}
{{{cd .razor/}}}
{{{chmod g+w *}}}
* Tell spamd where to find Razor's new config file
{{{add to /etc/mail/spamassassin/local.cf: razor_config /etc/mail/spamassassin/.razor/razor-agent.conf}}}
* Tell razor where it lives
{{{add to /etc/mail/spamassassin/.razor/razor-agent.conf: razorhome = /etc/mail/spamassassin/.razor/}}}
* Restart spamd
{{{/etc/init.d/spamd restart}}}
* Make sure anywhere you're calling spamassassin in a script/procmail recipe/.qmail file to always use the -C /etc/mail/spamassassin configuration option so it will pick up the razor_config option, and in turn the razorhome setting in razor-agent.conf
* This configuration allows me to have a "Report as spam" link in IMP (web-based mail client) that calls 'spamassassin -x -C /etc/mail/spamassassin -r' and pipes the message to it while also allowing a .qmail-fake file that pipes the message to the same command (so I can bounce -- '''not''' forward -- spams to fake@mydomain.com to have them reported to razor