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 ()
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()
def sent_to_me(m): return wleconfirm.is_mine(m.mrecipients)
def sent_by_myself(m): return wleconfirm.is_mine(m.msenders)
def sent_to_me (m): return wleconfirm.is_mine (m.mrecipients)
def sent_by_myself (m): return wleconfirm.is_mine (m.msenders)