File: batch_spam_learn.sh

package info (click to toggle)
isbg 2.3.1-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 468 kB
  • sloc: python: 1,906; makefile: 108; sh: 24
file content (21 lines) | stat: -rw-r--r-- 511 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

# This bash script calls isbg for spam learning for all the mail
# accounts in the provided list.

declare -A usernames

usernames=( ["user1"]="passwd1" \
            ["user2"]="passwd2" \
            ["user3"]="passwd3" \
            ["user4"]="passwd4" )

hostname="hostname"


for username in "${!usernames[@]}"
do
    isbg --teachonly --imaphost $hostname --imapuser $username \
    --imappasswd ${usernames[$username]} --learnhambox INBOX \
    --learnspambox INBOX.Spam --noninteractive
done