Subversion Repositories sysadmin_scripts

Rev

Rev 42 | Rev 54 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
42 rodolico 1
$config = {
50 rodolico 2
          'default' => { # defaults used when no value is given
3
                       'enabled' => 1, # account is not processed if value is 0
4
                       'testing' => '1', # gives a lot of messages, but doesn't do anything
5
                       'source' => { # where is the mail coming from
6
                                     'server' => 'localhost', # we're running the script on the mail server itself
7
                                     'system' => [ # do not delete any folders with these (case insensitive) names
42 rodolico 8
                                                   'Outbox',
9
                                                   'Sent Items',
10
                                                   'INBOX'
11
                                                 ],
50 rodolico 12
                                     'ignore' => [ # do not process messages in folders with any of these (case insensitive) names
42 rodolico 13
                                                   'Deleted Messages',
14
                                                   'Drafts',
15
                                                   'Junk E-mail',
16
                                                   'Junk',
17
                                                   'Trash'
18
                                                 ],
50 rodolico 19
                                     'age' => '18M', # anything older than this is ready to be archived, in days. M=monts, Y=years
20
                                     'deleteOnSuccess' => '1', # after successful copy, delete message on source
21
                                     'deleteEmptyFolders' => '1' # if any folder is empty (except system folders), delete it
42 rodolico 22
                                   },
23
                       'target' => {
50 rodolico 24
                                   'server' => 'localhost',
25
                                   'hierarchy' => '<path>' # Store message in same path on target that it was on source
42 rodolico 26
                                 },
27
                     },
28
          'accounts' => {
29
                          'user@example.com' => {
30
                                                  'testing' => '1',
31
                                                  'source' => {
50 rodolico 32
                                                                'system' => [ # this is ADDED to the default system folders
42 rodolico 33
                                                                              'Trash'
34
                                                                            ],
50 rodolico 35
                                                                'server' => 'smtp.example.com', # override default source server
42 rodolico 36
                                                                'username' => 'user@example.com',
37
                                                                'password' => 'imap password',
50 rodolico 38
                                                                'age' => '1Y', # override default old age limit
39
                                                                'ignore' => [ # these are ADDED to the default ignore folders
42 rodolico 40
                                                                              'ThisIsSpam',
41
                                                                              'ThisIsNOTSpam',
42
                                                                              'ToProcess',
43
                                                                            ],
44
                                                                'deleteEmptyFolders' => '1',
50 rodolico 45
                                                                'deleteOnSuccess' => '0' # override, leave messages on source after copy
42 rodolico 46
                                                              },
47
                                                  'target' => {
50 rodolico 48
                                                              'server' => 'archive.example.com', # override target server
49
                                                              'hierarchy' => '<path>^<year>^<month>', # stored in original path/year/month
42 rodolico 50
                                                              'username' => 'user_archive@archive.example.com',
51
                                                              'password' => 'imap password'
52
                                                            },
53
                                                  'enabled' => 1,
50 rodolico 54
                                                },
55
                          'user2' => { # this user uses defaults for everything, so all we need to do is put in username and password
56
                                                  'source' => {
57
                                                                'username' => 'user@example.com',
58
                                                                'password' => 'imap password',
59
                                                              },
60
                                                  'target' => {
61
                                                              'username' => 'user_archive@archive.example.com',
62
                                                              'password' => 'imap password'
63
                                                            },
42 rodolico 64
                                                }
65
                        }
66
        };