Pradeep Mishra wrote:
> Dear All
> 
> I have ovserved that iostat on one of my servers running spamassassin
> is aprox 12% and when i moved $Home/.spamassassin to somewhere else it
> comes down to 2%. I would like to know where can i change the path to
> /somehere/.spamassassin ??
> OR How do i change the userstate_dir path to
> /something_else/.spamassassin in place of /$USER_DIR/.spamassassin.

I found symlinking a user's ~/.spamassassin directory to somewhere else
works just fine.

Here's a shell script I wrote to do this.  Modify to suit your system:

#!/bin/sh
# Move user's SA config from /home/{user}/.spamassassin to
# /var/SpamAssassin/{user}

nul=""

case "$1" in
  $nul)
        echo "usage:  move-sa-user [user]"
        echo "  Username is REQUIRED"
        exit 1;
  ;;
  *)
        mkdir /var/SpamAssassin/$1
        mv /home/$1/.spamassassin/* /var/SpamAssassin/$1/
        rm -rf /home/$1/.spamassassin/
        ln -s /var/SpamAssassin/$1 /home/$1/.spamassassin
        chown -R $1:mail_pop_only /var/SpamAssassin/$1
        chown $1:mail_pop_only /home/$1/.spamassassin
        echo "User's SA config moved."
  ;;
esac

Reply via email to