File: batch_spam_check.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-- 513 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 checking 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 --delete --expunge --imaphost $hostname --imapuser $username \
    --imappasswd ${usernames[$username]} --imapinbox INBOX \
    --spaminbox INBOX.Spam --noninteractive
done