Auto-update spam lists

This commit is contained in:
Julian Ospald 2016-10-15 18:55:52 +02:00
parent c1231e58e6
commit aa921b0fd0
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
3 changed files with 16 additions and 0 deletions

View File

@ -85,6 +85,8 @@ COPY ./config/spamassasin/spamassasin.local.append \
RUN mkdir /etc/spamassassin/.pyzor /etc/spamassassin/.razor RUN mkdir /etc/spamassassin/.pyzor /etc/spamassassin/.razor
COPY ./config/spamassasin/pyzor.servers /etc/spamassassin/.pyzor/servers COPY ./config/spamassasin/pyzor.servers /etc/spamassassin/.pyzor/servers
RUN cat /etc/spamassassin/local.cf.append >> /etc/spamassassin/local.cf RUN cat /etc/spamassassin/local.cf.append >> /etc/spamassassin/local.cf
COPY ./update-spamlists /usr/bin/update-spamlists
RUN chmod +x /usr/bin/update-spamlists
# supervisord configuration # supervisord configuration
COPY ./config/supervisord.conf /etc/supervisord.conf COPY ./config/supervisord.conf /etc/supervisord.conf

View File

@ -16,3 +16,7 @@ autorestart=false
[program:dovecot] [program:dovecot]
command=/usr/sbin/dovecot -c /etc/dovecot/dovecot.conf -F command=/usr/sbin/dovecot -c /etc/dovecot/dovecot.conf -F
autorestart=true autorestart=true
[program:update-spamlists]
command=/usr/bin/update-spamlists
autorestart=true

10
update-spamlists Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
set -e
while true; do
if [[ $(date +%H) == 23 ]] ; then
razor-admin -home=/etc/spamassassin/.razor -discover
sa-update
fi
done