Step 1. - Aquire the applications needed
Applications you'll need:
- Mobile Terminal
These are both available from Cydia. Just do a search and install them on your phone.
Step 2 - Login as root
Now that you've got the tools required, comes the fun part. Start up Terminal which should be on your dash board now. You want to login as root, so the first command you'll put in is
it'll then ask you for your password. By default this should be alpine, but if you've changed your SSH password(which you should do, check my other post on how to change your SSH password), it'll be whatever you set it as.
Step 3 - Login to the mail database.
What you want to do now is login to your mail database. The command line is sorta long and a tiny bit of a pain to type it in on the iphone keyboard, but you only have to do it once. The command line you want to run is:
sqlite3 /private/var/mobile/Library/Mail/Envelope\ Index
Once that's entered, you're logged into the mail database
Step 4 - Marking your messages as read
Now that's you're logged into the database, you can go ahead and flag the messages as read. To do this you need to run 2 commands. They are:
- update messages set flags = flags + 1 where flags&1 = 0;
- update mailboxes set unread_count = 0;
Step 5 - Reboot your phone.
Once the commands are inputed, hit the home button. Don't worry if your mail's still showing up as unread. Reboot your iphone, by holding down the power/sleep button and sliding to power off. Wait till it powers off, then turn it back on again. Then presto, all your mail is marked as read.