On Wed, 2009-06-03 at 09:41 -0400, Bob Cohen wrote:
> Sorry for the dumb question but I can't seem to find the answer in the  
> documentation or by googling.  I'm trying to follow the Integrated  
> Spamd In Postfix recipe 
> (http://wiki.apache.org/spamassassin/IntegratedSpamdInPostfix 
> ).  How do I invoke spamd and then make sure it runs at boot?  I'm  
> sure I'm missing something really easy. Nevertheless, I'm missing it.   
> Help would be appreciated.
> 
The following assumes that your system uses the Unix System V / RedHat
daemon startup system.

Take a look at the daemon management scripts in /etc/rc.d/init.d 
You should find one called spamassassin (or possibly spamd - its called
spamassassin in Fedora distros). This script defines the service that
lets spamd be started, stopped and have its status checked. Assuming its
called 'spamassassin, execute:

        chkconfig -level 345 spamassassin on

to mark the spamd service as active at run levels 3,4 and 5 and then
start it with:

        service start spamassassin

or use your distro's GUI system configuration tool to do the same job if
you prefer that way of working. 

If spamd is installed but there's no service control script for it
in /etc/rc.d/init.d you'll have to write one. Copying and editing an
existing script is as good a way as any to do this. You'll need to
supply start and stop priorities for spamd. Set the start priority to be
just lower than the Postfix value and its stop priority to be just
higher. This means that, at boot time spamd is started just before
Postfix and during shutdown or a system reboot it is stopped just after
Postfix. See 'man chkconfig' for details. 

Then configure the service and start it as shown above. 

> Also, is there some way to minimize or create a (mostly) set and  
> forget method of dealing with spam?  The junk mail filters in my mail  
> client do a pretty good job of routing the unwanted emails into the  
> junk mail folder, which I just delete.  The recipe above seems to do  
> basically the same thing only up stream one level.  I will still have  
> to empty the "spamvac" mail queue periodically.  All things being  
> equal, I'd rather turn the mail away at the door rather than take up  
> my hard disk space.
> 
Two suggestions:

1)set up a daily or weekly cron job to delete the spamvac
  mail queue.

2)if you want to send spam direct to /dev/null, you can simply
  change the final version of filter.sh in
  http://wiki.apache.org/spamassassin/IntegratedSpamdInPostfix so that,
  instead of running $NEW_COMMAND and exiting with $NEWCOMMAND's exit
  status, it just deletes $OUTPUT and exits with the EX_OK exit status.
  You'll find the value defined in sysexits.h. This will cause the
  spam-flagged message to be silently thrown in the bit bucket.
 

Martin


Reply via email to