[imapfilter-devel] Help with Config File

Lefteris Chatzimparmpas lefcha at hellug.gr
Fri Mar 14 20:14:43 EET 2008


On Thu, Mar 13, 2008 at 10:43:59AM -0700, Trev Copland wrote:
> There are 2 accounts, one main and one for storage. I want to copy messages
> from the main account's trash can to archive folders on the storage account.
> The mail was sorted into individual days by the month sent. I remember the
> script needed to make the folders as well - it's structured Archive/2008/03.

Hello,

Try the attached configuration file... But first, of course, change all
the words in capitals.

L.
-------------- next part --------------
main = IMAP {
    server = 'MAIN-SERVER',
    username = 'MAIN-USERNAME',
    password = 'MAIN-PASSWORD',
}

storage = IMAP {
    server = 'STORAGE-SERVER',
    username = 'STORAGE-USERNAME',
    password = 'STORAGE-PASSWORD',
}

date = '01-' .. os.date('%b') .. '-' .. os.date('%Y')
target = 'Archive/' .. os.date('%Y') .. '/' .. os.date('%m')

result = main.trash:sent_since(date)
main.trash:move_messages(storage[target], result)



More information about the Imapfilter-devel mailing list