don't require correctly cased mail addresses

This commit is contained in:
b3yond 2018-09-24 22:40:29 +02:00
parent 5efea773b8
commit 234ed59049

View file

@ -22,7 +22,7 @@ class Mailbot(Bot):
mails = mailbox.mbox("/var/mail/" + config['mail']['mbox_user'])
for msg in mails:
if get_date_from_header(msg['Date']) > user.get_seen_mail():
if user.get_city() in msg['To']:
if user.get_city().lower() in msg['To'].lower():
reports.append(make_report(msg, user))
return reports