diff options
author | Bartłomiej Piotrowski | 2018-01-05 17:23:22 +0100 |
---|---|---|
committer | Bartłomiej Piotrowski | 2018-01-05 17:23:22 +0100 |
commit | 399afaff82b650c0dc16010debb39f09ace8c6b3 (patch) | |
tree | 770ef07f94c7eb1b5d61d36fd17c79e1fcb4fae9 /dspam.install | |
download | aur-dspam.tar.gz |
Import from official repositories
Diffstat (limited to 'dspam.install')
-rw-r--r-- | dspam.install | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/dspam.install b/dspam.install new file mode 100644 index 000000000000..1d1125a759e7 --- /dev/null +++ b/dspam.install @@ -0,0 +1,38 @@ +post_install() { + echo -n "adding dspam system group... " + groupadd -r dspam && echo "done." + echo -n "adding dspam system user... " + useradd -r -c "DSPAM Daemon" -d /var/lib/dspam -g dspam -s /bin/false dspam \ + && echo "done." + passwd -l dspam &>/dev/null + chown root:dspam usr/bin/dspam{,c} + chown -R root:dspam etc/dspam + chmod g+rs usr/bin/dspam{,c} + +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. +>>> Create dspam database: + $ mysql -u dspam dspam -p < /usr/share/dspam/mysql/mysql_objects-4.1.sql +>>> Create virtual user table: + $ mysql -u dspam dspam -p < /usr/share/dspam/mysql/virtual_users.sql +>>> Enter the password you set in the previous step, and the database should be populated. + +>>> Remember to edit /etc/dspam/dspam.conf accordingly +>>> If you want to use the postgresql, sqlite3 or Berekely DB4 backends, +>>> read the documentation +>>> +EOF +} + +post_upgrade() { + chown root:dspam usr/bin/dspam{,c} + chown -R root:dspam etc/dspam + chown dspam:dspam var/l{og,ib}/dspam + chmod g+s usr/bin/dspamc +} |