Auto-update spam lists
This commit is contained in:
parent
c1231e58e6
commit
aa921b0fd0
@ -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
|
||||||
|
@ -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
10
update-spamlists
Executable 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
|
Loading…
Reference in New Issue
Block a user