Ajout : dovecot-antispam + amavis + crm114.
[lhc/ateliers.git] / etc / sv / amavis / local.sh
diff --git a/etc/sv/amavis/local.sh b/etc/sv/amavis/local.sh
new file mode 100644 (file)
index 0000000..5bef19e
--- /dev/null
@@ -0,0 +1,27 @@
+"$tool"/local/apt-get-install amavisd-new crm114
+"$tool"/local/insserv-remove  amavis
+
+sudo find "$tool"/etc/amavis -maxdepth 1 -type f -exec \
+       install -t /etc/amavis/conf.d -o root -g root -m 664 {} +
+
+sudo install -d -o root -g root -m 755 \
+ /etc/crm114
+sudo find "$tool"/etc/crm114 -maxdepth 1 -type f -exec \
+       install -t /etc/crm114 -o root -g root -m 664 {} +
+
+sudo install -d -o amavis -g amavis -m 2771 \
+ ~mail/crm114
+sudo install -d -o amavis -g amavis -m 1777 \
+ ~mail/crm114/tmp
+
+for css in spam notspam
+ do
+       sudo -u amavis cssutil -b -r ~mail/crm114/"$css".css
+       sudo chmod 660 ~mail/crm114/"$css".css
+ done
+
+sudo find /etc/crm114 -maxdepth 1 -type f -exec \
+       ln -fns -t ~mail/crm114 -o root -g root -m 664 {} +
+
+sudo ln -fns /dev/null ~mail/crm114/spamtext.txt
+sudo ln -fns /dev/null ~mail/crm114/nonspamtext.txt