db: checkErr() in a couple of places
imap, db: get listMessages to insert into the db