mirror of
https://github.com/moparisthebest/arch-ppa
synced 2024-08-13 15:43:47 -04:00
33 lines
1002 B
Plaintext
33 lines
1002 B
Plaintext
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" || :
|
|
}
|