From 415856bdd4f48ab4f2732996f0bae58595092bbe Mon Sep 17 00:00:00 2001 From: Parabola Date: Tue, 5 Apr 2011 14:26:38 +0000 Subject: Tue Apr 5 14:26:38 UTC 2011 --- community/dspam/dspam.install | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 community/dspam/dspam.install (limited to 'community/dspam/dspam.install') diff --git a/community/dspam/dspam.install b/community/dspam/dspam.install new file mode 100644 index 000000000..fc74fe55e --- /dev/null +++ b/community/dspam/dspam.install @@ -0,0 +1,33 @@ +post_install() { + echo -n "adding dspam system group... " + groupadd -g 115 dspam && echo "done." + echo -n "adding dspam system user... " + useradd -c "DSPAM Daemon" -u 115 -d /var/lib/dspam -g dspam -s /bin/false dspam \ + && echo "done." + passwd -l dspam &>/dev/null + +cat << EOF +>>> To populate the DSPAM database, you need to follow several steps. +>>> First create a database. Login to the mysql command prompt. + $ mysql -u root -p + mysql> CREATE database dspam; +>>> Next, you need to create a dspam user. At the same MySQL prompt: + mysql> GRANT ALL PRIVILEGES ON dspam.* TO dspam@'localhost' IDENTIFIED BY 'passwd'; +>>> Replacing passwd with your chosen password. +>>> If you want a space optimized db do: + $ mysql -u dspam dspam -p < /var/lib/dspam/mysql/mysql_objects-space.sql +>>> If you want a speed optimized db do: + $ mysql -u dspam dspam -p < /var/lib/dspam/mysql/mysql_objects-speed.sql +>>> Enter the password you set in the previous step, and the database should be populated. + +>>> Remember to edit /etc/dspam/dspam.conf accordenly +>>> If you want to use the postgresql, sqlite3 or Berekely DB4 backends, +>>> read the documentation +>>> +EOF +} + +post_remove() { + echo -n -e "\nremoving dspam system user and group..." + userdel dspam && echo "done." +} -- cgit v1.2.3-54-g00ecf