'Reads passwords from ClawsMail\'s accountrc file'

def accountrc_decrypt(self, filename, key, mode=DES.MODE_CFB):

    p = ConfigParser()
    p.read(filename)
    pwdFound = []
    for s in p.sections():
        values = {}
        try:
            try:
                address = p.get(s, 'address')
                account = p.get(s, 'account_name')
            except:
                address = '<unknown>'
                account = '<unknown>'
            password = self.pass_decrypt(p.get(s, 'password'), key, mode=mode)
            values = {'Login': account, 'URL': address, 'Password': password}
        except Exception as e:
            print_debug('ERROR', ('Error    resolving    password    for    account    "%s":    %s' % (s, e)))
        if (len(values) != 0):
            pwdFound.append(values)
    return pwdFound
