Rev 54 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
$config = {
'default' => { # defaults used when no value is given
'enabled' => 1, # account is not processed if value is 0
'testing' => '1', # gives a lot of messages, but doesn't do anything
'source' => { # where is the mail coming from
'server' => 'localhost', # we're running the script on the mail server itself
'system' => [ # do not delete any folders with these (case insensitive) names
'Outbox',
'Sent Items',
'INBOX'
],
'ignore' => [ # do not process messages in folders with any of these (case insensitive) names
'Deleted Messages',
'Drafts',
'Junk E-mail',
'Junk',
'Trash'
],
'age' => '18M', # anything older than this is ready to be archived, in days. M=monts, Y=years
'deleteOnSuccess' => '1', # after successful copy, delete message on source
'deleteEmptyFolders' => '1', # if any folder is empty (except system folders), delete it
'adminUsername' => 'mailadmin', # if using an admin account to log in
'adminPassword' => 'some really strong password',
'adminSeparator' => '*'
},
'target' => {
'server' => 'localhost',
'hierarchy' => '<path>', # Store message in same path on target that it was on source
'sleeptime' => '0.5', # time to sleep between messages, in seconds, to allow dovecot to catch up
'adminUsername' => 'mailadmin',
'adminPassword' => 'some really strong password',
'adminSeparator' => '*'
},
},
'accounts' => {
'user@example.com' => {
'testing' => '1',
'source' => {
'system' => [ # this is ADDED to the default system folders
'Trash'
],
'server' => 'smtp.example.com', # override default source server
'username' => 'user@example.com',
'password' => 'imap password',
'age' => '1Y', # override default old age limit
'ignore' => [ # these are ADDED to the default ignore folders
'ThisIsSpam',
'ThisIsNOTSpam',
'ToProcess',
],
'deleteEmptyFolders' => '1',
'deleteOnSuccess' => '0' # override, leave messages on source after copy
},
'target' => {
'server' => 'archive.example.com', # override target server
'hierarchy' => '<path>^<year>^<month>', # stored in original path/year/month
'username' => 'user_archive@archive.example.com',
'password' => 'imap password'
},
'enabled' => 1,
},
'user2' => { # this user uses defaults for everything, so all we need to do is put in username and password
'source' => {
'username' => 'user@example.com',
'password' => 'imap password',
},
'target' => {
# in this case, we are using the admin credentials instead of knowing the individual
# user, so all we need is the username
'username' => 'user_archive@archive.example.com',
},
}
}
};