Robin Bowes wrote:
I'm aware that the logging has changed - I'd like to setup adaptive
logging - and I use clamav.

Here's my upgrade procedure (somewhat simplified):

1) Remove the softlink'd directory:

  $ rm /service/qpsmtpd

which means only that supervise won't restart the service; the existing service will continue running from the original directory.

2) Rename the old service directory:

  $ mv /var/qmail/service/qpsmtpd /var/qmail/service/qpsmtpd.old

which will also not affect the already running process (since the directory name is actually a property of the parent directory).

3) Checkout the new code into a new directory

  $ svn co svn://blah/blah/qpsmtpd/trunk /var/qmail/service/qpsmtpd

4) Copy the configuration file and any custom plugins from the old directory and then test on a high port; I usually do this:

  $ perl -T ./qpsmtpd-forkserver --user qmaild

which will start up on port 2525 with an unpriveleged user and log to the console. Remember to create the spool directory with appropriate ownership and rights.

5) If all testing works (and I usually send virus-laden messages for good measure), then link the new service directory in:

  $ ln -s /var/qmail/service/qpsmtpd /service

which won't actually start the new service, since the old service is still squatting on port 25.

6) Lastly, stop the old service:

  $ cd /var/qmail/service/qpsmtpd.old
  $ svc -dx . ./log


Are there any particular gotchas I should look out for?


The things to test are the spool directory rights (depending on whether you use clamdscan or clamscan); make sure the multilog directory is set up correctly (I ./run it manually first, to make sure that the ownership and directories are correct); make sure the logging plugin is what you want.


For the last, the config.sample/logging only has the compatibility plugin shown (logging/warn). I'm in the midst of rolling out the following:

  logging/adaptive accept LOGERROR reject LOGDEBUG prefix !

and I'm going to use multilog's filtering to store the good mail (without a !) in seperate log files from the bad mail (guess).

HTH

John

Reply via email to