Avast blocks your communication to Gmail server (port 993 imaps)

After investigating on a very strange behavior of our App we found a solution to a very common problem comes from Avast!: This antivirus blocks every connection to the Gmail server over imaps (port 993).

Every users that use Avast! has to add an exception in their “Email protection” system.

Open the Avast Preferences and click on Advanced for the Email protection:

add_Avast_exception_email_protection

Then click on Exception and add your Exception clicking on the little plus (+):

avast_add_exception_email_server_osx

You have to add an exception for:

Server: imap.gmail.com
Service: imaps

Now our App can freely communicate to the Gmail server.

Other antivirus (check the Error in the logs)

At the moment we don’t know but maybe you could have the same error with others antivirus. You can see the strange behavior of our App in the logs (after enabling the logs in the Preferences):

12/05/14 11:00 Check for new Emails in '[Gmail]/Tutti i messaggi'
12/05/14 11:00 processBatch: 351 messages in batch
12/05/14 11:00 messagesFullFrom: NIL - ERROR: Error Domain=mailcore Code=5 "Parse error" UserInfo=0x7ff3e5e01fe0 {NSLocalizedDescription=Parse error}
12/05/14 11:00 End Fetch messages (100 / 351)
12/05/14 11:00 Lost connection to server ... aborting backup

The “Parse error” on the “Check for new Emails” procedure means that something is blocking this procedure!

Enable the logs

You can enable the standard logs in the Preferences -> Advanced:

backup-gmail_enable_logs

 

Enable the “Debug mode logging” for the verbose version of the logs. For the most verbose level of the logs you have to enable the IMAP transactions logs but be careful: it can quickly fill your memory (it creates a lot of data).

To See the standard Logs

Open the Utility -> Logs window, they will browse in that window:

backup-gmail-utility-logs

Before closing it remember to disable the Logs in Preferences otherwise it will go ahead to store data in that box.

To See the Console Errors

Sometimes an App can crash and we need to understand what happened before helping you. You should see the logs in the OSX Console, copy it and send them to us.

Open it (Application -> Utility -> Console) and look for the BackUp Gmail lines:

Advanced search in your local backup

spotlight icon

Many people ask to me for an Advanced Search. We planned in our milestone to develop a simple Viewer that will allow you to search for any field (Sender, Subject, Date, etc).

But today I would like to give you an alternative until we will release this new feature.
As you know Mac OS X is built on UNIX/BSD and the powerful of this OS can help you. Most of the commands are by command line but do not worry, it’s easy!

Open the Terminal: Applications -> Utility -> Terminal (or look for it in the new Launchpad). When you sill see the prompt command line you will be ready!

First, you need to move into your Backup folder (selected in the Preferences of Backup Gmail). Use the ‘cd’ command:

cd ~/Documents/Backups/Gmail

Now you can use the powerful ‘grep‘, send this command:

egrep -i -l -R "Osaka" Filestore/jazzo72/2008

It will look for all the emails contains the word “Osaka” in the year 2008. It will check recursively in all the nested folders starting from Filestore/jazzo72/2008. To understand better this path read the post about the FileStore sub-folders structure. The output will give you the relative path to the filename of the email(s) that includes that word:

jazzo72/2008/03/20080321-074810_lastphoto.eml

Now you can get this email following the path or you can directly open it by this command:

open jazzo72/2008/03/20080321-074810_lastphoto.eml

The “open” command will open the email with your Mail client software.

Reset Preferences keeping last backup copy

In the new version 1.6 App we added a “Check Zero Size Files” procedure because maybe there is a bug in GMail about RFC822.SIZE (it’s related to a past period 2011-2012). So, this check init a procedure before starting but if you have a problem in your database (file corrupted or something else) it cannot open the Backup folder and it crashes. Then you are not able to open it again because it crashes every time.
To resolve this issue follow this steps:

The first step is to delete the “Preferences” file/folder.
Open the Finder, and go to menu “Go -> Go to folder” (english submenu version).
Look at this image to understand the exact “position” of the submenu (it is italian environment):

Schermata 2013-05-13 alle 13.02.23

It is open a little window where you can paste a path.
Copy & Paste this path:
~/Library/

It shows you the hidden Library folder of your Mac user account.
Inside it look for these:

  • Preferences/net.m4ss.BackUpGmail.plist (delete this file if exists)
  • Containers/net.m4ss.BackUpGmail (delete this folder)

Now you have deleted your Preferences settings and you should be able to restart the App. You need to re-insert your credentials again and set a Backup folder.
If you remember your previous backup folder please, select it. The App will reuse your previous backup folder and any kind of data will be updated.
If you don’t remember your backup folder (or some new error occurs) you have to select a new Backup folder and restart from scratch.

Preview of your emails (with attachments)

BackUp Gmail gives you the opportunity to browse your emails offline in a simple way: search them by date and view by Quick Look.
Open the “Backup folder” (selected in Preferences) in the Finder. You can find the “FileStore” subfolder, where we stored all the emails. Browsing it you can see the folders structured by Year/Month. So you can browse month by month your emails and for each of them you can open a preview by Quick Look (select an email and press the Space bar).

gmail backup view emails by quick look

Another way to look for your emails is to use the Spotlight. Even there you will see a preview (body and attachments) as you can see in the follow image:

view your email by spotlight

New FileStore sub-folders structure

We are working hard on the new release 1.3.
We always try to keep in mind the simplicity. Now the FileStore is not easy to browse, all emails are in the same folder. We are working on a new Sub-Folder structure that allow users to browse emails by subfolders years, months, etc.

The folders will be nested in any email account folder (yes, we are even working on multi-accounts!). Then they will be organized by a simple path: year/month. And then, inside any folder, you can find the emails of that period.

In short, in your Backup folder (selected in the Preferences), you will have something like this:

So you can browse your emails better than now.

Search emails in your local backup by date

spotlight icon

Sometimes could happen that you need an email from your Gmail account but you are not online (as in airplane). What do you do?

Install the BackUp Gmail app and create your local backup!
Then you can find your emails with a powerful tool of your Mac: the Spotlight.

Set the folder where the app will store the data, the emails are saved in a subfolder called FileStore. The emails are saved in plain text (.eml format) and you’ll open them with Mail app. One file for any email.

The app creates the filename with a simple criteria:
20030929-081447_xxxxxxx.eml
where 20030929 is the date (YYYYMMDD format), 081447 is the time (HHMMSS format) and xxxxxxx is the email subject (whitespace and some special characters removed).

So, for example, you can simple search the emails by date: