| 1 |
# crontab example for isbg package. It runs each 30 minuts. |
| 2 |
# You should arrange it to yours needs. |
| 3 |
# We redirect the stdout and stderr to logger (with different priority) |
| 4 |
# to check the cron calls (6/info) : journalctl -p 6..6 |grep :isbg |
| 5 |
# to check the output (5/notice) : journalctl -p 5..5 |grep :isbg |
| 6 |
# to check errors (4/warning): journalctl -p 4..4 |grep :isbg |
| 7 |
ISBG_IMAPHOST=<your imap host> |
| 8 |
ISBG_IMAPUSER=<your user name> |
| 9 |
ISBG_SPAMINBOX=Spam |
| 10 |
ISBG_LEARNSPAMBOX=Spam |
| 11 |
ISBG_LEARNHAMBOX=NOSPAM |
| 12 |
ISBG_PARTIALRUN=25 |
| 13 |
20,50 * * * * test -x /usr/bin/isbg && sh -c "/usr/bin/isbg --imaphost $ISBG_IMAPHOST --imapuser $ISBG_IMAPUSER --partialrun $ISBG_PARTIALRUN --spaminbox $ISBG_SPAMINBOX --learnspambox $ISBG_LEARNSPAMBOX --delete --expunge --learnhambox $ISBG_LEARNHAMBOX --noninteractive | /usr/bin/tr '\n' ' ' | /usr/bin/logger -p cron.notice -t cron:$LOGNAME:isbg" 2>&1 | /usr/bin/logger -p cron.warning -t cron:$LOGNAME:isbg |