Ejemplo n.º 1
0
def add_confirmed (l):
    db = wledb.connect_db ()
    c = db.cursor ()
    wl = wleconfig.config.getboolean ('DEFAULT', 'confirm_whitelist')
    for i in l:
        if not _well_formed_re.match (i): continue
        m = email.Message.Message ()
        m['From'] = i
        wlemail.parse_message (m)
        if not wl and is_in_list (m, 'whitelist'): continue
        if wleconfirm.is_mine ([i]): continue
        if not is_in_confirmed_list ([i], c):
            wlelog.log (2, 'Adding %s as authorized address' % i)
            c.execute ("insert into confirmed values ('%s', %f)" %
                       (i.lower(), time.time ()))
            count_authorized ()
            wleconfirm.also_unblock (i)            
    db.commit ()
Ejemplo n.º 2
0
def add_confirmed(l):
    db = wledb.connect_db()
    c = db.cursor()
    wl = wleconfig.config.getboolean('DEFAULT', 'confirm_whitelist')
    for i in l:
        if not _well_formed_re.match(i): continue
        m = email.Message.Message()
        m['From'] = i
        wlemail.parse_message(m)
        if not wl and is_in_list(m, 'whitelist'): continue
        if wleconfirm.is_mine([i]): continue
        if not is_in_confirmed_list([i], c):
            wlelog.log(2, 'Adding %s as authorized address' % i)
            c.execute("insert into confirmed values ('%s', %f)" %
                      (i.lower(), time.time()))
            count_authorized()
            wleconfirm.also_unblock(i)
    db.commit()
Ejemplo n.º 3
0
def sent_to_me(m):
    return wleconfirm.is_mine(m.mrecipients)
Ejemplo n.º 4
0
def sent_by_myself(m):
    return wleconfirm.is_mine(m.msenders)
Ejemplo n.º 5
0
def sent_to_me (m):
    return wleconfirm.is_mine (m.mrecipients)
Ejemplo n.º 6
0
def sent_by_myself (m):
    return wleconfirm.is_mine (m.msenders)