-
Notifications
You must be signed in to change notification settings - Fork 7
/
start.sh
45 lines (34 loc) · 855 Bytes
/
start.sh
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
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
touch /INIT
if [ $( ps axf | grep -c -E "[r]syslog" ) -eq 0 ] ; then
/etc/init.d/rsyslog start
fi
if [ $( ps axf | grep -c -E "[s]pamd" ) -eq 0 ] ; then
/etc/init.d/spamassassin start
fi
while true ; do
if [ -f /INIT ]; then
sa-learn --force-expire -D
sa-update --nogpg --channel spamassassin.heinlein-support.de
sa-update
rm /INIT
fi
isbg \
--teachonly \
--imaphost="$MAILSERVER" \
--imapuser="$MAILUSER" \
--imappasswd="$MAILPASS" \
--learnspambox="$LEARNINBOX" \
--learnhambox="$LEARNHAMBOX" \
--learnthendestroy \
--noninteractive
isbg \
--flag \
--imaphost="$MAILSERVER" \
--imapuser="$MAILUSER" \
--imappasswd="$MAILPASS" \
--imapinbox="$IMAPINBOX" \
--spaminbox="$SPAMINBOX" \
--noninteractive
sleep 60
done | tee -a /var/log/spam.log