blob: c3e7022c8f613202c4364496747dcb38249ce207 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
users_and_groups() {
getent group amavis >/dev/null || groupadd -g 333 amavis >/dev/null
getent passwd amavis >/dev/null || useradd -u 333 -M -d /var/spool/amavis -g amavis -s /bin/false amavis >/dev/null
}
filters_howto() {
cat <<EOF
To use virus or spam filters, comment these lines in /etc/amavisd/amavisd.conf:
@bypass_virus_checks_maps = (1);
@bypass_spam_checks_maps = (1);
EOF
}
post_install() {
users_and_groups
filters_howto
}
post_upgrade() {
users_and_groups
[ "$(vercmp $2 2.8.0-1)" -lt 0 ] && cat <<EOF
Things have moved again. Amavis now uses these directories:
/var/spool/amavis <-- homedir, database, quarantine, etc
/run/amavis <-- pid, lock, socket
You must update /etc/amavisd/amavisd.conf to prevent breakage!
EOF
[ "$(vercmp $2 2.6.4-4)" -lt 0 ] && filters_howto || :
}
post_remove() {
groupdel amavis &>/dev/null
userdel amavis &>/dev/null
[ -d /var/spool/amavis ] && echo "You still need to clean up /var/spool/amavis" || :
}
|