Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ RUN apt-get update && apt-get install -y -q --no-install-recommends \
inotify-tools \
# To enable compression in imap
arj bzip2 cabextract cpio file gzip nomarch pax unzip zip \
# clamav-base 1.4.6 creates its user as a locked system account
# (sysusers.d "u!"), which also sets it to expire on 1970-01-02. cron, like
# su, checks the account through PAM and refuses an expired one, so the
# hourly clamav-unofficial-sigs update is refused. Clear the expiry; the
# password stays locked.
&& usermod -e '' clamav \
&& rm -rf /var/spool/postfix \
&& ln -s /var/mail/postfix/spool /var/spool/postfix \
&& apt-get autoremove -y \
Expand Down
8 changes: 8 additions & 0 deletions test/default.bats
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,14 @@ load 'test_helper/bats-assert/load'
assert_success
}

# cron checks the account through PAM and refuses an expired one. clamav-base
# 1.4.6 creates clamav already expired (see the Dockerfile).
@test "checking clamav-unofficial-sigs: the clamav account does not expire" {
run docker exec mailserver_default chage -l clamav
assert_success
assert_output --regexp 'Account expires[[:space:]]*: never'
}

# The update runs as clamav, at startup and from cron, and reads the copy of
# user.conf that setup makes. The suite's user.conf is readable by its owner
# only, as an administrator's may be.
Expand Down