summaryrefslogtreecommitdiffstats
path: root/tests/functional/purge_imap.py
blob: 67d4aec040f8784b7f0a0dedfa8c0220bd6371f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import time

import pykolab

from pykolab import wap_client
from pykolab.imap import IMAP

conf = pykolab.getConf()

def purge_imap():
    time.sleep(2)

    imap = IMAP()
    imap.connect()

    for folder in imap.lm():
        try:
            imap.dm(folder)
        except:
            pass