[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Permission to upload evolution and evolution-data-server to unstable



Hey, almighty release-team,

I'd like to upload evolution (2.30.3-2, unstable=2.30.3-1,
testing=2.30.2-1) and evolution-data-server (2.30.3-2,
unstable=2.30.3-1, testing=2.30.2.1-1) to unstable. There's no change in
shlibs there, so it should disturb unstable (which already has the
shlibs bumps for 2.30.3).

The goal would be to ask for a freeze exception for evolution,
evolution-data-server and gtkhtml3.14 (which is already in unstable)
once they're uploaded and have been in unstable for some time, because
2.30.3 fixes a number of issues, mostly related to IMAP+ backend (IMAP
with IDLE support) and NSS.

The debdiff from testing (filtered from .po changes) are attached,
changelog entries are:

evolution-data-server (2.30.3-2) unstable; urgency=low

  [ Josselin Mouette ]
  * 01_imapx_lockup.patch: stolen upstream. Avoid evolution lockups when 
    logging out with IDLE enabled.

  [ Yves-Alexis Perez ]
  * debian/patches:
    - 101-Bug-629714-endless-loop-in-imapx_parse_status,
      102-Bug-630135-No-UI-feedback-when-imapx-connection-fail,
      103-Bug-630150-imapx-attempts-to-connect-to-server-when-,
      104-Bug-630152-imapx_parser_thread-registers-wrong-opera,
      105-Bug-629916-imapx-fails-to-handle-errors-in-imapx_com and
      106-Bug-630149-imapx_sync-never-returns-error added, fix various issues
      with IMAP+ backend leading to endless loops.

 -- Yves-Alexis Perez <corsac@debian.org>  Tue, 21 Sep 2010 21:00:52 +0200

evolution-data-server (2.30.3-1) unstable; urgency=low

  * New upstream bugfix release.
  * debian/patches:
    - 01_make-nss-db-init-more-robust dropped, included upstream
    - 02_remove-courier-imap-workaround-breaking-rename as well. 
  * debian/control:
    - update standards version to 3.9.1.
  * debian/*.shlibs:
    - bump shlibs to 2.30.3.

 -- Yves-Alexis Perez <corsac@debian.org>  Sat, 14 Aug 2010 13:47:40 +0200

The “endless loop” bugs don't have a Debian bug (I'm not sure if I'm the
only one reproducing them) but the GNOME bug number is included,
basically when quitting or synchronizing, evolution stops answering to
user input and sits there doing nothing.

evolution (2.30.3-2) unstable; urgency=low

  * debian/patches:
    - 03_correctly-init-nss added, fix nss initialisation by login to NSS
      database before invoking certificate manager.
    - 04_login-to-nss-on-demand added, only init nss when needed. 

 -- Yves-Alexis Perez <corsac@debian.org>  Tue, 21 Sep 2010 21:00:35 +0200

evolution (2.30.3-1) unstable; urgency=low

  * New upstream bugfix release.
    - fix crash in group_by_thread().                           closes: #589340
  * debian/patches:
    - 01_dont-ship-evo-mail-notifier.png dropped, included upstream.
    - 03_fix-crash-itip as well
  * debian/control:
    - bump gtkhtml build-depends to 3.30.3.
    - update standards version to 3.9.1.
  * debian/preinst:
    - only match evolution main process, evolution-data-server and 
      evolution-exchange storage process for candidate to be stopped at upgrade 
      time.
  * debian/bug-presubj:
    - update text, asking to report in Debian BTS and adding Forwarded-To
      header.

 -- Yves-Alexis Perez <corsac@debian.org>  Sat, 14 Aug 2010 13:47:16 +0200

Evolution fixes are related to nssdb, fixing correct initialization when
you have a password protected database. Without that, importing new CA
certificates into evolution would work but fail to set the trust.

gtkhtml3.14 (3.30.3-1) unstable; urgency=low

  * New upstream bugfix release, don't bump shlibs.
  * debian/control:
    - update standards version to 3.9.1.

 -- Yves-Alexis Perez <corsac@debian.org>  Sat, 14 Aug 2010 13:47:26 +0200

Sorry for the long mail, and thanks for your work.

Cheers,
-- 
Yves-Alexis
diff -Nru evolution-2.30.2/aclocal.m4 evolution-2.30.3/aclocal.m4
--- evolution-2.30.2/aclocal.m4	2010-05-18 14:44:30.000000000 +0200
+++ evolution-2.30.3/aclocal.m4	2010-08-11 23:03:40.000000000 +0200
@@ -709,8 +709,9 @@
 fi])
 
 
-# nls.m4 serial 3 (gettext-0.15)
-dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
+# nls.m4 serial 5 (gettext-0.18)
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
+dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -728,17 +729,17 @@
 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
-AC_PREREQ(2.50)
+AC_PREREQ([2.50])
 
 AC_DEFUN([AM_NLS],
 [
   AC_MSG_CHECKING([whether NLS is requested])
   dnl Default is enabled NLS
-  AC_ARG_ENABLE(nls,
+  AC_ARG_ENABLE([nls],
     [  --disable-nls           do not use Native Language Support],
     USE_NLS=$enableval, USE_NLS=yes)
-  AC_MSG_RESULT($USE_NLS)
-  AC_SUBST(USE_NLS)
+  AC_MSG_RESULT([$USE_NLS])
+  AC_SUBST([USE_NLS])
 ])
 
 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
diff -Nru evolution-2.30.2/addressbook/gui/contact-list-editor/e-contact-list-editor.c evolution-2.30.3/addressbook/gui/contact-list-editor/e-contact-list-editor.c
--- evolution-2.30.2/addressbook/gui/contact-list-editor/e-contact-list-editor.c	2010-06-20 14:14:59.000000000 +0200
+++ evolution-2.30.3/addressbook/gui/contact-list-editor/e-contact-list-editor.c	2010-06-21 17:17:40.000000000 +0200
@@ -640,7 +640,7 @@
 	entry = E_NAME_SELECTOR_ENTRY (widget);
 	model = E_CONTACT_LIST_MODEL (editor->priv->model);
 
-	email = g_strdup (e_destination_get_address (destination));
+	email = g_strdup (e_destination_get_textrep (destination, TRUE));
 	store = e_name_selector_entry_peek_destination_store (entry);
 	e_destination_store_remove_destination (store, destination);
 	gtk_entry_set_text (GTK_ENTRY (WIDGET (EMAIL_ENTRY)), "");
diff -Nru evolution-2.30.2/addressbook/gui/widgets/e-addressbook-model.c evolution-2.30.3/addressbook/gui/widgets/e-addressbook-model.c
--- evolution-2.30.2/addressbook/gui/widgets/e-addressbook-model.c	2010-06-20 14:15:00.000000000 +0200
+++ evolution-2.30.3/addressbook/gui/widgets/e-addressbook-model.c	2010-07-14 16:40:52.000000000 +0200
@@ -198,10 +198,18 @@
 			const gchar *uid;
 
 			contact = array->pdata[ii];
+			/* check if already removed */
+			if (!contact)
+				continue;
+
 			uid = e_contact_get_const (contact, E_CONTACT_UID);
+			g_return_if_fail (uid != NULL);
+
 			if (strcmp (uid, target_uid) == 0) {
 				g_object_unref (contact);
 				g_array_append_val (indices, ii);
+				array->pdata[ii] = NULL;
+				break;
 			}
 		}
 	}
diff -Nru evolution-2.30.2/calendar/gui/dialogs/comp-editor.c evolution-2.30.3/calendar/gui/dialogs/comp-editor.c
--- evolution-2.30.2/calendar/gui/dialogs/comp-editor.c	2010-06-20 14:14:58.000000000 +0200
+++ evolution-2.30.3/calendar/gui/dialogs/comp-editor.c	2010-07-14 16:40:52.000000000 +0200
@@ -2917,7 +2917,8 @@
 		EAttachment *attachment;
 		CamelDataWrapper *wrapper;
 		CamelMimePart *mime_part;
-		CamelStreamMem *mstream;
+		CamelStream *mem_stream;
+		GByteArray *mem_bytes;
 		guchar *buffer = NULL;
 		const gchar *desc, *disp;
 		gint column_id;
@@ -2934,15 +2935,16 @@
 
 		cal_mime_attach = g_malloc0 (sizeof (struct CalMimeAttach));
 		wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
-		mstream = (CamelStreamMem *) camel_stream_mem_new ();
+		mem_bytes = g_byte_array_new ();
+		mem_stream = camel_stream_mem_new_with_byte_array (mem_bytes);
 
-		camel_data_wrapper_decode_to_stream (wrapper, (CamelStream *) mstream);
-		buffer = g_memdup (mstream->buffer->data, mstream->buffer->len);
+		camel_data_wrapper_decode_to_stream (wrapper, mem_stream);
+		buffer = g_memdup (mem_bytes->data, mem_bytes->len);
 
 		camel_mime_part_set_content_id (mime_part, NULL);
 
 		cal_mime_attach->encoded_data = (gchar *)buffer;
-		cal_mime_attach->length = mstream->buffer->len;
+		cal_mime_attach->length = mem_bytes->len;
 		cal_mime_attach->filename = g_strdup (camel_mime_part_get_filename (mime_part));
 		desc = camel_mime_part_get_description (mime_part);
 		if (!desc || *desc == '\0')
@@ -2957,7 +2959,7 @@
 
 		attach_list = g_slist_append (attach_list, cal_mime_attach);
 
-		camel_object_unref (mstream);
+		camel_object_unref (mem_stream);
 
 	}
 
diff -Nru evolution-2.30.2/calendar/gui/e-cal-list-view.c evolution-2.30.3/calendar/gui/e-cal-list-view.c
--- evolution-2.30.2/calendar/gui/e-cal-list-view.c	2010-06-20 14:14:52.000000000 +0200
+++ evolution-2.30.3/calendar/gui/e-cal-list-view.c	2010-06-26 00:50:42.000000000 +0200
@@ -312,8 +312,6 @@
 		E_TYPE_CAL_LIST_VIEW, "model", model, NULL);
 	setup_e_table (E_CAL_LIST_VIEW (cal_list_view));
 
-	g_object_unref (model);
-
 	return cal_list_view;
 }
 
diff -Nru evolution-2.30.2/calendar/gui/e-day-view.c evolution-2.30.3/calendar/gui/e-day-view.c
--- evolution-2.30.2/calendar/gui/e-day-view.c	2010-06-20 14:14:55.000000000 +0200
+++ evolution-2.30.3/calendar/gui/e-day-view.c	2010-07-28 23:15:30.000000000 +0200
@@ -2613,6 +2613,9 @@
 	str = g_strdup_printf (_("Week %d"), g_date_get_iso8601_week_of_year (&dt));
 	gtk_label_set_text (GTK_LABEL (day_view->week_number_label), str);
 	g_free (str);
+
+	if (day_view->work_week_view)
+		e_day_view_recalc_work_week (day_view);
 }
 
 /* Whether we are displaying a work-week, in which case the display always
@@ -4266,7 +4269,7 @@
 	} else {
 		ECalComponentDateTime ecdt;
 
-		e_cal_component_get_dtend (comp, &date);
+		e_cal_component_get_dtend (comp, &ecdt);
 		is_date = ecdt.value && ecdt.value->is_date;
 		if (!is_date)
 			date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
diff -Nru evolution-2.30.2/configure evolution-2.30.3/configure
--- evolution-2.30.2/configure	2010-05-18 14:44:32.000000000 +0200
+++ evolution-2.30.3/configure	2010-08-11 23:03:43.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for evolution 2.30.2.
+# Generated by GNU Autoconf 2.65 for evolution 2.30.3.
 #
 # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution>.
 #
@@ -702,8 +702,8 @@
 # Identity of this package.
 PACKAGE_NAME='evolution'
 PACKAGE_TARNAME='evolution'
-PACKAGE_VERSION='2.30.2'
-PACKAGE_STRING='evolution 2.30.2'
+PACKAGE_VERSION='2.30.3'
+PACKAGE_STRING='evolution 2.30.3'
 PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution'
 PACKAGE_URL=''
 
@@ -1777,7 +1777,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures evolution 2.30.2 to adapt to many kinds of systems.
+\`configure' configures evolution 2.30.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1847,7 +1847,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of evolution 2.30.2:";;
+     short | recursive ) echo "Configuration of evolution 2.30.3:";;
    esac
   cat <<\_ACEOF
 
@@ -2146,7 +2146,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-evolution configure 2.30.2
+evolution configure 2.30.3
 generated by GNU Autoconf 2.65
 
 Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2517,7 +2517,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by evolution $as_me 2.30.2, which was
+It was created by evolution $as_me 2.30.3, which was
 generated by GNU Autoconf 2.65.  Invocation command line was
 
   $ $0 $@
@@ -3325,7 +3325,7 @@
 
 # Define the identity of the package.
  PACKAGE='evolution'
- VERSION='2.30.2'
+ VERSION='2.30.3'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4562,9 +4562,9 @@
 
 
 
-if test "$2.30.2" != "$2.30.2"; then
+if test "$2.30.3" != "$2.30.3"; then
 
-$as_echo "#define STABLE_VERSION \"2.30.2\"" >>confdefs.h
+$as_echo "#define STABLE_VERSION \"2.30.3\"" >>confdefs.h
 
 fi
 
@@ -14402,33 +14402,33 @@
     pkg_cv_EVOLUTION_DATA_SERVER_CFLAGS="$EVOLUTION_DATA_SERVER_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libebook-1.2 >= 2.30.2
-	 libecal-1.2 >= 2.30.2
-	 libedataserver-1.2 >= 2.30.2
-	 libedataserverui-1.2 >= 2.30.2
-	 libegroupwise-1.2 >= 2.30.2
-	 libebackend-1.2 >= 2.30.2
-	 libgdata-1.2 >= 2.30.2
-	 libgdata-google-1.2 >= 2.30.2\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libebook-1.2 >= 2.30.2
-	 libecal-1.2 >= 2.30.2
-	 libedataserver-1.2 >= 2.30.2
-	 libedataserverui-1.2 >= 2.30.2
-	 libegroupwise-1.2 >= 2.30.2
-	 libebackend-1.2 >= 2.30.2
-	 libgdata-1.2 >= 2.30.2
-	 libgdata-google-1.2 >= 2.30.2") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libebook-1.2 >= 2.30.3
+	 libecal-1.2 >= 2.30.3
+	 libedataserver-1.2 >= 2.30.3
+	 libedataserverui-1.2 >= 2.30.3
+	 libegroupwise-1.2 >= 2.30.3
+	 libebackend-1.2 >= 2.30.3
+	 libgdata-1.2 >= 2.30.3
+	 libgdata-google-1.2 >= 2.30.3\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libebook-1.2 >= 2.30.3
+	 libecal-1.2 >= 2.30.3
+	 libedataserver-1.2 >= 2.30.3
+	 libedataserverui-1.2 >= 2.30.3
+	 libegroupwise-1.2 >= 2.30.3
+	 libebackend-1.2 >= 2.30.3
+	 libgdata-1.2 >= 2.30.3
+	 libgdata-google-1.2 >= 2.30.3") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_EVOLUTION_DATA_SERVER_CFLAGS=`$PKG_CONFIG --cflags "libebook-1.2 >= 2.30.2
-	 libecal-1.2 >= 2.30.2
-	 libedataserver-1.2 >= 2.30.2
-	 libedataserverui-1.2 >= 2.30.2
-	 libegroupwise-1.2 >= 2.30.2
-	 libebackend-1.2 >= 2.30.2
-	 libgdata-1.2 >= 2.30.2
-	 libgdata-google-1.2 >= 2.30.2" 2>/dev/null`
+  pkg_cv_EVOLUTION_DATA_SERVER_CFLAGS=`$PKG_CONFIG --cflags "libebook-1.2 >= 2.30.3
+	 libecal-1.2 >= 2.30.3
+	 libedataserver-1.2 >= 2.30.3
+	 libedataserverui-1.2 >= 2.30.3
+	 libegroupwise-1.2 >= 2.30.3
+	 libebackend-1.2 >= 2.30.3
+	 libgdata-1.2 >= 2.30.3
+	 libgdata-google-1.2 >= 2.30.3" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -14439,33 +14439,33 @@
     pkg_cv_EVOLUTION_DATA_SERVER_LIBS="$EVOLUTION_DATA_SERVER_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libebook-1.2 >= 2.30.2
-	 libecal-1.2 >= 2.30.2
-	 libedataserver-1.2 >= 2.30.2
-	 libedataserverui-1.2 >= 2.30.2
-	 libegroupwise-1.2 >= 2.30.2
-	 libebackend-1.2 >= 2.30.2
-	 libgdata-1.2 >= 2.30.2
-	 libgdata-google-1.2 >= 2.30.2\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libebook-1.2 >= 2.30.2
-	 libecal-1.2 >= 2.30.2
-	 libedataserver-1.2 >= 2.30.2
-	 libedataserverui-1.2 >= 2.30.2
-	 libegroupwise-1.2 >= 2.30.2
-	 libebackend-1.2 >= 2.30.2
-	 libgdata-1.2 >= 2.30.2
-	 libgdata-google-1.2 >= 2.30.2") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libebook-1.2 >= 2.30.3
+	 libecal-1.2 >= 2.30.3
+	 libedataserver-1.2 >= 2.30.3
+	 libedataserverui-1.2 >= 2.30.3
+	 libegroupwise-1.2 >= 2.30.3
+	 libebackend-1.2 >= 2.30.3
+	 libgdata-1.2 >= 2.30.3
+	 libgdata-google-1.2 >= 2.30.3\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libebook-1.2 >= 2.30.3
+	 libecal-1.2 >= 2.30.3
+	 libedataserver-1.2 >= 2.30.3
+	 libedataserverui-1.2 >= 2.30.3
+	 libegroupwise-1.2 >= 2.30.3
+	 libebackend-1.2 >= 2.30.3
+	 libgdata-1.2 >= 2.30.3
+	 libgdata-google-1.2 >= 2.30.3") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_EVOLUTION_DATA_SERVER_LIBS=`$PKG_CONFIG --libs "libebook-1.2 >= 2.30.2
-	 libecal-1.2 >= 2.30.2
-	 libedataserver-1.2 >= 2.30.2
-	 libedataserverui-1.2 >= 2.30.2
-	 libegroupwise-1.2 >= 2.30.2
-	 libebackend-1.2 >= 2.30.2
-	 libgdata-1.2 >= 2.30.2
-	 libgdata-google-1.2 >= 2.30.2" 2>/dev/null`
+  pkg_cv_EVOLUTION_DATA_SERVER_LIBS=`$PKG_CONFIG --libs "libebook-1.2 >= 2.30.3
+	 libecal-1.2 >= 2.30.3
+	 libedataserver-1.2 >= 2.30.3
+	 libedataserverui-1.2 >= 2.30.3
+	 libegroupwise-1.2 >= 2.30.3
+	 libebackend-1.2 >= 2.30.3
+	 libgdata-1.2 >= 2.30.3
+	 libgdata-google-1.2 >= 2.30.3" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -14483,35 +14483,35 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        EVOLUTION_DATA_SERVER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libebook-1.2 >= 2.30.2
-	 libecal-1.2 >= 2.30.2
-	 libedataserver-1.2 >= 2.30.2
-	 libedataserverui-1.2 >= 2.30.2
-	 libegroupwise-1.2 >= 2.30.2
-	 libebackend-1.2 >= 2.30.2
-	 libgdata-1.2 >= 2.30.2
-	 libgdata-google-1.2 >= 2.30.2" 2>&1`
+	        EVOLUTION_DATA_SERVER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libebook-1.2 >= 2.30.3
+	 libecal-1.2 >= 2.30.3
+	 libedataserver-1.2 >= 2.30.3
+	 libedataserverui-1.2 >= 2.30.3
+	 libegroupwise-1.2 >= 2.30.3
+	 libebackend-1.2 >= 2.30.3
+	 libgdata-1.2 >= 2.30.3
+	 libgdata-google-1.2 >= 2.30.3" 2>&1`
         else
-	        EVOLUTION_DATA_SERVER_PKG_ERRORS=`$PKG_CONFIG --print-errors "libebook-1.2 >= 2.30.2
-	 libecal-1.2 >= 2.30.2
-	 libedataserver-1.2 >= 2.30.2
-	 libedataserverui-1.2 >= 2.30.2
-	 libegroupwise-1.2 >= 2.30.2
-	 libebackend-1.2 >= 2.30.2
-	 libgdata-1.2 >= 2.30.2
-	 libgdata-google-1.2 >= 2.30.2" 2>&1`
+	        EVOLUTION_DATA_SERVER_PKG_ERRORS=`$PKG_CONFIG --print-errors "libebook-1.2 >= 2.30.3
+	 libecal-1.2 >= 2.30.3
+	 libedataserver-1.2 >= 2.30.3
+	 libedataserverui-1.2 >= 2.30.3
+	 libegroupwise-1.2 >= 2.30.3
+	 libebackend-1.2 >= 2.30.3
+	 libgdata-1.2 >= 2.30.3
+	 libgdata-google-1.2 >= 2.30.3" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$EVOLUTION_DATA_SERVER_PKG_ERRORS" >&5
 
-	as_fn_error "Package requirements (libebook-1.2 >= 2.30.2
-	 libecal-1.2 >= 2.30.2
-	 libedataserver-1.2 >= 2.30.2
-	 libedataserverui-1.2 >= 2.30.2
-	 libegroupwise-1.2 >= 2.30.2
-	 libebackend-1.2 >= 2.30.2
-	 libgdata-1.2 >= 2.30.2
-	 libgdata-google-1.2 >= 2.30.2) were not met:
+	as_fn_error "Package requirements (libebook-1.2 >= 2.30.3
+	 libecal-1.2 >= 2.30.3
+	 libedataserver-1.2 >= 2.30.3
+	 libedataserverui-1.2 >= 2.30.3
+	 libegroupwise-1.2 >= 2.30.3
+	 libebackend-1.2 >= 2.30.3
+	 libgdata-1.2 >= 2.30.3
+	 libgdata-google-1.2 >= 2.30.3) were not met:
 
 $EVOLUTION_DATA_SERVER_PKG_ERRORS
 
@@ -21603,7 +21603,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by evolution $as_me 2.30.2, which was
+This file was extended by evolution $as_me 2.30.3, which was
 generated by GNU Autoconf 2.65.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -21669,7 +21669,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-evolution config.status 2.30.2
+evolution config.status 2.30.3
 configured by $0, generated by GNU Autoconf 2.65,
   with options \\"\$ac_cs_config\\"
 
diff -Nru evolution-2.30.2/configure.ac evolution-2.30.3/configure.ac
--- evolution-2.30.2/configure.ac	2010-05-17 22:35:53.000000000 +0200
+++ evolution-2.30.3/configure.ac	2010-06-20 19:34:54.000000000 +0200
@@ -1,7 +1,7 @@
 dnl Evolution Versions
 m4_define([evo_major_version], [2])
 m4_define([evo_minor_version], [30])
-m4_define([evo_micro_version], [2])
+m4_define([evo_micro_version], [3])
 m4_define([evo_version],
 	[evo_major_version.evo_minor_version.evo_micro_version])
 m4_define([evo_stable_version],
diff -Nru evolution-2.30.2/debian/bug-presubj evolution-2.30.3/debian/bug-presubj
--- evolution-2.30.2/debian/bug-presubj	2010-06-17 08:08:41.000000000 +0200
+++ evolution-2.30.3/debian/bug-presubj	2010-08-16 08:31:21.000000000 +0200
@@ -6,12 +6,17 @@
 
 Basically, that involves all stuff not related to packaging and Debian
 integration. That means that, usually, crashes, enhancements requests etc.
-should be submitted there. After doing that, you can open a bug on Debian BTS
-and link it to the upstream bug using the “forwarded” keyword.
+should be submitted there. Please also open a bug in the Debian BTS,
+particularly if the problem that is likely to affect other users.  When
+submitting such a report to the Debian BTS, please include a Forwarded:
+pseudo-header at the beginning of the text of the report, with the URL
+associated with the upstream, i.e.:
+
+    Forwarded-To: https://bugzilla.gnome.org/show_bug.cgi?id=<BUGID>
 
 When submitting crashes bugs, always include backtraces (inline ine the GNOME
 bugzilla) with all the relevant debugging packages (especially evolution-dbg,
 all the libe*-dbg, libgtkhtml*-dbg). More information on backtraces can be
 found at http://wiki.debian.org/HowToGetABacktrace
 
--- Yves-Alexis Perez <corsac@debian.org>  Thu, 17 Jun 2010 08:02:03 +0200
+-- Yves-Alexis Perez <corsac@debian.org>  Tue, 10 Aug 2010 20:52:17 +0200
diff -Nru evolution-2.30.2/debian/changelog evolution-2.30.3/debian/changelog
--- evolution-2.30.2/debian/changelog	2010-06-25 16:59:54.000000000 +0200
+++ evolution-2.30.3/debian/changelog	2010-09-21 21:00:36.000000000 +0200
@@ -1,3 +1,32 @@
+evolution (2.30.3-2) unstable; urgency=low
+
+  * debian/patches:
+    - 03_correctly-init-nss added, fix nss initialisation by login to NSS
+      database before invoking certificate manager.
+    - 04_login-to-nss-on-demand added, only init nss when needed. 
+
+ -- Yves-Alexis Perez <corsac@debian.org>  Tue, 21 Sep 2010 21:00:35 +0200
+
+evolution (2.30.3-1) unstable; urgency=low
+
+  * New upstream bugfix release.
+    - fix crash in group_by_thread().                           closes: #589340
+  * debian/patches:
+    - 01_dont-ship-evo-mail-notifier.png dropped, included upstream.
+    - 03_fix-crash-itip as well
+  * debian/control:
+    - bump gtkhtml build-depends to 3.30.3.
+    - update standards version to 3.9.1.
+  * debian/preinst:
+    - only match evolution main process, evolution-data-server and 
+      evolution-exchange storage process for candidate to be stopped at upgrade 
+      time.
+  * debian/bug-presubj:
+    - update text, asking to report in Debian BTS and adding Forwarded-To
+      header.
+
+ -- Yves-Alexis Perez <corsac@debian.org>  Sat, 14 Aug 2010 13:47:16 +0200
+
 evolution (2.30.2-1) unstable; urgency=low
 
   * New upstream release.
diff -Nru evolution-2.30.2/debian/control evolution-2.30.3/debian/control
--- evolution-2.30.2/debian/control	2010-06-23 21:34:12.000000000 +0200
+++ evolution-2.30.3/debian/control	2010-08-12 20:40:54.000000000 +0200
@@ -9,7 +9,7 @@
            Oystein Gisnas <oystein@gisnas.net>,
            Pedro Fragoso <emberez@gmail.com>,
            Yves-Alexis Perez <corsac@debian.org>
-Standards-Version: 3.8.4
+Standards-Version: 3.9.1
 Dm-Upload-Allowed: yes
 Homepage: http://www.gnome.org/projects/evolution/
 Vcs-Svn: svn://svn.debian.org/svn/pkg-evolution/unstable/evolution
@@ -28,28 +28,28 @@
                gtk-doc-tools (>= 0.6),
                libatk1.0-dev,
                libldap2-dev,
-               libgtkhtml3.14-dev (>= 3.30.1),
-               libgtkhtml-editor-dev (>= 3.30.1),
+               libgtkhtml3.14-dev (>= 3.30.3),
+               libgtkhtml-editor-dev (>= 3.30.3),
                libkrb5-dev,
                libnss3-dev,
                psmisc,
                libglib2.0-dev (>= 2.22.0),
-               evolution-data-server-dev (>= 2.30.2),
+               evolution-data-server-dev (>= 2.30.3),
                evolution-data-server-dev (<< 2.31),
                libgtk2.0-dev (>= 2.18.0),
                libgnomecanvas2-dev,
                libxml2-dev,
                libgconf2-dev,
-               libcamel1.2-dev (>= 2.30.2),
-               libedataserver1.2-dev (>= 2.30.2),
-               libegroupwise1.2-dev (>= 2.30.2),
-               libedataserverui1.2-dev (>= 2.30.2),
-               libebackend1.2-dev (>= 2.30.2),
-               libgdata1.2-dev (>= 2.30.2),
-               libgdata-google1.2-dev (>= 2.30.2),
+               libcamel1.2-dev (>= 2.30.3),
+               libedataserver1.2-dev (>= 2.30.3),
+               libegroupwise1.2-dev (>= 2.30.3),
+               libedataserverui1.2-dev (>= 2.30.3),
+               libebackend1.2-dev (>= 2.30.3),
+               libgdata1.2-dev (>= 2.30.3),
+               libgdata-google1.2-dev (>= 2.30.3),
                libgnome2-dev,
-               libecal1.2-dev (>= 2.30.2),
-               libebook1.2-dev (>= 2.30.2),
+               libecal1.2-dev (>= 2.30.3),
+               libebook1.2-dev (>= 2.30.3),
                libdbus-glib-1-dev,
                libnm-glib-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386],
                libnotify-dev (>= 0.3.0),
@@ -77,7 +77,7 @@
 Depends: ${shlibs:Depends},
          ${misc:Depends},
          evolution-common (= ${source:Version}),
-         evolution-data-server (>= 2.30.2),
+         evolution-data-server (>= 2.30.3),
          evolution-data-server (<< 2.31),
          gnome-icon-theme (>= 2.19.92),
          dbus
diff -Nru evolution-2.30.2/debian/evolution.preinst evolution-2.30.3/debian/evolution.preinst
--- evolution-2.30.2/debian/evolution.preinst	2009-05-02 09:32:45.000000000 +0200
+++ evolution-2.30.3/debian/evolution.preinst	2010-06-29 17:58:23.000000000 +0200
@@ -12,7 +12,7 @@
 
 upgrade_check() {
   seen=0
-  while pgrep '^(/usr/lib/)?evolution' > /dev/null; do
+  while pgrep -fx 'evolution|/usr/lib/evolution/.*/evolution-exchange-storage|/usr/lib/evolution/evolution-data-server-.*' > /dev/null; do
     error_msg
     seen=$(($seen + 1))
     if [ $seen = 3 ]; then
diff -Nru evolution-2.30.2/debian/patches/01_dont-ship-evo-mail-notifier.png.patch evolution-2.30.3/debian/patches/01_dont-ship-evo-mail-notifier.png.patch
--- evolution-2.30.2/debian/patches/01_dont-ship-evo-mail-notifier.png.patch	2009-10-18 20:32:02.000000000 +0200
+++ evolution-2.30.3/debian/patches/01_dont-ship-evo-mail-notifier.png.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-diff --git a/help/Makefile.am b/help/Makefile.am
-index b7e1ac6..956e94a 100644
---- a/help/Makefile.am
-+++ b/help/Makefile.am
-@@ -42,7 +42,6 @@ DOC_FIGURES =  \
- 	figures/evo_mboxreceive_a.png 		\
- 	figures/evo_memo_a.png 			\
- 	figures/evo_mhreceive_a.png 		\
--	figures/evo_mail_notifier.png		\
- 	figures/evo_memo_a.png			\
- 	figures/evo_newmess_a.png 		\
- 	figures/evo_newmail.png			\
-diff --git a/help/Makefile.in b/help/Makefile.in
-index 5c6ddd4..355f8d8 100644
---- a/help/Makefile.in
-+++ b/help/Makefile.in
-@@ -577,7 +577,6 @@ DOC_FIGURES = \
- 	figures/evo_mboxreceive_a.png 		\
- 	figures/evo_memo_a.png 			\
- 	figures/evo_mhreceive_a.png 		\
--	figures/evo_mail_notifier.png		\
- 	figures/evo_memo_a.png			\
- 	figures/evo_newmess_a.png 		\
- 	figures/evo_newmail.png			\
diff -Nru evolution-2.30.2/debian/patches/03_correctly-init-nss.patch evolution-2.30.3/debian/patches/03_correctly-init-nss.patch
--- evolution-2.30.2/debian/patches/03_correctly-init-nss.patch	1970-01-01 01:00:00.000000000 +0100
+++ evolution-2.30.3/debian/patches/03_correctly-init-nss.patch	2010-09-12 20:02:05.000000000 +0200
@@ -0,0 +1,27 @@
+commit 96f4d86c98c801a4510c17b948609af76ffb6061
+Author: David Woodhouse <David.Woodhouse@intel.com>
+Date:   Sun Sep 12 16:59:41 2010 +0100
+
+    Bug 626066 - log in to NSS database before invoking certificate manager
+
+diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c
+index d76b743..f0c68f2 100644
+--- a/smime/gui/certificate-manager.c
++++ b/smime/gui/certificate-manager.c
+@@ -1000,11 +1000,15 @@ certificate_manager_config_init (EShell *shell)
+ 	CertificateManagerData *cfm_data;
+ 	GtkWidget *preferences_window;
+ 	GtkWidget *widget;
++	PK11SlotInfo* slot;
++	ECertDB *cert_db;
+ 
+ 	g_return_if_fail (E_IS_SHELL (shell));
+ 
+ 	/* We need to peek the db here to make sure it (and NSS) are fully initialized. */
+-	e_cert_db_peek ();
++	cert_db = e_cert_db_peek();
++	slot = PK11_GetInternalKeySlot();
++	e_cert_db_login_to_slot(cert_db, slot);
+ 
+ 	cfm_data = g_new0 (CertificateManagerData, 1);
+ 
diff -Nru evolution-2.30.2/debian/patches/03_fix-crash-itip.patch evolution-2.30.3/debian/patches/03_fix-crash-itip.patch
--- evolution-2.30.2/debian/patches/03_fix-crash-itip.patch	2010-06-24 07:48:15.000000000 +0200
+++ evolution-2.30.3/debian/patches/03_fix-crash-itip.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,35 +0,0 @@
-commit 6312708e37d0f0fe6aa416b008948028d2719df1
-Author: Milan Crha <mcrha@redhat.com>
-Date:   Wed Jun 23 17:48:14 2010 +0200
-
-    Bug #619959 - Crash in format_itip at itip-formatter.c line 2567
-
-diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
-index 526af07..e5a4b1d 100644
---- a/plugins/itip-formatter/itip-formatter.c
-+++ b/plugins/itip-formatter/itip-formatter.c
-@@ -2536,6 +2536,7 @@ format_itip (EPlugin *ep, EMFormatHookTarget *target)
- 	struct _itip_puri *puri;
- 	CamelDataWrapper *content;
- 	CamelStream *mem;
-+	GByteArray *buffer = g_byte_array_new ();
- 
- 	classid = g_strdup_printf("itip:///%s", ((EMFormat *) target->format)->part_id->str);
- 
-@@ -2561,13 +2562,13 @@ format_itip (EPlugin *ep, EMFormatHookTarget *target)
- 
- 	/* This is non-gui thread. Download the part for using in the main thread */
- 	content = camel_medium_get_content_object ((CamelMedium *) target->part);
--	mem = camel_stream_mem_new ();
-+	mem = camel_stream_mem_new_with_byte_array (buffer);
- 	camel_data_wrapper_decode_to_stream (content, mem);
- 
--	if (((CamelStreamMem *) mem)->buffer->len == 0)
-+	if (buffer->len == 0)
- 		puri->vcalendar = NULL;
- 	else
--		puri->vcalendar = g_strndup ((gchar *)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len);
-+		puri->vcalendar = g_strndup ((gchar *)buffer->data, buffer->len);
- 	camel_object_unref (mem);
- 
- 	camel_stream_printf (target->stream, "<table border=0 width=\"100%%\" cellpadding=3><tr>");
diff -Nru evolution-2.30.2/debian/patches/04_login-to-nss-on-demand.patch evolution-2.30.3/debian/patches/04_login-to-nss-on-demand.patch
--- evolution-2.30.2/debian/patches/04_login-to-nss-on-demand.patch	1970-01-01 01:00:00.000000000 +0100
+++ evolution-2.30.3/debian/patches/04_login-to-nss-on-demand.patch	2010-09-13 22:13:23.000000000 +0200
@@ -0,0 +1,133 @@
+commit 12415fd17113335a36d37d32add346fb7c802824
+Author: David Woodhouse <David.Woodhouse@intel.com>
+Date:   Mon Sep 13 20:59:45 2010 +0100
+
+    Bug 626066 - log in to NSS database on demand for changing trust
+
+diff --git a/smime/gui/cert-trust-dialog.c b/smime/gui/cert-trust-dialog.c
+index 9c87c66..66ce69b 100644
+--- a/smime/gui/cert-trust-dialog.c
++++ b/smime/gui/cert-trust-dialog.c
+@@ -73,7 +73,7 @@ ctd_response(GtkWidget *w, guint id, CertTrustDialogData *data)
+ 		e_cert_trust_add_peer_trust (&trust, FALSE,
+ 					     gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (data->trust_button)),
+ 					     FALSE);
+-		CERT_ChangeCertTrust (CERT_GetDefaultCertDB(), icert, &trust);
++		e_cert_db_change_cert_trust (icert, &trust);
+ 		break;
+ 	case GTK_RESPONSE_ACCEPT: {
+ 		/* just *what on earth* was chris thinking here!?!?!  copied from certificate-manager.c */
+@@ -101,7 +101,7 @@ ctd_response(GtkWidget *w, guint id, CertTrustDialogData *data)
+ 						   trust_email,
+ 						   trust_objsign);
+ 
+-			CERT_ChangeCertTrust(CERT_GetDefaultCertDB(), icert, &trust);
++			e_cert_db_change_cert_trust (icert, &trust);
+ 		}
+ 
+ 		gtk_widget_destroy (dialog);
+diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c
+index f0c68f2..a59b54e 100644
+--- a/smime/gui/certificate-manager.c
++++ b/smime/gui/certificate-manager.c
+@@ -592,7 +592,7 @@ edit_ca (GtkWidget *widget, CertificateManagerData *cfm)
+ 							   trust_email,
+ 							   trust_objsign);
+ 
+-				CERT_ChangeCertTrust (CERT_GetDefaultCertDB(), icert, &trust);
++				e_cert_db_change_cert_trust (icert, &trust);
+ 			}
+ 
+ 			gtk_widget_destroy (dialog);
+@@ -1000,15 +1000,11 @@ certificate_manager_config_init (EShell *shell)
+ 	CertificateManagerData *cfm_data;
+ 	GtkWidget *preferences_window;
+ 	GtkWidget *widget;
+-	PK11SlotInfo* slot;
+-	ECertDB *cert_db;
+ 
+ 	g_return_if_fail (E_IS_SHELL (shell));
+ 
+ 	/* We need to peek the db here to make sure it (and NSS) are fully initialized. */
+-	cert_db = e_cert_db_peek();
+-	slot = PK11_GetInternalKeySlot();
+-	e_cert_db_login_to_slot(cert_db, slot);
++	e_cert_db_peek ();
+ 
+ 	cfm_data = g_new0 (CertificateManagerData, 1);
+ 
+diff --git a/smime/lib/e-cert-db.c b/smime/lib/e-cert-db.c
+index 52545f3..c3517ba 100644
+--- a/smime/lib/e-cert-db.c
++++ b/smime/lib/e-cert-db.c
+@@ -66,6 +66,7 @@
+ #include "p12plcy.h"
+ #include "pk11func.h"
+ #include "nssckbi.h"
++#include <secerr.h>
+ #include "secmod.h"
+ #include "certdb.h"
+ #include "plstr.h"
+@@ -716,6 +717,16 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error)
+ 		srv = CERT_AddTempCertToPerm(tmpCert,
+ 					     nickname,
+ 					     &trust);
++		/*
++		  If this fails with SEC_ERROR_TOKEN_NOT_LOGGED_IN, it seems
++		  that the import *has* worked, but the setting of trust bits
++		  failed -- so only set the trust. This *has* to be an NSS bug?
++		*/
++		if (srv != SECSuccess &&
++		    PORT_GetError () == SEC_ERROR_TOKEN_NOT_LOGGED_IN &&
++		    e_cert_db_login_to_slot (NULL, PK11_GetInternalKeySlot()))
++			srv = CERT_ChangeCertTrust (CERT_GetDefaultCertDB (),
++						    tmpCert, &trust);
+ 
+ 		if (srv != SECSuccess) {
+ 			/* XXX gerror */
+@@ -752,6 +763,23 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error)
+ 		return TRUE;
+ 	}
+ }
++gboolean e_cert_db_change_cert_trust(CERTCertificate *cert, CERTCertTrust *trust)
++{
++	SECStatus srv;
++
++	srv = CERT_ChangeCertTrust (CERT_GetDefaultCertDB (),
++				    cert, trust);
++	if (srv != SECSuccess &&
++	    PORT_GetError () == SEC_ERROR_TOKEN_NOT_LOGGED_IN &&
++	    e_cert_db_login_to_slot (NULL, PK11_GetInternalKeySlot()))
++		srv = CERT_ChangeCertTrust (CERT_GetDefaultCertDB (),
++					    cert, trust);
++
++	if (srv != SECSuccess)
++		return FALSE;
++	return TRUE;
++}
++
+ 
+ /* deleting certificates */
+ gboolean
+@@ -779,8 +807,7 @@ e_cert_db_delete_cert (ECertDB *certdb,
+ 		CERTCertTrust trust;
+ 
+ 		e_cert_trust_init_with_values (&trust, 0, 0, 0);
+-		srv = CERT_ChangeCertTrust(CERT_GetDefaultCertDB(),
+-					   cert, &trust);
++		srv = e_cert_db_change_cert_trust (cert, &trust);
+ 	}
+ 
+ 	/*PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("cert deleted: %d", srv));*/
+diff --git a/smime/lib/e-cert-db.h b/smime/lib/e-cert-db.h
+index 0e19e00..25c8dfd 100644
+--- a/smime/lib/e-cert-db.h
++++ b/smime/lib/e-cert-db.h
+@@ -135,4 +135,7 @@ gboolean             e_cert_db_export_pkcs12_file (ECertDB *cert_db,
+ gboolean             e_cert_db_login_to_slot      (ECertDB *cert_db,
+ 						   PK11SlotInfo *slot);
+ 
++gboolean	     e_cert_db_change_cert_trust  (CERTCertificate *cert,
++						   CERTCertTrust *trust);
++
+ #endif /* _E_CERT_DB_H_ */
diff -Nru evolution-2.30.2/debian/patches/series evolution-2.30.3/debian/patches/series
--- evolution-2.30.2/debian/patches/series	2010-06-22 18:04:28.000000000 +0200
+++ evolution-2.30.3/debian/patches/series	2010-09-21 00:02:28.000000000 +0200
@@ -1,3 +1,3 @@
-01_dont-ship-evo-mail-notifier.png.patch
 02_let-nss-search-for-nssckbi.patch
-03_fix-crash-itip.patch
+03_correctly-init-nss.patch
+04_login-to-nss-on-demand.patch
diff -Nru evolution-2.30.2/doc/reference/shell/html/ch01.html evolution-2.30.3/doc/reference/shell/html/ch01.html
--- evolution-2.30.2/doc/reference/shell/html/ch01.html	2010-06-20 19:12:37.000000000 +0200
+++ evolution-2.30.3/doc/reference/shell/html/ch01.html	2010-08-11 23:23:38.000000000 +0200
@@ -21,7 +21,7 @@
 </tr></table>
 <div class="chapter" title="The Shell">
 <div class="titlepage"><div><div><h2 class="title">
-<a name="id2717578"></a>The Shell</h2></div></div></div>
+<a name="id2815336"></a>The Shell</h2></div></div></div>
 <div class="toc"><dl>
 <dt>
 <span class="refentrytitle"><a href="EShell.html">EShell</a></span><span class="refpurpose"> — the backbone of Evolution</span>
diff -Nru evolution-2.30.2/doc/reference/shell/html/ch02.html evolution-2.30.3/doc/reference/shell/html/ch02.html
--- evolution-2.30.2/doc/reference/shell/html/ch02.html	2010-06-20 19:12:37.000000000 +0200
+++ evolution-2.30.3/doc/reference/shell/html/ch02.html	2010-08-11 23:23:38.000000000 +0200
@@ -21,7 +21,7 @@
 </tr></table>
 <div class="chapter" title="Basic Utility Functions">
 <div class="titlepage"><div><div><h2 class="title">
-<a name="id2798891"></a>Basic Utility Functions</h2></div></div></div>
+<a name="id2896648"></a>Basic Utility Functions</h2></div></div></div>
 <div class="toc"><dl>
 <dt>
 <span class="refentrytitle"><a href="eshell-Mail-Accounts.html">Mail Account Functions</a></span><span class="refpurpose"></span>
diff -Nru evolution-2.30.2/doc/reference/shell/html/ch03.html evolution-2.30.3/doc/reference/shell/html/ch03.html
--- evolution-2.30.2/doc/reference/shell/html/ch03.html	2010-06-20 19:12:37.000000000 +0200
+++ evolution-2.30.3/doc/reference/shell/html/ch03.html	2010-08-11 23:23:38.000000000 +0200
@@ -21,7 +21,7 @@
 </tr></table>
 <div class="chapter" title="Actions">
 <div class="titlepage"><div><div><h2 class="title">
-<a name="id2832817"></a>Actions</h2></div></div></div>
+<a name="id2930575"></a>Actions</h2></div></div></div>
 <div class="toc"><dl>
 <dt>
 <span class="refentrytitle"><a href="eshell-Shell-Actions.html">Shell Actions</a></span><span class="refpurpose"></span>
diff -Nru evolution-2.30.2/doc/reference/shell/html/ch04.html evolution-2.30.3/doc/reference/shell/html/ch04.html
--- evolution-2.30.2/doc/reference/shell/html/ch04.html	2010-06-20 19:12:37.000000000 +0200
+++ evolution-2.30.3/doc/reference/shell/html/ch04.html	2010-08-11 23:23:38.000000000 +0200
@@ -21,7 +21,7 @@
 </tr></table>
 <div class="chapter" title="Object Hierarchy">
 <div class="titlepage"><div><div><h2 class="title">
-<a name="id2793463"></a>Object Hierarchy</h2></div></div></div>
+<a name="id2891221"></a>Object Hierarchy</h2></div></div></div>
 <pre class="screen">
     GObject
         <a class="link" href="eshell-Bit-Arrays-(Legacy).html#EBitArray">EBitArray</a>
diff -Nru evolution-2.30.2/doc/reference/shell/html/EShellSwitcher.html evolution-2.30.3/doc/reference/shell/html/EShellSwitcher.html
--- evolution-2.30.2/doc/reference/shell/html/EShellSwitcher.html	2010-06-20 19:12:37.000000000 +0200
+++ evolution-2.30.3/doc/reference/shell/html/EShellSwitcher.html	2010-08-11 23:23:38.000000000 +0200
@@ -131,7 +131,7 @@
 <p>
 Adds a button to <em class="parameter"><code>switcher</code></em> that proxies for <em class="parameter"><code>switcher_action</code></em>.
 Switcher buttons appear in the order they were added. A middle
-click opens a new window of this type.  
+click opens a new window of this type.
 </p>
 <p>
 <a class="link" href="EShellWindow.html" title="EShellWindow"><span class="type">EShellWindow</span></a> adds switcher actions in the order given by the
diff -Nru evolution-2.30.2/doc/reference/shell/html/ix01.html evolution-2.30.3/doc/reference/shell/html/ix01.html
--- evolution-2.30.2/doc/reference/shell/html/ix01.html	2010-06-20 19:12:37.000000000 +0200
+++ evolution-2.30.3/doc/reference/shell/html/ix01.html	2010-08-11 23:23:38.000000000 +0200
@@ -20,7 +20,7 @@
 </tr></table>
 <div class="index" title="Index">
 <div class="titlepage"><div><div><h2 class="title">
-<a name="id2793474"></a>Index</h2></div></div></div>
+<a name="id2891232"></a>Index</h2></div></div></div>
 <div class="index">
 <div class="indexdiv">
 <h3>D</h3>
diff -Nru evolution-2.30.2/em-format/em-format.c evolution-2.30.3/em-format/em-format.c
--- evolution-2.30.2/em-format/em-format.c	2010-06-20 14:14:49.000000000 +0200
+++ evolution-2.30.3/em-format/em-format.c	2010-07-18 19:42:22.000000000 +0200
@@ -117,6 +117,9 @@
 	if (emf->session)
 		camel_object_unref (emf->session);
 
+	if (emf->message)
+		camel_object_unref (emf->message);
+
 	g_hash_table_destroy (emf->inline_table);
 
 	em_format_clear_headers(emf);
@@ -1229,6 +1232,7 @@
 	const gchar *charset = NULL;
 	CamelMimeFilterWindows *windows = NULL;
 	CamelStream *mem_stream = NULL;
+	GByteArray *mem_bytes;
 	gsize size;
 	gsize max;
 	GConfClient *gconf;
@@ -1261,7 +1265,8 @@
 		charset = emf->default_charset;
 	}
 
-	mem_stream = (CamelStream *)camel_stream_mem_new ();
+	mem_bytes = g_byte_array_new ();
+	mem_stream = camel_stream_mem_new_with_byte_array (mem_bytes);
 	filter_stream = camel_stream_filter_new_with_stream(mem_stream);
 
 	if ((filter = camel_mime_filter_charset_new_convert(charset, "UTF-8"))) {
@@ -1288,11 +1293,12 @@
 		camel_stream_write_to_stream(mem_stream, (CamelStream *)stream);
 		camel_stream_flush((CamelStream *)stream);
 	} else {
-		((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_optional(emf, stream, (CamelMimePart *)dw, mem_stream);
+		((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_optional(emf, stream, (CamelMimePart *)dw, mem_bytes);
 	}
 
 	if (windows)
 		camel_object_unref(windows);
+	camel_object_unref (mem_stream);
 }
 
 /**
diff -Nru evolution-2.30.2/em-format/em-format.h evolution-2.30.3/em-format/em-format.h
--- evolution-2.30.2/em-format/em-format.h	2010-06-20 14:14:49.000000000 +0200
+++ evolution-2.30.3/em-format/em-format.h	2010-07-14 16:40:52.000000000 +0200
@@ -255,7 +255,7 @@
 	gboolean (*busy)(EMFormat *);
 
 	/* Shows optional way to open messages  */
-	void (*format_optional)(EMFormat *, CamelStream *, CamelMimePart *, CamelStream* );
+	void (*format_optional)(EMFormat *, CamelStream *, CamelMimePart *, const GByteArray *mem_bytes);
 
 	/* signals */
 	/* complete, alternative to polling busy, for asynchronous work */
diff -Nru evolution-2.30.2/e-util/e-config.c evolution-2.30.3/e-util/e-config.c
--- evolution-2.30.2/e-util/e-config.c	2010-06-20 14:14:49.000000000 +0200
+++ evolution-2.30.3/e-util/e-config.c	2010-06-26 00:54:01.000000000 +0200
@@ -94,7 +94,7 @@
 	EConfigPrivate *p = emp->priv;
 	GList *link;
 
-	d(printf("finalising EConfig %p\n", o));
+	d(printf("finalising EConfig %p\n", object));
 
 	g_free(emp->id);
 
@@ -381,54 +381,62 @@
 	return strcmp(a->item->path, b->item->path);
 }
 
-static struct _widget_node *
+static GList *
 ec_assistant_find_page (EConfig *ec, GtkWidget *page, gint *page_index)
 {
-	struct _widget_node *wn = NULL;
+	struct _widget_node *node = NULL;
 	GList *link;
 
 	g_return_val_if_fail (ec != NULL, NULL);
 	g_return_val_if_fail (GTK_IS_ASSISTANT (ec->widget), NULL);
 	g_return_val_if_fail (page != NULL, NULL);
 
-	link = ec->priv->widgets;
+	/* Assume failure, then if we do fail we can just return. */
+	if (page_index != NULL)
+		*page_index = -1;
+
+	/* Find the page widget in our sorted widget node list. */
+	for (link = ec->priv->widgets; link != NULL; link = link->next) {
+		node = link->data;
 
-	while (link != NULL) {
-		wn = link->data;
+		if (node->frame != page)
+			continue;
 
-		if (wn->frame == page
-		    && (wn->item->type == E_CONFIG_PAGE
-			|| wn->item->type == E_CONFIG_PAGE_START
-			|| wn->item->type == E_CONFIG_PAGE_FINISH))
-				break;
+		if (node->item->type == E_CONFIG_PAGE)
+			break;
 
-		link = g_list_next (link);
-	}
+		if (node->item->type == E_CONFIG_PAGE_START)
+			break;
 
-	g_return_val_if_fail (wn != NULL, NULL);
+		if (node->item->type == E_CONFIG_PAGE_FINISH)
+			break;
+	}
 
-	if (wn->frame != page)
-		wn = NULL;
+	/* FAIL: The widget is not in our list. */
+	if (link == NULL)
+		return NULL;
 
+	/* Find the corresponding GtkAssistant page index. */
 	if (page_index) {
-		if (wn) {
-			GtkAssistant *assistant = GTK_ASSISTANT (ec->widget);
-			gint index, count = gtk_assistant_get_n_pages (assistant);
-
-			for (index = 0; index < count; index++) {
-				if (gtk_assistant_get_nth_page (assistant, index) == page)
-					break;
+		GtkAssistant *assistant;
+		GtkWidget *nth_page;
+		gint ii, n_pages;
+
+		assistant = GTK_ASSISTANT (ec->widget);
+		n_pages = gtk_assistant_get_n_pages (assistant);
+
+		for (ii = 0; ii < n_pages; ii++) {
+			nth_page = gtk_assistant_get_nth_page (assistant, ii);
+			if (page == nth_page) {
+				*page_index = ii;
+				break;
 			}
-
-			if (index == count)
-				index = -1;
-			*page_index = index;
-		} else {
-			*page_index = -1;
 		}
+
+		g_warn_if_fail (ii < n_pages);
 	}
 
-	return wn;
+	return link;
 }
 
 static void
@@ -438,6 +446,7 @@
 	struct _finish_page_node *fp;
 	GtkAssistant *assistant;
 	GtkWidget *page;
+	GList *link;
 	gint page_no;
 
 	g_return_if_fail (GTK_IS_ASSISTANT (ec->widget));
@@ -452,8 +461,9 @@
 	page = gtk_assistant_get_nth_page (assistant, page_no);
 	g_return_if_fail (page != NULL);
 
-	wn = ec_assistant_find_page (ec, page, NULL);
-	g_return_if_fail (wn != NULL);
+	link = ec_assistant_find_page (ec, page, NULL);
+	g_return_if_fail (link != NULL);
+	wn = link->data;
 
 	/* this should come first, as the check function can change the finish state of the page */
 	gtk_assistant_set_page_complete (assistant, page, e_config_page_check (ec, wn->item->path));
@@ -477,38 +487,52 @@
 static gint
 ec_assistant_forward (gint current_page, gpointer user_data)
 {
+	GtkAssistant *assistant;
 	EConfig *ec = user_data;
-	struct _widget_node *wn;
-	gint next_page = current_page + 1;
+	struct _widget_node *node;
+	GtkWidget *page_widget;
 	GList *link = NULL;
+	gint next_page;
+
+	/* As far as we're concerned, the GtkAssistant is just an unordered
+	 * collection of pages.  Our sorted list of widget nodes determines
+	 * the next page. */
 
-	d(printf("next page from '%d'\n", current_page));
+	assistant = GTK_ASSISTANT (ec->widget);
+	page_widget = gtk_assistant_get_nth_page (assistant, current_page);
+	link = ec_assistant_find_page (ec, page_widget, NULL);
 
-	wn = ec_assistant_find_page (ec, gtk_assistant_get_nth_page (GTK_ASSISTANT (ec->widget), current_page), NULL);
+	g_return_val_if_fail (link != NULL, -1);
+	node = (struct _widget_node *) link->data;
 
-	/* XXX This is a little kludgy.  We have to find
-	 *     the GList node for the page we just found. */
-	if (wn != NULL)
-		link = g_list_find (ec->priv->widgets, wn);
-
-	if (link && link->next) {
-		for (link = link->next; link->next; link = link->next) {
-			wn = link->data;
-
-			if (!wn->empty && wn->frame != NULL
-			    && (wn->item->type == E_CONFIG_PAGE
-				|| wn->item->type == E_CONFIG_PAGE_START
-				|| wn->item->type == E_CONFIG_PAGE_FINISH))
-				break;
-		}
-	}
+	/* If we're already on a FINISH page then we're done. */
+	if (node->item->type == E_CONFIG_PAGE_FINISH)
+		return -1;
+
+	/* Find the next E_CONFIG_PAGE* type node. */
+	for (link = link->next; link != NULL; link = link->next) {
+		node = (struct _widget_node *) link->data;
 
-	if (link && link->next) {
-		wn = link->data;
-		ec_assistant_find_page (ec, wn->frame, &next_page);
-		d(printf(" is %s (%d)\n",wn->item->path, next_page));
+		if (node->empty || node->frame == NULL)
+			continue;
+
+		if (node->item->type == E_CONFIG_PAGE)
+			break;
+
+		if (node->item->type == E_CONFIG_PAGE_START)
+			break;
+
+		if (node->item->type == E_CONFIG_PAGE_FINISH)
+			break;
 	}
 
+	/* Find the corresponding GtkAssistant page number. */
+	if (link != NULL) {
+		node = (struct _widget_node *) link->data;
+		ec_assistant_find_page (ec, node->frame, &next_page);
+	} else
+		next_page = -1;
+
 	return next_page;
 }
 
@@ -519,7 +543,7 @@
 	struct _widget_node *sectionnode = NULL, *pagenode = NULL;
 	GtkWidget *book = NULL, *page = NULL, *section = NULL, *root = NULL, *assistant = NULL;
 	gint pageno = 0, sectionno = 0, itemno = 0;
-	struct _widget_node *last_active_page = NULL;
+	GList *last_active_link = NULL;
 	gboolean is_assistant;
 	GList *link;
 
@@ -533,9 +557,20 @@
 	/* because rebuild destroys pages, and destroying active page causes crashes */
 	is_assistant = emp->widget && GTK_IS_ASSISTANT (emp->widget);
 	if (is_assistant) {
+		GtkAssistant *assistant;
 		gint page_index = gtk_assistant_get_current_page (GTK_ASSISTANT (emp->widget));
-		if (page_index != -1)
-			last_active_page = ec_assistant_find_page (emp, gtk_assistant_get_nth_page (GTK_ASSISTANT (emp->widget), page_index), NULL);
+
+		assistant = GTK_ASSISTANT (emp->widget);
+		page_index = gtk_assistant_get_current_page (assistant);
+
+		if (page_index != -1) {
+			GtkWidget *nth_page;
+
+			nth_page = gtk_assistant_get_nth_page (
+				GTK_ASSISTANT (emp->widget), page_index);
+			last_active_link = ec_assistant_find_page (
+				emp, nth_page, NULL);
+		}
 		gtk_assistant_set_current_page (GTK_ASSISTANT (emp->widget), 0);
 	}
 
@@ -659,8 +694,7 @@
 				break;
 			}
 
-			if (item->type == E_CONFIG_PAGE_FINISH || wn->widget == NULL) {
-				/* always rebuild finish page, to have it as the last page */
+			if (wn->widget == NULL) {
 				if (item->factory) {
 					page = item->factory(emp, item, root, wn->frame, wn->context->data);
 				} else {
@@ -920,11 +954,15 @@
 		}
 	}
 
-	if (is_assistant && last_active_page) {
+	if (is_assistant && last_active_link != NULL) {
+		GtkAssistant *assistant;
+		struct _widget_node *wn;
 		gint page_index = -1;
 
-		ec_assistant_find_page (emp, last_active_page->frame, &page_index);
-		gtk_assistant_set_current_page (GTK_ASSISTANT (emp->widget), page_index);
+		wn = last_active_link->data;
+		assistant = GTK_ASSISTANT (emp->widget);
+		ec_assistant_find_page (emp, wn->frame, &page_index);
+		gtk_assistant_set_current_page (assistant, page_index);
 	}
 }
 
Binary files /tmp/JLmtlwEonu/evolution-2.30.2/help/eu/figures/evo_mail_notifier.png and /tmp/6dTwgmb_pc/evolution-2.30.3/help/eu/figures/evo_mail_notifier.png differ
Binary files /tmp/JLmtlwEonu/evolution-2.30.2/help/fr/figures/evo_mail_notifier.png and /tmp/6dTwgmb_pc/evolution-2.30.3/help/fr/figures/evo_mail_notifier.png differ
diff -Nru evolution-2.30.2/help/Makefile.am evolution-2.30.3/help/Makefile.am
--- evolution-2.30.2/help/Makefile.am	2010-03-18 15:14:00.000000000 +0100
+++ evolution-2.30.3/help/Makefile.am	2010-07-25 12:26:08.000000000 +0200
@@ -42,7 +42,6 @@
 	figures/evo_mboxreceive_a.png 		\
 	figures/evo_memo_a.png 			\
 	figures/evo_mhreceive_a.png 		\
-	figures/evo_mail_notifier.png		\
 	figures/evo_memo_a.png			\
 	figures/evo_newmess_a.png 		\
 	figures/evo_newmail.png			\
diff -Nru evolution-2.30.2/help/Makefile.in evolution-2.30.3/help/Makefile.in
--- evolution-2.30.2/help/Makefile.in	2010-05-18 14:44:38.000000000 +0200
+++ evolution-2.30.3/help/Makefile.in	2010-08-11 23:03:52.000000000 +0200
@@ -563,7 +563,6 @@
 	figures/evo_mboxreceive_a.png 		\
 	figures/evo_memo_a.png 			\
 	figures/evo_mhreceive_a.png 		\
-	figures/evo_mail_notifier.png		\
 	figures/evo_memo_a.png			\
 	figures/evo_newmess_a.png 		\
 	figures/evo_newmail.png			\
diff -Nru evolution-2.30.2/mail/default/C/Inbox evolution-2.30.3/mail/default/C/Inbox
--- evolution-2.30.2/mail/default/C/Inbox	2010-03-18 15:14:01.000000000 +0100
+++ evolution-2.30.3/mail/default/C/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -57,7 +57,7 @@
 	http://mail.gnome.org/mailman/listinfo/evolution-list.
 
 	Information on the Evolution project is available at
-	http://www.gnome.org/projects/evolution.
+	http://projects.gnome.org/evolution.
 
 
 Yours Sincerely,
@@ -132,13 +132,13 @@
 
 <blockquote>
 	You can subscribe to the Evolution users mailing list at
-	<a href="http://lists.gnome.org/mailman/listinfo/evolution";>http://lists.gnome.org/mailman/listinfo/evolution</a>.
+	<a href="http://lists.gnome.org/mailman/listinfo/evolution-list";>http://lists.gnome.org/mailman/listinfo/evolution-list</a>.
 
 	Information on the Evolution project is available at
-	<a href="http://www.gnome.org/projects/evolution";>http://www.gnome.org/projects/evolution</a>.
+	<a href="http://projects.gnome.org/evolution";>http://projects.gnome.org/evolution</a>.
 	<!--
 	You can find a list of answers to Frequently Asked Questions (FAQ) at
-	<a href="http://go-evolution.org/FAQ";>http://go-evolution.org/FAQ</a>.
+	<a href="http://live.gnome.org/Evolution/FAQ";>http://live.gnome.org/Evolution/FAQ</a>.
 	-->
 <br><br>	
 </blockquote>
diff -Nru evolution-2.30.2/mail/default/ca/Inbox evolution-2.30.3/mail/default/ca/Inbox
--- evolution-2.30.2/mail/default/ca/Inbox	2010-03-18 15:14:01.000000000 +0100
+++ evolution-2.30.3/mail/default/ca/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -57,10 +57,10 @@
 Més informació
 
 	Us podeu subscriure a la llista de correu dels usuaris de
-	l'Evolution a http://mail.gnome.org/mailman/listinfo/evolution-list.
+	l'Evolution a http://mail.gnome.org/mailman/evolution-list.
 
 	Trobareu més informació sobre el projecte de l'Evolution
-	a http://www.gnome.org/projects/evolution.
+	a http://projects.gnome.org/evolution.
 
 
 Atentament,
@@ -136,13 +136,13 @@
 
 <blockquote>
 	Trobareu més informació sobre el projecte de l'Evolution
-	a <a href="http://www.gnome.org/projects/evolution";>http://www.gnome.org/projects/evolution</a>.
+	a <a href="http://projects.gnome.org/evolution";>http://projects.gnome.org/evolution</a>.
 	
 	Us podeu subscriure a la llista de correu dels usuaris de
-	l'Evolution a <a href="http://lists.gnome.org/mailman/listinfo/evolution";>http://lists.gnome.org/mailman/listinfo/evolution</a>.
+	l'Evolution a <a href="http://lists.gnome.org/mailman/listinfo/evolution-list";>http://lists.gnome.org/mailman/listinfo/evolution-list</a>.
 	<!--
 	Podeu trobar una llista de respostes a les Preguntes Més Freqüents (PMF) a
-	<a href="http://go-evolution.org/FAQ";>http://go-evolution.org/FAQ</a>.
+	<a href="http://live.gnome.org/Evolution/FAQ";>http://live.gnome.org/Evolution/FAQ</a>.
 	-->
 <br><br>	
 </blockquote>
diff -Nru evolution-2.30.2/mail/default/cs/Inbox evolution-2.30.3/mail/default/cs/Inbox
--- evolution-2.30.2/mail/default/cs/Inbox	2010-03-18 15:14:01.000000000 +0100
+++ evolution-2.30.3/mail/default/cs/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -57,7 +57,7 @@
 	na adrese http://mail.gnome.org/mailman/listinfo/evolution-list.
 
 	Informace o projektu Evolution jsou dostupné na adrese
-	http://www.gnome.org/projects/evolution.
+	http://projects.gnome.org/evolution.
 
 
 S pozdravem
@@ -133,13 +133,13 @@
 
 <blockquote>	
 	Můžete se přihlásit do poštovní konference uživatelů Evolutionu
-	na adrese <a href="http://lists.gnome.org/mailman/listinfo/evolution";>http://mail.gnome.org/mailman/listinfo/evolution-list</a>.
+	na adrese <a href="http://lists.gnome.org/mailman/listinfo/evolution-list";>http://mail.gnome.org/mailman/listinfo/evolution-list</a>.
 
 	Informace o projektu Evolution jsou dostupné na adrese
-	<a href="http://www.gnome.org/projects/evolution";>http://www.gnome.org/projects/evolution</a>.	
+	<a href="http://projects.gnome.org/evolution";>http://projects.gnome.org/evolution</a>.	
 	<!--
 	Seznam často kladených otázek (FAQ) naleznete na adrese
-	<a href="http://go-evolution.org/FAQ";>http://go-evolution.org/FAQ</a>.
+	<a href="http://live.gnome.org/Evolution/FAQ";>http://live.gnome.org/Evolution/FAQ</a>.
 	-->
 <br><br>	
 </blockquote>
diff -Nru evolution-2.30.2/mail/default/de/Inbox evolution-2.30.3/mail/default/de/Inbox
--- evolution-2.30.2/mail/default/de/Inbox	2010-03-18 15:14:01.000000000 +0100
+++ evolution-2.30.3/mail/default/de/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -62,7 +62,7 @@
 	unter http://mail.gnome.org/mailman/listinfo/evolution-list.
 
 	Informationen über das Projekt Evolution erhalten Sie unter
-	http://www.gnome.org/projects/evolution.
+	http://projects.gnome.org/evolution.
 
 
 Mit freundlichen Grüßen,
@@ -158,15 +158,15 @@
 
 <blockquote>
 	Die Mailingliste für Anwender von Evolution können Sie abonnieren unter
-	<a href="http://lists.gnome.org/mailman/listinfo/evolution";
-	>http://lists.gnome.org/mailman/listinfo/evolution</a>.
+	<a href="http://lists.gnome.org/mailman/listinfo/evolution-list";
+	>http://lists.gnome.org/mailman/listinfo/evolution-list</a>.
 
 	Informationen über das Projekt Evolution erhalten Sie unter
-	<a href="http://www.gnome.org/projects/evolution";
-	>http://www.gnome.org/projects/evolution</a>.
+	<a href="http://projects.gnome.org/evolution";
+	>http://projects.gnome.org/evolution</a>.
 	<!--
 	Eine Liste von häufig gestellten Fragen (FAQ) ist verfügbar unter
-	<a href="http://go-evolution.org/FAQ";>http://go-evolution.org/FAQ</a>.
+	<a href="http://live.gnome.org/Evolution/FAQ";>http://live.gnome.org/Evolution/FAQ</a>.
 	-->
 <br><br>	
 </blockquote>
diff -Nru evolution-2.30.2/mail/default/es/Inbox evolution-2.30.3/mail/default/es/Inbox
--- evolution-2.30.2/mail/default/es/Inbox	2010-03-18 15:14:01.000000000 +0100
+++ evolution-2.30.3/mail/default/es/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -57,10 +57,10 @@
 Más información
 
         Puede suscribirse a la lista de correo de usuarios de Evolution
-        en http://lists.gnome.org/mailman/listinfo/evolution. 
+        en http://lists.gnome.org/mailman/listinfo/evolution-list. 
 
 	La información acerca del proyecto Evolution está disponible en
-        http://www.gnome.org/projects/evolution.
+        http://projects.gnome.org/evolution.
 
 Con afecto,
 El equipo de Evolution
@@ -135,14 +135,14 @@
 
 <blockquote>
 	Puede suscribirse a la lista de correo de usuarios de Evolution	en
-	<a href="http://lists.gnome.org/mailman/listinfo/evolution";>http://lists.gnome.org/mailman/listinfo/evolution</a>.
+	<a href="http://lists.gnome.org/mailman/listinfo/evolution-list";>http://lists.gnome.org/mailman/listinfo/evolution-list</a>.
 
 	La informaci&#243;n acerca del proyecto Evolution est&#225;
 	disponible en&nbsp;
-	<a href="http://www.gnome.org/projects/evolution";>http://www.gnome.org/projects/evolution</a>.
+	<a href="http://projects.gnome.org/evolution";>http://projects.gnome.org/evolution</a>.
 	<!--
 	You can find a list of answers to Frequently Asked Questions (FAQ) at
-	<a href="http://go-evolution.org/FAQ";>http://go-evolution.org/FAQ</a>.
+	<a href="http://live.gnome.org/Evolution/FAQ";>http://live.gnome.org/Evolution/FAQ</a>.
 	-->
 <br><br>	
 </blockquote>
diff -Nru evolution-2.30.2/mail/default/fi/Inbox evolution-2.30.3/mail/default/fi/Inbox
--- evolution-2.30.2/mail/default/fi/Inbox	2010-03-18 15:14:01.000000000 +0100
+++ evolution-2.30.3/mail/default/fi/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -58,7 +58,7 @@
 	http://mail.gnome.org/mailman/listinfo/evolution-list.
 
     Lisätietoja Evolutionista löytyy osoitteesta
-	http://www.gnome.org/projects/evolution.
+	http://projects.gnome.org/evolution.
 
 
 Evolution-tiimi,
@@ -161,8 +161,8 @@
     </p>
     <p>
     Lisätietoja Evolutionista löytyy osoitteesta
-	<a href="http://www.gnome.org/projects/evolution";
-            >http://www.gnome.org/projects/evolution</a>.
+	<a href="http://projects.gnome.org/evolution";
+            >http://projects.gnome.org/evolution</a>.
     </p>
 </blockquote>
 
diff -Nru evolution-2.30.2/mail/default/fr/Inbox evolution-2.30.3/mail/default/fr/Inbox
--- evolution-2.30.2/mail/default/fr/Inbox	2010-03-18 15:14:01.000000000 +0100
+++ evolution-2.30.3/mail/default/fr/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -57,7 +57,7 @@
         utilisateurs d'Evolution à
         http://mail.gnome.org/mailman/listinfo/evolution-list. Des
         informations sur le projet Evolution sont disponibles à
-        http://www.gnome.org/projects/evolution.
+        http://projects.gnome.org/evolution.
 
 
 Cordialement,
@@ -110,7 +110,7 @@
 
 <H2>Informations suppl&#233;mentaires</H2>
 <BLOCKQUOTE>
-    Vous pouvez vous inscrire &#224; la liste de diffusion anglophone des utilisateurs d'Evolution &#224; <A HREF="http://mail.gnome.org/mailman/listinfo/evolution-list";>http://mail.gnome.org/mailman/listinfo/evolution-list</A>. Des informations sur le projet Evolution sont disponibles &#224; <A HREF="http://www.gnome.org/projects/evolution";>http://www.gnome.org/projects/evolution</A>.
+    Vous pouvez vous inscrire &#224; la liste de diffusion anglophone des utilisateurs d'Evolution &#224; <A HREF="http://mail.gnome.org/mailman/listinfo/evolution-list";>http://mail.gnome.org/mailman/listinfo/evolution-list</A>. Des informations sur le projet Evolution sont disponibles &#224; <A HREF="http://projects.gnome.org/evolution";>http://projects.gnome.org/evolution</A>.
 <BR><BR>
 </BLOCKQUOTE>
 
diff -Nru evolution-2.30.2/mail/default/hu/Inbox evolution-2.30.3/mail/default/hu/Inbox
--- evolution-2.30.2/mail/default/hu/Inbox	2010-03-18 15:14:01.000000000 +0100
+++ evolution-2.30.3/mail/default/hu/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -57,7 +57,7 @@
 	http://mail.gnome.org/mailman/listinfo/evolution-list címen iratkozhat fel.
 
 	Az Evolution projekttel kapcsolatos információk a
-	http://www.gnome.org/projects/evolution címen érhetők el.
+	http://projects.gnome.org/evolution címen érhetők el.
 
 
 Tisztelettel,
@@ -133,13 +133,13 @@
 
 <blockquote>
 	Az Evolution felhasználók (angol nyelvű) levelezőlistájára a
-	<a href="http://lists.gnome.org/mailman/listinfo/evolution";>http://lists.gnome.org/mailman/listinfo/evolution</a> címen iratkozhat fel.
+	<a href="http://lists.gnome.org/mailman/listinfo/evolution-list";>http://lists.gnome.org/mailman/listinfo/evolution-list</a> címen iratkozhat fel.
 
 	Az Evolution projekttel kapcsolatos információk a
-	<a href="http://www.gnome.org/projects/evolution";>http://www.gnome.org/projects/evolution</a> címen érhetők el.
+	<a href="http://projects.gnome.org/evolution";>http://projects.gnome.org/evolution</a> címen érhetők el.
 	<!--
 	A gyakran feltett kérdésekre adott válaszok a 
-	<a href="http://go-evolution.org/FAQ";>http://go-evolution.org/FAQ</a> oldalon találhatók.
+	<a href="http://live.gnome.org/Evolution/FAQ";>http://live.gnome.org/Evolution/FAQ</a> oldalon találhatók.
 	-->
 <br><br>	
 </blockquote>
diff -Nru evolution-2.30.2/mail/default/it/Inbox evolution-2.30.3/mail/default/it/Inbox
--- evolution-2.30.2/mail/default/it/Inbox	2010-03-27 21:42:17.000000000 +0100
+++ evolution-2.30.3/mail/default/it/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -64,7 +64,7 @@
 	http://mail.gnome.org/mailman/listinfo/evolution-list.
 
 	Altre informazioni sul progetto Evolution sono disponibili
-	 presso http://www.gnome.org/projects/evolution. 
+	 presso http://projects.gnome.org/evolution. 
 	
 
 Sinceramente Vostro,
@@ -144,13 +144,13 @@
 <blockquote>
 	È possibile effettuare la sottoscrizione alla mailing list
 	degli utenti di Evolution (in inglese) presso
-	<a href="http://lists.gnome.org/mailman/listinfo/evolution";>http://lists.gnome.org/mailman/listinfo/evolution</a>.
+	<a href="http://lists.gnome.org/mailman/listinfo/evolution-list";>http://lists.gnome.org/mailman/listinfo/evolution-list</a>.
 
 	Altre informazioni sul progetto Evolution sono disponibili
-	<a href="http://www.gnome.org/projects/evolution";>http://www.gnome.org/projects/evolution</a>.
+	<a href="http://projects.gnome.org/evolution";>http://projects.gnome.org/evolution</a>.
 	<!--
 	You can find a list of answers to Frequently Asked Questions (FAQ) at
-	<a href="http://go-evolution.org/FAQ";>http://go-evolution.org/FAQ</a>.
+	<a href="http://live.gnome.org/Evolution/FAQ";>http://live.gnome.org/Evolution/FAQ</a>.
 	-->
 <br><br>	
 </blockquote>
diff -Nru evolution-2.30.2/mail/default/ja/Inbox evolution-2.30.3/mail/default/ja/Inbox
--- evolution-2.30.2/mail/default/ja/Inbox	2010-03-18 15:14:01.000000000 +0100
+++ evolution-2.30.3/mail/default/ja/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -1,16 +1,16 @@
-From evolution@ximian.com Tue Sep 25 07:45:12 2001
-Return-Path: <evolution@ximian.com>
-Received: from pop.ximian.com (IDENT:mail@localhost [127.0.0.1]) by
-	pop.ximian.com (8.9.3/8.9.3) with ESMTP id HAA20680; Tue, 25 Sep 2001
+From evolution@novell.com Tue Sep 25 07:45:12 2001
+Return-Path: <evolution@novell.com>
+Received: from pop.novell.com (IDENT:mail@localhost [127.0.0.1]) by
+	pop.novell.com (8.9.3/8.9.3) with ESMTP id HAA20680; Tue, 25 Sep 2001
 	07:45:12 -0400
-Received: from smtp.ximian.com (smtp.ximian.com [141.154.95.10]) by
-	pop.ximian.com (8.9.3/8.9.3) with ESMTP id HAA20659 for
-	<evolution@ximian.com>; Tue, 25 Sep 2001 07:45:10 -0400
+Received: from smtp.novell.com (smtp.novell.com [141.154.95.10]) by
+	pop.novell.com (8.9.3/8.9.3) with ESMTP id HAA20659 for
+	<evolution@novell.com>; Tue, 25 Sep 2001 07:45:10 -0400
 Received: (qmail 5610 invoked from network); 25 Sep 2001 11:45:02 -0000
-Received: from smtp.ximian.com (HELO localhost) (141.154.95.10) by
-	pop.ximian.com with SMTP; 25 Sep 2001 11:45:02 -0000
-From: "The Evolution Team" <evolution@ximian.com>
-To: Evolution Users <evolution@ximian.com>
+Received: from smtp.novell.com (HELO localhost) (141.154.95.10) by
+	pop.novell.com with SMTP; 25 Sep 2001 11:45:02 -0000
+From: "The Evolution Team" <evolution@novell.com>
+To: Evolution Users <evolution@novell.com>
 Content-Type: multipart/related; type="multipart/alternative"; boundary="=-t4dRE6cqcdSBHOrMdTQ1"
 X-Mailer: Evolution/1.1.99 (Preview Release)
 Date: 25 June 2002 14:45:00 +0300
@@ -19,11 +19,11 @@
 Content-Type: Text/Plain; charset=iso-2022-jp
 Content-Transfer-Encoding: 7bit
 Subject: Evolution =?ISO-2022-JP?B?GyRCJFgkaCQmJDMkPRsoQiE=?=
-Sender: evolution@ximian.com
-Errors-To: evolution@ximian.com
+Sender: evolution@novell.com
+Errors-To: evolution@novell.com
 X-Mailman-Version: 1.1
 Status:   
-X-Evolution-Source: pop://rupert@pop.ximian.com/inbox
+X-Evolution-Source: pop://rupert@pop.novell.com/inbox
 X-Evolution: 00000ddd-0030
 
 
@@ -63,16 +63,16 @@
 
 $BIT6q9g$NJs9p(B
 
-        $BIT6q9g$O(B http://bugzilla.ximian.com $B$^$G8fJs9p2<$5$$!#(B
+        $BIT6q9g$O(B http://bugzilla.gnome.org $B$^$G8fJs9p2<$5$$!#(B
 
 $B$b$C$H>\$7$/(B
 
 	Evolution $B%f!<%6!<8~$1%a!<%j%s%0%j%9%H$K;22C$9$k$3$H$,(B
 	$B$G$-$^$9(B:
-	http://lists.ximian.com/mailman/listinfo/evolution
+	http://lists.gnome.org/mailman/listinfo/evolution-list
 
 	Evolution $B%W%m%8%'%/%H$N>pJs$K$D$$$F$O(B
-        http://www.gnome.org/projects/evolution $B$X!#(B
+        http://projects.gnome.org/evolution $B$X!#(B
 
 
 $B7I6q!"(B
@@ -171,7 +171,7 @@
 
 <h2>不具合の報告</h2>
 <blockquote>
-        不具合は <a href="http://bugzilla.ximian.com";>http://bugzilla.ximian.com</a> まで御報告下さい。
+        不具合は <a href="http://bugzilla.gnome.og";>http://bugzilla.gnome.org</a> まで御報告下さい。
 </blockquote> 
 
 <h2>もっと詳しく</h2>
@@ -179,16 +179,16 @@
 <blockquote>
 	Evolution ユーザー向けメーリングリストに参加することが
 	できます:
-	<a href="http://lists.ximian.com/mailman/listinfo/evolution";>http://lists.ximian.com/mailman/listinfo/evolution</a>.
+	<a href="http://lists.gnome.org/mailman/listinfo/evolution-list";>http://lists.gnome.org/mailman/listinfo/evolution-list</a>.
 
 	Evolution プロジェクトの情報については
-	<a href="http://www.gnome.org/projects/evolution";>http://www.gnome.org/projects/evolution</a> へ。
+	<a href="http://projects.gnome.org/evolution";>http://projects.gnome.org/evolution</a> へ。
  </blockquote>
 
 
 敬具、<br>
 Evolution 開発チーム<br>
-<a href="mailto:evolution@ximian.com";>evolution@ximian.com</a>
+<a href="mailto:evolution@novell.com";>evolution@novell.com</a>
 
 </BODY>
 </HTML>
diff -Nru evolution-2.30.2/mail/default/ko/Inbox evolution-2.30.3/mail/default/ko/Inbox
--- evolution-2.30.2/mail/default/ko/Inbox	2010-03-18 15:14:01.000000000 +0100
+++ evolution-2.30.3/mail/default/ko/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -54,10 +54,10 @@
 
 기타 정보
 
-	http://lists.gnome.org/mailman/listinfo/evolution 페이지에서
+	http://lists.gnome.org/mailman/listinfo/evolution-list 페이지에서
 	에볼루션 사용자 메일링 리스트에 가입할 수 있습니다.
 
-	http://www.gnome.org/projects/evolution 사이트에 에볼루션
+	http://projects.gnome.org/evolution 사이트에 에볼루션
 	프로젝트에 대한 정보가 있습니다.
 
 에볼루션 팀 드림.
@@ -130,14 +130,14 @@
 </h2>
 
 <blockquote>
-	<a href="http://lists.gnome.org/mailman/listinfo/evolution";>http://lists.gnome.org/mailman/listinfo/evolution</a> 페이지에서
+	<a href="http://lists.gnome.org/mailman/listinfo/evolution-list";>http://lists.gnome.org/mailman/listinfo/evolution-list</a> 페이지에서
 	에볼루션 사용자 메일링 리스트에 가입할 수 있습니다.
 
-	<a href="http://www.gnome.org/projects/evolution";>http://www.gnome.org/projects/evolution</a> 사이트에 에볼루션
+	<a href="http://projects.gnome.org/evolution";>http://projects.gnome.org/evolution</a> 사이트에 에볼루션
 	프로젝트에 대한 정보가 있습니다.
 	<!--
 	You can find a list of answers to Frequently Asked Questions (FAQ) at
-	<a href="http://go-evolution.org/FAQ";>http://go-evolution.org/FAQ</a>.
+	<a href="http://live.gnome.org/Evolution/FAQ";>http://live.gnome.org/Evolution/FAQ</a>.
 	-->
 <br><br>	
 </blockquote>
diff -Nru evolution-2.30.2/mail/default/lt/Inbox evolution-2.30.3/mail/default/lt/Inbox
--- evolution-2.30.2/mail/default/lt/Inbox	2010-03-18 15:14:01.000000000 +0100
+++ evolution-2.30.3/mail/default/lt/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -67,7 +67,7 @@
 	http://mail.gnome.org/mailman/listinfo/evolution-list.
 
 	Informaciją apie Evolution projektą galite rasti
-	http://www.gnome.org/projects/evolution.
+	http://projects.gnome.org/evolution.
 
 
 Pagarbiai,
@@ -165,13 +165,13 @@
 
 <blockquote>
 	Evolution naudotojų pašto konferenciją galite užsisakyti adresu
-	<a href="http://lists.gnome.org/mailman/listinfo/evolution";>http://lists.gnome.org/mailman/listinfo/evolution</a>.
+	<a href="http://lists.gnome.org/mailman/listinfo/evolution-list";>http://lists.gnome.org/mailman/listinfo/evolution-list</a>.
 
 	Informaciją apie Evolution projektą galite rasti adresu
-	<a href="http://www.gnome.org/projects/evolution";>http://www.gnome.org/projects/evolution</a>.
+	<a href="http://projects.gnome.org/evolution";>http://projects.gnome.org/evolution</a>.
 	<!--
 	Atsakymus į dažniausiai užduodamus klausimus galite rasti adresu
-	<a href="http://go-evolution.org/FAQ";>http://go-evolution.org/FAQ</a>.
+	<a href="http://live.gnome.org/Evolution/FAQ";>http://live.gnome.org/Evolution/FAQ</a>.
 	-->
 <br><br>
 </blockquote>
diff -Nru evolution-2.30.2/mail/default/mk/Inbox evolution-2.30.3/mail/default/mk/Inbox
--- evolution-2.30.2/mail/default/mk/Inbox	2010-03-18 15:14:01.000000000 +0100
+++ evolution-2.30.3/mail/default/mk/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -75,7 +75,7 @@
 	http://mail.gnome.org/mailman/listinfo/evolution-list.
 
 	Повеќе информации за проектот Еволушн можете да најдете на
-	http://www.gnome.org/projects/evolution.
+	http://projects.gnome.org/evolution.
 
 
 Искрено Ваши,
@@ -192,13 +192,13 @@
 <blockquote>
 	Можете да се зачлените на поштенската листа на корисници на Еволушн
 	<a
-	href="http://lists.gnome.org/mailman/listinfo/evolution";>http://lists.gnome.org/mailman/listinfo/evolution</a>.
+	href="http://lists.gnome.org/mailman/listinfo/evolution-list";>http://lists.gnome.org/mailman/listinfo/evolution-list</a>.
 
 	Повеќе информации за проектот Еволушн можете да најдете на
-	<a href="http://www.gnome.org/projects/evolution";>http://www.gnome.org/projects/evolution</a>.
+	<a href="http://projects.gnome.org/evolution";>http://projects.gnome.org/evolution</a>.
 	<!--
 	Можете да најдете листа на често поставувани прашања (ЧПП) на
-	<a href="http://go-evolution.org/FAQ";>http://go-evolution.org/FAQ</a>.
+	<a href="http://live.gnome.org/Evolution/FAQ";>http://live.gnome.org/Evolution/FAQ</a>.
 	-->
 <br><br>	
 </blockquote>
diff -Nru evolution-2.30.2/mail/default/nl/Inbox evolution-2.30.3/mail/default/nl/Inbox
--- evolution-2.30.2/mail/default/nl/Inbox	2010-03-18 15:14:01.000000000 +0100
+++ evolution-2.30.3/mail/default/nl/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -57,9 +57,9 @@
 	U kunt kunt u abonneren op de (engelstalige) gebruikerslijst van 
 	Evolution op http://mail.gnome.org/mailman/listinfo/evolution-list.
 	Informatie over het Evolution project is beschikbaar op 
-	http://www.gnome.org/projects/evolution.
+	http://projects.gnome.org/evolution.
 	U kunt een lijst met (Engelstalige) antwoorden op veelgestelde
-	vragen vinden (FAQ) op http://go-evolution.org/FAQ
+	vragen vinden (FAQ) op http://live.gnome.org/Evolution/FAQ
 
 
 Hoogachtend,
@@ -136,14 +136,14 @@
 
 <blockquote>
 	U kunt kunt u abonneren op de (Engelstalige) gebruikerslijst van 
-	Evolution op <a href="http://lists.gnome.org/mailman/listinfo/evolution";>http://lists.gnome.org/mailman/listinfo/evolution</a>.
+	Evolution op <a href="http://lists.gnome.org/mailman/listinfo/evolution-list";>http://lists.gnome.org/mailman/listinfo/evolution-list</a>.
 
 	Informatie over het Evolution project is beschikbaar op
-	<a href="http://www.gnome.org/projects/evolution";>http://www.gnome.org/projects/evolution</a>.
+	<a href="http://projects.gnome.org/evolution";>http://projects.gnome.org/evolution</a>.
 	<!--
 	U kunt een lijst met (Engelstalige) antwoorden op veelgestelde
 	vragen vinden (FAQ) op
-	<a href="http://go-evolution.org/FAQ";>http://go-evolution.org/FAQ</a>.
+	<a href="http://live.gnome.org/Evolution/FAQ";>http://live.gnome.org/Evolution/FAQ</a>.
 	-->
 <br><br>	
 </blockquote>
diff -Nru evolution-2.30.2/mail/default/pl/Inbox evolution-2.30.3/mail/default/pl/Inbox
--- evolution-2.30.2/mail/default/pl/Inbox	2010-03-18 15:14:01.000000000 +0100
+++ evolution-2.30.3/mail/default/pl/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -59,7 +59,7 @@
 	(w języku angielskim).
 
 	Informacje na temat projektu Evolution można znaleźć pod adresem
-	http://www.gnome.org/projects/evolution.
+	http://projects.gnome.org/evolution.
 
 
 Z poważaniem,
@@ -132,14 +132,14 @@
 
 <blockquote>
 	Pod adresem
-	<a href="http://lists.gnome.org/mailman/listinfo/evolution";>http://lists.gnome.org/mailman/listinfo/evolution</a>.
+	<a href="http://lists.gnome.org/mailman/listinfo/evolution-list";>http://lists.gnome.org/mailman/listinfo/evolution-list</a>.
 	można zapisać się na listę pocztową użytkowników Evolution (w języku angielskim).
 
 	Informacje na temat projektu Evolution można znaleźć pod adresem
-	<a href="http://www.gnome.org/projects/evolution";>http://www.gnome.org/projects/evolution</a>.
+	<a href="http://projects.gnome.org/evolution";>http://projects.gnome.org/evolution</a>.
 	<!--
 	You can find a list of answers to Frequently Asked Questions (FAQ) at
-	<a href="http://go-evolution.org/FAQ";>http://go-evolution.org/FAQ</a>.
+	<a href="http://live.gnome.org/Evolution/FAQ";>http://live.gnome.org/Evolution/FAQ</a>.
 	-->
 <br><br>	
 </blockquote>
diff -Nru evolution-2.30.2/mail/default/pt/Inbox evolution-2.30.3/mail/default/pt/Inbox
--- evolution-2.30.2/mail/default/pt/Inbox	2010-03-18 15:14:01.000000000 +0100
+++ evolution-2.30.3/mail/default/pt/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -70,7 +70,7 @@
 	http://mail.gnome.org/mailman/listinfo/evolution-list.
 
 	Informação sobreo o projecto Evolution encontra-se disponível em
-	http://www.gnome.org/projects/evolution.
+	http://projects.gnome.org/evolution.
 
 
 Com os nossos melhores cumprimentos,
@@ -175,10 +175,10 @@
 
 <blockquote>
 	Poderá subscrever a lista de distribuição de utilizadores do Evolution em
-	<a href="http://lists.gnome.org/mailman/listinfo/evolution";>http://lists.gnome.org/mailman/listinfo/evolution</a>.
+	<a href="http://lists.gnome.org/mailman/listinfo/evolution-list";>http://lists.gnome.org/mailman/listinfo/evolution-list</a>.
 
 	Informação sobreo o projecto Evolution encontra-se disponível em
-	<a href="http://www.gnome.org/projects/evolution";>http://www.gnome.org/projects/evolution</a>.
+	<a href="http://projects.gnome.org/evolution";>http://projects.gnome.org/evolution</a>.
 <br><br>	
 </blockquote>
 
diff -Nru evolution-2.30.2/mail/default/ro/Inbox evolution-2.30.3/mail/default/ro/Inbox
--- evolution-2.30.2/mail/default/ro/Inbox	2010-03-18 15:14:01.000000000 +0100
+++ evolution-2.30.3/mail/default/ro/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -57,7 +57,7 @@
 	de la adresa http://mail.gnome.org/mailman/listinfo/evolution-list.
 
 	Informațiile despre proiectul Evolution sunt disponibile la
-	http://www.gnome.org/projects/evolution.
+	http://projects.gnome.org/evolution.
 
 
 Cu stimă,
@@ -132,10 +132,10 @@
 
 <blockquote>
 	Vă puteți abona la lista de discuții a utilizatorilor Evolution
-	de la adresa <a href="http://lists.gnome.org/mailman/listinfo/evolution";>http://mail.gnome.org/mailman/listinfo/evolution-list</a>.
+	de la adresa <a href="http://lists.gnome.org/mailman/listinfo/evolution-list";>http://mail.gnome.org/mailman/listinfo/evolution-list</a>.
 
 	Informațiile despre proiectul Evolution sunt disponibile la
-	<a href="http://www.gnome.org/projects/evolution";>http://www.gnome.org/projects/evolution</a>.
+	<a href="http://projects.gnome.org/evolution";>http://projects.gnome.org/evolution</a>.
 
 <br><br>	
 </blockquote>
diff -Nru evolution-2.30.2/mail/default/sr/Inbox evolution-2.30.3/mail/default/sr/Inbox
--- evolution-2.30.2/mail/default/sr/Inbox	2010-03-18 15:14:01.000000000 +0100
+++ evolution-2.30.3/mail/default/sr/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -61,7 +61,7 @@
     http://mail.gnome.org/mailman/listinfo/evolution-list.
 
     Више о пројекту Еволуције (енгл.) пронађите на
-    http://www.gnome.org/projects/evolution.
+    http://projects.gnome.org/evolution.
 
 
 С поштовањем,
@@ -137,13 +137,13 @@
 
 <blockquote>
 	Можете се пријавити на дописну листу корисника Еволуције (енгл.) на
-	<a href="http://lists.gnome.org/mailman/listinfo/evolution";>http://lists.gnome.org/mailman/listinfo/evolution</a>.
+	<a href="http://lists.gnome.org/mailman/listinfo/evolution-list";>http://lists.gnome.org/mailman/listinfo/evolution-list</a>.
 
 	Више о пројекту Еволуције (енгл.) пронађите на
-	<a href="http://www.gnome.org/projects/evolution";>http://www.gnome.org/projects/evolution</a>.
+	<a href="http://projects.gnome.org/evolution";>http://projects.gnome.org/evolution</a>.
 	<!--
 	You can find a list of answers to Frequently Asked Questions (FAQ) at
-	<a href="http://go-evolution.org/FAQ";>http://go-evolution.org/FAQ</a>.
+	<a href="http://live.gnome.org/Evolution/FAQ";>http://live.gnome.org/Evolution/FAQ</a>.
 	-->
 <br><br>	
 </blockquote>
diff -Nru evolution-2.30.2/mail/default/sr@latin/Inbox evolution-2.30.3/mail/default/sr@latin/Inbox
--- evolution-2.30.2/mail/default/sr@latin/Inbox	2010-03-18 15:14:01.000000000 +0100
+++ evolution-2.30.3/mail/default/sr@latin/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -58,7 +58,7 @@
     http://mail.gnome.org/mailman/listinfo/evolution-list.
 
     Više o projektu Evolucije (engl.) pronađite na
-    http://www.gnome.org/projects/evolution.
+    http://projects.gnome.org/evolution.
 
 
 S poštovanjem,
@@ -134,13 +134,13 @@
 
 <blockquote>
 	Možete se prijaviti na dopisnu listu korisnika Evolucije (engl.) na
-	<a href="http://lists.gnome.org/mailman/listinfo/evolution";>http://lists.gnome.org/mailman/listinfo/evolution</a>.
+	<a href="http://lists.gnome.org/mailman/listinfo/evolution-list";>http://lists.gnome.org/mailman/listinfo/evolution-list</a>.
 
 	Više o projektu Evolucije (engl.) pronađite na
-	<a href="http://www.gnome.org/projects/evolution";>http://www.gnome.org/projects/evolution</a>.
+	<a href="http://projects.gnome.org/evolution";>http://projects.gnome.org/evolution</a>.
 	<!--
 	You can find a list of answers to Frequently Asked Questions (FAQ) at
-	<a href="http://go-evolution.org/FAQ";>http://go-evolution.org/FAQ</a>.
+	<a href="http://live.gnome.org/Evolution/FAQ";>http://live.gnome.org/Evolution/FAQ</a>.
 	-->
 <br><br>	
 </blockquote>
diff -Nru evolution-2.30.2/mail/default/sv/Inbox evolution-2.30.3/mail/default/sv/Inbox
--- evolution-2.30.2/mail/default/sv/Inbox	2010-03-18 15:14:01.000000000 +0100
+++ evolution-2.30.3/mail/default/sv/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -54,10 +54,10 @@
 Mer information
 
 	Du kan prenumerera på sändlistan Evolution users på 
-	http://lists.gnome.org/mailman/listinfo/evolution.
+	http://lists.gnome.org/mailman/listinfo/evolution-list.
 	
 	Information om Evolution-projektet finns tillgängligt på 
-	http://www.gnome.org/projects/evolution. 
+	http://projects.gnome.org/evolution. 
 
 
 Med vänliga hälsningar, 
@@ -130,13 +130,13 @@
 </h2>
 
 <blockquote>
-	Du kan prenumerera på sändlistan Evolution users på <a href="http://lists.gnome.org/mailman/listinfo/evolution";>http://lists.gnome.org/mailman/listinfo/evolution</a>.
+	Du kan prenumerera på sändlistan Evolution users på <a href="http://lists.gnome.org/mailman/listinfo/evolution-list";>http://lists.gnome.org/mailman/listinfo/evolution-list</a>.
 
-	Information om Evolution-projektet finns tillgängligt på <a href="http://www.gnome.org/projects/evolution";>http://www.gnome.org/projects/evolution</a>.
+	Information om Evolution-projektet finns tillgängligt på <a href="http://projects.gnome.org/evolution";>http://projects.gnome.org/evolution</a>.
 
 	<!--
 	Du kan hitta en lista med frågor och svar (FAQ) på
-	<a href="http://go-evolution.org/FAQ";>http://go-evolution.org/FAQ</a>.
+	<a href="http://live.gnome.org/Evolution/FAQ";>http://live.gnome.org/Evolution/FAQ</a>.
 	-->
 <br><br>	
 </blockquote>
diff -Nru evolution-2.30.2/mail/default/zh_CN/Inbox evolution-2.30.3/mail/default/zh_CN/Inbox
--- evolution-2.30.2/mail/default/zh_CN/Inbox	2010-03-18 15:14:01.000000000 +0100
+++ evolution-2.30.3/mail/default/zh_CN/Inbox	2010-08-05 12:31:25.000000000 +0200
@@ -1,27 +1,27 @@
-From evolution@ximian.com Tue Sep 25 07:45:12 2001
-Return-Path: <evolution@ximian.com>
-Received: from pop.ximian.com (IDENT:mail@localhost [127.0.0.1]) by
-	pop.ximian.com (8.9.3/8.9.3) with ESMTP id HAA20680; Tue, 25 Sep 2001
+From evolution@novell.com Tue Sep 25 07:45:12 2001
+Return-Path: <evolution@novell.com>
+Received: from pop.novell.com (IDENT:mail@localhost [127.0.0.1]) by
+	pop.novell.com (8.9.3/8.9.3) with ESMTP id HAA20680; Tue, 25 Sep 2001
 	07:45:12 -0400
-Received: from smtp.ximian.com (smtp.ximian.com [141.154.95.10]) by
-	pop.ximian.com (8.9.3/8.9.3) with ESMTP id HAA20659 for
-	<evolution@ximian.com>; Tue, 25 Sep 2001 07:45:10 -0400
+Received: from smtp.novell.com (smtp.novell.com [141.154.95.10]) by
+	pop.novell.com (8.9.3/8.9.3) with ESMTP id HAA20659 for
+	<evolution@novell.com>; Tue, 25 Sep 2001 07:45:10 -0400
 Received: (qmail 5610 invoked from network); 25 Sep 2001 11:45:02 -0000
-Received: from smtp.ximian.com (HELO localhost) (141.154.95.10) by
-	pop.ximian.com with SMTP; 25 Sep 2001 11:45:02 -0000
-From: =?UTF-8?B?IkV2b2x1dGlvbiDlm6LpmJ8i?= <evolution@ximian.com>
-To: Evolution =?UTF-8?B?55So5oi3?= <evolution@ximian.com>
+Received: from smtp.novell.com (HELO localhost) (141.154.95.10) by
+	pop.novell.com with SMTP; 25 Sep 2001 11:45:02 -0000
+From: =?UTF-8?B?IkV2b2x1dGlvbiDlm6LpmJ8i?= <evolution@novell.com>
+To: Evolution =?UTF-8?B?55So5oi3?= <evolution@novell.com>
 Content-Type: multipart/related; type="multipart/alternative"; boundary="=-t4dRE6cqcdSBHOrMdTQ1"
 X-Mailer: Evolution/1.1.99 (Preview Release)
 Date: 25 June 2002 14:45:00 +0300
 Message-ID: <1001418302.27070.20.camel@spectrolite>
 Mime-Version: 1.0
 Subject: =?UTF-8?B?5qyi6L+O5L2/55So?= Evolution!
-Sender: evolution@ximian.com
-Errors-To: evolution@ximian.com
+Sender: evolution@novell.com
+Errors-To: evolution@novell.com
 X-Mailman-Version: 1.1
 Status:   
-X-Evolution-Source: pop://rupert@pop.ximian.com/inbox
+X-Evolution-Source: pop://rupert@pop.novell.com/inbox
 X-Evolution: 00000ddd-0030
 
 
@@ -55,21 +55,21 @@
 
 错误报告
 
-	错误应该报告至 http://bugzilla.ximian.com
+	错误应该报告至 http://bugzilla.gnome.org
 
 更多信息
 
 	您可以订阅下面的 Evolution 用户邮件列表(英语)
-	http://lists.ximian.com/mailman/listinfo/evolution 。
+	http://lists.gnome.org/mailman/listinfo/evolution-list 。
 
 	关于 Evolution 项目的信息可在这里找到
-	http://www.gnome.org/projects/evolution 。
+	http://projects.gnome.org/evolution 。
 
 
     此致
 敬礼
 Evolution 团队
-evolution@ximian.com
+evolution@novell.com
 
 
 --=-2gZ1roA/HoYrlRDVGyiM
@@ -141,18 +141,18 @@
 <blockquote>Evolution 2.0 支持连接到 Novell GroupWise 服务器(6.5.3 或更新版本),还可支持 Exchange 2000/2003。Evolution 2.0 的其它新特性包括垃圾邮件过滤、S/MIME 安全、改进的脱机 IMAP、NNTP(新闻)支持、Web 日历显示,层叠的日历,以及为访问联系人、日历和任务数据所提供的全新开发接口。</blockquote>
 
 <h2>错误报告</h2>
-<blockquote>错误应该报告至 <a href="http://bugzilla.ximian.com";>http://bugzilla.ximian.com</a>
+<blockquote>错误应该报告至 <a href="http://bugzilla.gnome.org";>http://bugzilla.gnome.org</a>
 </blockquote>
 
 <h2>更多信息</h2>
 
-<blockquote>您可以订阅下面的 Evolution 用户邮件列表(英语) <a href="http://lists.ximian.com/mailman/listinfo/evolution";>http://lists.ximian.com/mailman/listinfo/evolution</a>。关于 Evolution 项目的信息可在 <a href="http://www.gnome.org/projects/evolution";>http://www.gnome.org/projects/evolution</a> 找到。</blockquote>
+<blockquote>您可以订阅下面的 Evolution 用户邮件列表(英语) <a href="http://lists.gnome.org/mailman/listinfo/evolution-list";>http://lists.gnome.org/mailman/listinfo/evolution-list</a>。关于 Evolution 项目的信息可在 <a href="http://projects.gnome.org/evolution";>http://projects.gnome.org/evolution</a> 找到。</blockquote>
 
 
   此致<br/>
 敬礼<br>
 Evolution 团队<br>
-<a href="mailto:evolution@ximian.com";>evolution@ximian.com</a>
+<a href="mailto:evolution@novell.com";>evolution@novell.com</a>
 
 </BODY>
 </HTML>
diff -Nru evolution-2.30.2/mail/em-account-editor.c evolution-2.30.3/mail/em-account-editor.c
--- evolution-2.30.2/mail/em-account-editor.c	2010-06-20 14:15:02.000000000 +0200
+++ evolution-2.30.3/mail/em-account-editor.c	2010-07-10 15:41:29.000000000 +0200
@@ -2044,14 +2044,14 @@
 }
 
 static GtkWidget *
-emae_create_basic_assistant_page (EMAccountEditor *emae, GtkAssistant *assistant,
-				  const gchar *page_id, GtkWidget *old)
+emae_create_basic_assistant_page (EMAccountEditor *emae,
+                                  GtkAssistant *assistant,
+                                  const gchar *page_id)
 {
 	const gchar *title = NULL, *label = NULL;
 	GtkAssistantPageType page_type = GTK_ASSISTANT_PAGE_CONTENT;
 	GtkWidget *vbox, *lbl;
 	gboolean fill_space = FALSE;
-	gint index = -1;
 
 	g_return_val_if_fail (page_id != NULL, NULL);
 
@@ -2094,17 +2094,7 @@
 	if (g_ascii_strcasecmp (page_id, "start_page") == 0)
 		g_hash_table_insert (emae->priv->widgets, (gchar *)"start_page_label", lbl);
 
-	if (old) {
-		/* keep page on its previous index */
-		gint i, sz = gtk_assistant_get_n_pages (assistant);
-
-		for (i = 0; i < sz && index == -1; i++) {
-			if (gtk_assistant_get_nth_page (assistant, i) == old)
-				index = i;
-		}
-	}
-
-	gtk_assistant_insert_page (assistant, vbox, index);
+	gtk_assistant_append_page (assistant, vbox);
 	gtk_assistant_set_page_title (assistant, vbox, title);
 	gtk_assistant_set_page_type (assistant, vbox, page_type);
 
@@ -2146,8 +2136,8 @@
 	GtkWidget *w;
 	GtkBuilder *builder;
 
-	/*if (old)
-	  return old;*/
+	if (old && emae->type == EMAE_PAGES)
+	  return old;
 
 	account = em_account_editor_get_modified_account (emae);
 
@@ -2186,7 +2176,7 @@
 	if (emae->type == EMAE_PAGES) {
 		gtk_box_pack_start ((GtkBox *)emae->pages[0], w, TRUE, TRUE, 0);
 	} else if (((EConfig *)priv->config)->type == E_CONFIG_ASSISTANT) {
-		GtkWidget *page = emae_create_basic_assistant_page (emae, GTK_ASSISTANT (parent), "identity_page", old);
+		GtkWidget *page = emae_create_basic_assistant_page (emae, GTK_ASSISTANT (parent), "identity_page");
 
 		gtk_box_pack_start (GTK_BOX (page), w, TRUE, TRUE, 0);
 
@@ -2223,7 +2213,7 @@
 	if (emae->type == EMAE_PAGES) {
 		gtk_box_pack_start ((GtkBox *)emae->pages[1], w, TRUE, TRUE, 0);
 	} else if (((EConfig *)priv->config)->type == E_CONFIG_ASSISTANT) {
-		GtkWidget *page = emae_create_basic_assistant_page (emae, GTK_ASSISTANT (parent), "source_page", old);
+		GtkWidget *page = emae_create_basic_assistant_page (emae, GTK_ASSISTANT (parent), "source_page");
 
 		gtk_box_pack_start (GTK_BOX (page), w, TRUE, TRUE, 0);
 
@@ -2700,7 +2690,7 @@
 	if (emae->type == EMAE_PAGES) {
 		gtk_box_pack_start ((GtkBox *)emae->pages[3], w, TRUE, TRUE, 0);
 	} else if (((EConfig *)priv->config)->type == E_CONFIG_ASSISTANT) {
-		GtkWidget *page = emae_create_basic_assistant_page (emae, GTK_ASSISTANT (parent), "transport_page", old);
+		GtkWidget *page = emae_create_basic_assistant_page (emae, GTK_ASSISTANT (parent), "transport_page");
 
 		gtk_box_pack_start (GTK_BOX (page), w, TRUE, TRUE, 0);
 
@@ -2907,7 +2897,7 @@
 
 	w = priv->management_frame;
 	if (((EConfig *)priv->config)->type == E_CONFIG_ASSISTANT) {
-		GtkWidget *page = emae_create_basic_assistant_page (emae, GTK_ASSISTANT (parent), "management_page", old);
+		GtkWidget *page = emae_create_basic_assistant_page (emae, GTK_ASSISTANT (parent), "management_page");
 
 		gtk_widget_reparent (w, page);
 
@@ -2925,7 +2915,7 @@
 	if (emae->type == EMAE_PAGES)
 		return NULL;
 
-	return emae_create_basic_assistant_page (emae, GTK_ASSISTANT (parent), item->label, old);
+	return emae_create_basic_assistant_page (emae, GTK_ASSISTANT (parent), item->label);
 }
 
 /* plugin meta-data for "org.gnome.evolution.mail.config.accountAssistant" */
diff -Nru evolution-2.30.2/mail/e-mail-reader.c evolution-2.30.3/mail/e-mail-reader.c
--- evolution-2.30.2/mail/e-mail-reader.c	2010-06-20 14:15:05.000000000 +0200
+++ evolution-2.30.3/mail/e-mail-reader.c	2010-07-18 20:25:42.000000000 +0200
@@ -1436,7 +1436,7 @@
 	{ "mail-save-as",
 	  GTK_STOCK_SAVE_AS,
 	  N_("_Save as mbox..."),
-	  NULL,
+	  "<Control>s",
 	  N_("Save selected messages as an mbox file"),
 	  G_CALLBACK (action_mail_save_as_cb) },
 
diff -Nru evolution-2.30.2/mail/e-mail-reader-utils.c evolution-2.30.3/mail/e-mail-reader-utils.c
--- evolution-2.30.2/mail/e-mail-reader-utils.c	2010-06-20 14:15:04.000000000 +0200
+++ evolution-2.30.3/mail/e-mail-reader-utils.c	2010-07-18 19:42:22.000000000 +0200
@@ -354,7 +354,7 @@
 	EMFormatHTMLDisplay *html_display;
 	GtkWidget *message_list;
 	CamelMimeMessage *new_message;
-	CamelMimeMessage *src_message;
+	CamelMimeMessage *src_message = NULL;
 	CamelFolder *folder;
 	GtkHTML *html;
 	struct _camel_header_raw *header;
@@ -377,6 +377,13 @@
 	uid = MESSAGE_LIST (message_list)->cursor_uid;
 	g_return_if_fail (uid != NULL);
 
+	if (!gtk_widget_get_mapped (GTK_WIDGET(html)))
+		goto whole_message;
+
+	src_message = CAMEL_MIME_MESSAGE (((EMFormat *) html_display)->message);
+	if (src_message)
+		camel_object_ref(src_message);
+
 	if (!gtk_html_command (html, "is-selection-active"))
 		goto whole_message;
 
@@ -387,8 +394,6 @@
 	if (!html_contains_nonwhitespace (selection, length))
 		goto whole_message;
 
-	src_message =
-		CAMEL_MIME_MESSAGE (((EMFormat *) html_display)->message);
 	new_message = camel_mime_message_new ();
 
 	/* Filter out "content-*" headers. */
@@ -410,6 +415,7 @@
 		CAMEL_MIME_PART (new_message),
 		selection, length, "text/html");
 
+	camel_object_unref(src_message);
 	em_utils_reply_to_message (
 		folder, uid, new_message, reply_mode, NULL);
 
@@ -419,7 +425,7 @@
 
 whole_message:
 	em_utils_reply_to_message (
-		folder, uid, NULL, reply_mode, (EMFormat *) html_display);
+		folder, uid, src_message, reply_mode, (EMFormat *) html_display);
 }
 
 void
diff -Nru evolution-2.30.2/mail/em-composer-utils.c evolution-2.30.3/mail/em-composer-utils.c
--- evolution-2.30.2/mail/em-composer-utils.c	2010-06-20 14:15:01.000000000 +0200
+++ evolution-2.30.3/mail/em-composer-utils.c	2010-07-18 19:42:22.000000000 +0200
@@ -560,7 +560,7 @@
 };
 
 static void
-composer_set_no_change (EMsgComposer *composer, gboolean drop_undo, gboolean editor_changed)
+composer_set_no_change (EMsgComposer *composer)
 {
 	GtkhtmlEditor *editor;
 
@@ -568,11 +568,8 @@
 
 	editor = GTKHTML_EDITOR (composer);
 
-	if (drop_undo)
-		gtkhtml_editor_drop_undo (editor);
-
-	if (editor_changed)
-		gtkhtml_editor_set_changed (editor, FALSE);
+	gtkhtml_editor_drop_undo (editor);
+	gtkhtml_editor_set_changed (editor, FALSE);
 }
 
 static void
@@ -761,7 +758,7 @@
 	if (composer == NULL)
 		return;
 
-	composer_set_no_change (E_MSG_COMPOSER (composer), TRUE, TRUE);
+	composer_set_no_change (E_MSG_COMPOSER (composer));
 
 	gtk_widget_show (composer);
 }
@@ -781,7 +778,7 @@
 	if (composer == NULL)
 		return NULL;
 
-	composer_set_no_change (E_MSG_COMPOSER (composer), TRUE, TRUE);
+	composer_set_no_change (E_MSG_COMPOSER (composer));
 
 	return E_MSG_COMPOSER (composer);
 }
@@ -812,7 +809,7 @@
 	    && (account = mail_config_get_account_by_source_url(fromuri)))
 		e_composer_header_table_set_account_name (table, account->name);
 
-	composer_set_no_change (composer, TRUE, url == NULL);
+	composer_set_no_change (composer);
 
 	if (!e_msg_composer_get_lite ()) {
 		gtk_widget_show ((GtkWidget *) composer);
@@ -928,6 +925,7 @@
 		CamelMimePart *part = CAMEL_MIME_PART (content);
 		CamelContentType *type;
 		CamelStream *mem;
+		GByteArray *mem_bytes;
 		gchar *str;
 
 		content = camel_medium_get_content_object (CAMEL_MEDIUM (part));
@@ -943,10 +941,11 @@
 		if (!camel_content_type_is (type, "text", "*"))
 			return;
 
-		mem = camel_stream_mem_new ();
+		mem_bytes = g_byte_array_new ();
+		mem = camel_stream_mem_new_with_byte_array (mem_bytes);
 		camel_data_wrapper_decode_to_stream (content, mem);
 
-		str = g_strndup ((const gchar *)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len);
+		str = g_strndup ((const gchar *)mem_bytes->data, mem_bytes->len);
 		camel_object_unref (mem);
 
 		if (replace_variables (clues, message, &str)) {
@@ -992,7 +991,7 @@
 		emcs_set_drafts_info (emcs, drafts, uid);
 	}
 
-	composer_set_no_change (composer, TRUE, TRUE);
+	composer_set_no_change (composer);
 
 	if (!e_msg_composer_get_lite())
 		gtk_widget_show (GTK_WIDGET (composer));
@@ -1153,7 +1152,7 @@
 	if (uids)
 		setup_forward_attached_callbacks (composer, folder, uids);
 
-	composer_set_no_change (composer, TRUE, TRUE);
+	composer_set_no_change (composer);
 
 	if (!e_msg_composer_get_lite())
 		gtk_widget_show (GTK_WIDGET (composer));
@@ -1242,7 +1241,7 @@
 				}
 
 				emu_update_composers_security (composer, validity_found);
-				composer_set_no_change (composer, TRUE, TRUE);
+				composer_set_no_change (composer);
 				if (!e_msg_composer_get_lite())
 					gtk_widget_show (GTK_WIDGET (composer));
 			}
@@ -1421,7 +1420,7 @@
 
 	gtk_widget_show (GTK_WIDGET (composer));
 
-	composer_set_no_change (composer, TRUE, TRUE);
+	composer_set_no_change (composer);
 }
 
 static void
@@ -2195,9 +2194,12 @@
 {
 	struct _reply_data *rd = user_data;
 
-	if (message != NULL)
+	if (message != NULL) {
+		/* get_message_free() will also unref the message, so we need
+		   an extra ref for em_utils_reply_to_message() to drop. */
+		camel_object_ref(message);
 		em_utils_reply_to_message(folder, uid, message, rd->mode, rd->source);
-
+	}
 	if (rd->source)
 		g_object_unref(rd->source);
 	g_free(rd);
@@ -2218,7 +2220,7 @@
  *
  * If @message is non null, then it is used directly, @folder and @uid
  * may be supplied in order to update the message flags once it has
- * been replied to.
+ * been replied to. Note that @message will be unreferenced on completion.
  **/
 EMsgComposer *
 em_utils_reply_to_message(CamelFolder *folder, const gchar *uid, CamelMimeMessage *message, gint mode, EMFormat *source)
@@ -2281,10 +2283,11 @@
 
 	composer_set_body (composer, message, source);
 
+	camel_object_unref(message);
 	emcs = g_object_get_data (G_OBJECT (composer), "emcs");
 	emcs_set_folder_info (emcs, folder, uid, flags, flags);
 
-	composer_set_no_change (composer, TRUE, TRUE);
+	composer_set_no_change (composer);
 
 	if (!e_msg_composer_get_lite())
 		gtk_widget_show (GTK_WIDGET (composer));
diff -Nru evolution-2.30.2/mail/em-folder-tree.c evolution-2.30.3/mail/em-folder-tree.c
--- evolution-2.30.2/mail/em-folder-tree.c	2010-06-20 14:15:03.000000000 +0200
+++ evolution-2.30.3/mail/em-folder-tree.c	2010-06-23 03:36:46.000000000 +0200
@@ -1103,12 +1103,15 @@
              GtkTreeIter *iter)
 {
 	GtkTreeSelection *selection;
+	GtkTreePath *drag_dest_row;
 	GtkWidget *tree_view;
 	GIcon *icon;
 	guint unread;
 	guint old_unread;
 	gchar *icon_name;
-	gboolean row_selected, is_drafts = FALSE;
+	gboolean is_selected;
+	gboolean is_drafts = FALSE;
+	gboolean is_drag_dest = FALSE;
 
 	gtk_tree_model_get (
 		model, iter,
@@ -1121,14 +1124,37 @@
 	if (icon_name == NULL)
 		return;
 
-	icon = g_themed_icon_new (icon_name);
-
 	tree_view = gtk_tree_view_column_get_tree_view (column);
 	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
-	row_selected = gtk_tree_selection_iter_is_selected (selection, iter);
+	is_selected = gtk_tree_selection_iter_is_selected (selection, iter);
+
+	gtk_tree_view_get_drag_dest_row (
+		GTK_TREE_VIEW (tree_view), &drag_dest_row, NULL);
+	if (drag_dest_row != NULL) {
+		GtkTreePath *path;
+
+		path = gtk_tree_model_get_path (model, iter);
+		if (gtk_tree_path_compare (path, drag_dest_row) == 0)
+			is_drag_dest = TRUE;
+		gtk_tree_path_free (path);
+
+		gtk_tree_path_free (drag_dest_row);
+	}
+
+	if (g_strcmp0 (icon_name, "folder") == 0) {
+		if (is_selected) {
+			g_free (icon_name);
+			icon_name = g_strdup ("folder-open");
+		} else if (is_drag_dest) {
+			g_free (icon_name);
+			icon_name = g_strdup ("folder-drag-accept");
+		}
+	}
+
+	icon = g_themed_icon_new (icon_name);
 
 	/* Show an emblem if there's new mail. */
-	if (!row_selected && unread > old_unread && !is_drafts) {
+	if (!is_selected && unread > old_unread && !is_drafts) {
 		GIcon *temp_icon;
 		GEmblem *emblem;
 
@@ -1418,19 +1444,26 @@
 {
 	EMFolderTreePrivate *priv = folder_tree->priv;
 	GtkTreeSelection *selection;
+	GtkTreeView *tree_view;
+	GdkColormap *colormap;
+	GdkPixmap *pixmap;
 	GtkTreeModel *model;
 	GtkTreePath *path;
 	GtkTreeIter iter;
 
-	selection = gtk_tree_view_get_selection ((GtkTreeView *) widget);
+	tree_view = GTK_TREE_VIEW (widget);
+	selection = gtk_tree_view_get_selection (tree_view);
 	if (!gtk_tree_selection_get_selected (selection, &model, &iter))
 		return;
 
 	path = gtk_tree_model_get_path (model, &iter);
 	priv->drag_row = gtk_tree_row_reference_new (model, path);
-	gtk_tree_path_free (path);
 
-	/* FIXME: set a drag icon? */
+	pixmap = gtk_tree_view_create_row_drag_icon (tree_view, path);
+	colormap = gdk_drawable_get_colormap (pixmap);
+	gtk_drag_set_icon_pixmap (context, colormap, pixmap, NULL, 0, 0);
+
+	gtk_tree_path_free (path);
 }
 
 static void
@@ -1630,9 +1663,7 @@
 	g_object_unref(m->context);
 	camel_object_unref(m->store);
 	g_free(m->full_name);
-
-	g_free(m->selection->data);
-	g_free(m->selection);
+	gtk_selection_data_free (m->selection);
 }
 
 static MailMsgInfo folder_tree_drop_async_info = {
@@ -1702,10 +1733,7 @@
 	m->info = info;
 
 	/* need to copy, goes away once we exit */
-	m->selection = g_malloc0(sizeof(*m->selection));
-	m->selection->data = g_malloc(selection->length);
-	memcpy(m->selection->data, selection->data, selection->length);
-	m->selection->length = selection->length;
+	m->selection = gtk_selection_data_copy (selection);
 
 	tree_drag_data_action(m);
 }
@@ -1717,7 +1745,11 @@
 }
 
 static GdkAtom
-folder_tree_drop_target(EMFolderTree *folder_tree, GdkDragContext *context, GtkTreePath *path)
+folder_tree_drop_target (EMFolderTree *folder_tree,
+                         GdkDragContext *context,
+                         GtkTreePath *path,
+                         GdkDragAction *actions,
+                         GdkDragAction *suggested_action)
 {
 	EMFolderTreePrivate *p = folder_tree->priv;
 	gchar *full_name = NULL, *uri = NULL, *src_uri = NULL;
@@ -1736,6 +1768,10 @@
 	if (!gtk_tree_model_get_iter (model, &iter, path))
 		return GDK_NONE;
 
+	/* We may override these further down. */
+	*actions = context->actions;
+	*suggested_action = context->suggested_action;
+
 	gtk_tree_model_get (
 		model, &iter,
 		COL_BOOL_IS_STORE, &is_store,
@@ -1811,9 +1847,9 @@
 				/* allow only copy of the Inbox and other system folders */
 				GdkAtom xfolder;
 
-				/* TODO: not sure if this is legal, but it works, force copy for special local folders */
-				context->suggested_action = GDK_ACTION_COPY;
-				context->actions = GDK_ACTION_COPY;
+				/* force copy for special local folders */
+				*suggested_action = GDK_ACTION_COPY;
+				*actions = GDK_ACTION_COPY;
 				xfolder = drop_atoms[DND_DROP_TYPE_FOLDER];
 				while (targets != NULL) {
 					if (targets->data == (gpointer) xfolder) {
@@ -1845,9 +1881,9 @@
 
 				camel_url_free (url);
 
-				/* TODO: not sure if this is legal, but it works, force copy for special local folders */
-				context->suggested_action = GDK_ACTION_COPY;
-				context->actions = GDK_ACTION_COPY;
+				/* force copy for special local folders */
+				*suggested_action = GDK_ACTION_COPY;
+				*actions = GDK_ACTION_COPY;
 				xfolder = drop_atoms[DND_DROP_TYPE_FOLDER];
 				while (targets != NULL) {
 					if (targets->data == (gpointer) xfolder) {
@@ -1949,6 +1985,8 @@
 	GtkTreeViewColumn *column;
 	GtkTreeView *tree_view;
 	gint cell_x, cell_y;
+	GdkDragAction actions;
+	GdkDragAction suggested_action;
 	GtkTreePath *path;
 	GdkAtom target;
 
@@ -1970,12 +2008,13 @@
 	if (!gtk_tree_view_get_path_at_pos (tree_view, x, y, &path, &column, &cell_x, &cell_y))
 		return FALSE;
 
-	target = folder_tree_drop_target(folder_tree, context, path);
+	target = folder_tree_drop_target (
+		folder_tree, context, path,
+		&actions, &suggested_action);
+
 	gtk_tree_path_free (path);
-	if (target == GDK_NONE)
-		return FALSE;
 
-	return TRUE;
+	return (target != GDK_NONE);
 }
 
 static void
@@ -1983,7 +2022,7 @@
 {
 	EMFolderTreePrivate *priv = folder_tree->priv;
 
-	if (priv->drag_row) {
+	if (priv->drag_row != NULL) {
 		gtk_tree_row_reference_free (priv->drag_row);
 		priv->drag_row = NULL;
 	}
@@ -2012,7 +2051,8 @@
 		priv->autoexpand_id = 0;
 	}
 
-	gtk_tree_view_set_drag_dest_row(tree_view, NULL, GTK_TREE_VIEW_DROP_BEFORE);
+	gtk_tree_view_set_drag_dest_row (
+		tree_view, NULL, GTK_TREE_VIEW_DROP_BEFORE);
 }
 
 #define SCROLL_EDGE_SIZE 15
@@ -2069,13 +2109,20 @@
 }
 
 static gboolean
-tree_drag_motion (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, EMFolderTree *folder_tree)
+tree_drag_motion (GtkWidget *widget,
+                  GdkDragContext *context,
+                  gint x,
+                  gint y,
+                  guint time,
+                  EMFolderTree *folder_tree)
 {
 	EMFolderTreePrivate *priv = folder_tree->priv;
 	GtkTreeViewDropPosition pos;
 	GtkTreeView *tree_view;
 	GtkTreeModel *model;
-	GdkDragAction action = 0;
+	GdkDragAction actions;
+	GdkDragAction suggested_action;
+	GdkDragAction chosen_action = 0;
 	GtkTreePath *path;
 	GtkTreeIter iter;
 	GdkAtom target;
@@ -2084,11 +2131,12 @@
 	tree_view = GTK_TREE_VIEW (folder_tree);
 	model = gtk_tree_view_get_model (tree_view);
 
-	if (!gtk_tree_view_get_dest_row_at_pos(tree_view, x, y, &path, &pos))
+	if (!gtk_tree_view_get_dest_row_at_pos (tree_view, x, y, &path, &pos))
 		return FALSE;
 
 	if (priv->autoscroll_id == 0)
-		priv->autoscroll_id = g_timeout_add (150, (GSourceFunc) tree_autoscroll, folder_tree);
+		priv->autoscroll_id = g_timeout_add (
+			150, (GSourceFunc) tree_autoscroll, folder_tree);
 
 	gtk_tree_model_get_iter (model, &iter, path);
 
@@ -2118,33 +2166,36 @@
 		priv->autoexpand_id = 0;
 	}
 
-	target = folder_tree_drop_target(folder_tree, context, path);
-	if (target != GDK_NONE) {
-		for (i=0; i<NUM_DROP_TYPES; i++) {
-			if (drop_atoms[i] == target) {
-				switch (i) {
-				case DND_DROP_TYPE_UID_LIST:
-				case DND_DROP_TYPE_FOLDER:
-					action = context->suggested_action;
-					if (action == GDK_ACTION_COPY && (context->actions & GDK_ACTION_MOVE))
-						action = GDK_ACTION_MOVE;
-					gtk_tree_view_set_drag_dest_row(tree_view, path, GTK_TREE_VIEW_DROP_INTO_OR_AFTER);
-					break;
-				default:
-					gtk_tree_view_set_drag_dest_row(tree_view, path, GTK_TREE_VIEW_DROP_INTO_OR_AFTER);
-					action = context->suggested_action;
-					break;
-				}
+	target = folder_tree_drop_target (
+		folder_tree, context, path,
+		&actions, &suggested_action);
+	for (i = 0; target != GDK_NONE && i < NUM_DROP_TYPES; i++) {
+		if (drop_atoms[i] != target)
+			continue;
+		switch (i) {
+			case DND_DROP_TYPE_UID_LIST:
+			case DND_DROP_TYPE_FOLDER:
+				chosen_action = suggested_action;
+				if (chosen_action == GDK_ACTION_COPY && (actions & GDK_ACTION_MOVE))
+					chosen_action = GDK_ACTION_MOVE;
+				gtk_tree_view_set_drag_dest_row (
+					tree_view, path,
+					GTK_TREE_VIEW_DROP_INTO_OR_AFTER);
+				break;
+			default:
+				gtk_tree_view_set_drag_dest_row (
+					tree_view, path,
+					GTK_TREE_VIEW_DROP_INTO_OR_AFTER);
+				chosen_action = suggested_action;
 				break;
-			}
 		}
-	}
 
-	gtk_tree_path_free(path);
+		break;
+	}
 
-	gdk_drag_status(context, action, time);
+	gdk_drag_status(context, chosen_action, time);
 
-	return action != 0;
+	return chosen_action != 0;
 }
 
 void
diff -Nru evolution-2.30.2/mail/em-format-html-display.c evolution-2.30.3/mail/em-format-html-display.c
--- evolution-2.30.2/mail/em-format-html-display.c	2010-06-20 14:15:05.000000000 +0200
+++ evolution-2.30.3/mail/em-format-html-display.c	2010-07-14 16:40:52.000000000 +0200
@@ -151,8 +151,8 @@
 	GtkImage *image;
 	GtkWidget *event_box;
 
-	/* Optional Text Mem Stream */
-	CamelStreamMem *mstream;
+	/* Optional Text Data */
+	GByteArray *mem_bytes;
 
 	/* Signed / Encrypted */
         camel_cipher_validity_sign_t sign;
@@ -472,7 +472,7 @@
 efhd_format_optional (EMFormat *emf,
                       CamelStream *fstream,
                       CamelMimePart *part,
-                      CamelStream *mstream)
+                      const GByteArray *mem_bytes)
 {
 	gchar *classid, *html;
 	struct _attach_puri *info;
@@ -494,7 +494,9 @@
 	info->snoop_mime_type = "text/plain";
 	info->attachment = e_attachment_new ();
 	e_attachment_set_mime_part (info->attachment, info->puri.part);
-	info->mstream = (CamelStreamMem *) mstream;
+	info->mem_bytes = g_byte_array_new ();
+	g_byte_array_append (info->mem_bytes, mem_bytes ? mem_bytes->data : (const guint8 *) "", mem_bytes ? mem_bytes->len : 1);
+
 	if (emf->valid) {
 		info->sign = emf->valid->sign.status;
 		info->encrypt = emf->valid->encrypt.status;
@@ -1038,9 +1040,11 @@
 	gtk_text_view_set_editable (GTK_TEXT_VIEW (view), FALSE);
 	gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (view), FALSE);
 	buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW (view));
-	gtk_text_buffer_set_text (buffer, (gchar *)info->mstream->buffer->data, info->mstream->buffer->len);
-	camel_object_unref(info->mstream);
-	info->mstream = NULL;
+	if (info->mem_bytes) {
+		gtk_text_buffer_set_text (buffer, (gchar *)info->mem_bytes->data, info->mem_bytes->len);
+		g_byte_array_free (info->mem_bytes, TRUE);
+	}
+	info->mem_bytes = NULL;
 	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll),
 					GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 	gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll), GTK_SHADOW_IN);
diff -Nru evolution-2.30.2/mail/em-utils.c evolution-2.30.3/mail/em-utils.c
--- evolution-2.30.2/mail/em-utils.c	2010-06-20 14:15:04.000000000 +0200
+++ evolution-2.30.3/mail/em-utils.c	2010-07-14 16:40:52.000000000 +0200
@@ -637,12 +637,14 @@
 em_utils_selection_set_mailbox(GtkSelectionData *data, CamelFolder *folder, GPtrArray *uids)
 {
 	CamelStream *stream;
+	GByteArray *mem_bytes;
 
-	stream = camel_stream_mem_new();
+	mem_bytes = g_byte_array_new ();
+	stream = camel_stream_mem_new_with_byte_array (mem_bytes);
 	if (em_utils_write_messages_to_stream(folder, uids, stream) == 0)
 		gtk_selection_data_set(data, data->target, 8,
-				       ((CamelStreamMem *)stream)->buffer->data,
-				       ((CamelStreamMem *)stream)->buffer->len);
+				       mem_bytes->data,
+				       mem_bytes->len);
 
 	camel_object_unref(stream);
 }
@@ -856,18 +858,18 @@
  * automatically cleaned up when the application quits.
  **/
 void
-em_utils_selection_get_urilist(GtkSelectionData *data, CamelFolder *folder)
+em_utils_selection_get_urilist (GtkSelectionData *selection_data,
+                                CamelFolder *folder)
 {
 	CamelStream *stream;
 	CamelURL *url;
 	gint fd, i, res = 0;
-	gchar *tmp, **uris;
+	gchar **uris;
 
 	d(printf(" * drop uri list\n"));
 
-	tmp = g_strndup((gchar *)data->data, data->length);
-	uris = g_strsplit(tmp, "\n", 0);
-	g_free(tmp);
+	uris = gtk_selection_data_get_uris (selection_data);
+
 	for (i=0;res == 0 && uris[i];i++) {
 		g_strstrip(uris[i]);
 		if (uris[i][0] == '#')
@@ -889,7 +891,7 @@
 		camel_url_free(url);
 	}
 
-	g_strfreev(uris);
+	g_strfreev (uris);
 }
 
 static void
diff -Nru evolution-2.30.2/mail/mail-mt.c evolution-2.30.3/mail/mail-mt.c
--- evolution-2.30.2/mail/mail-mt.c	2010-06-20 14:15:05.000000000 +0200
+++ evolution-2.30.3/mail/mail-mt.c	2010-06-24 17:13:38.000000000 +0200
@@ -608,6 +608,7 @@
 	mail_async_event_t type;
 
 	GThread *thread;
+	guint idle_id;
 
 	MailAsyncFunc func;
 	gpointer o;
@@ -628,10 +629,11 @@
 }
 
 static gint
-idle_async_event(gpointer mm)
+idle_async_event (struct _proxy_msg *m)
 {
-	do_async_event(mm);
-	mail_msg_unref(mm);
+	m->idle_id = 0;
+	do_async_event (m);
+	mail_msg_unref (m);
 
 	return FALSE;
 }
@@ -655,7 +657,7 @@
 	return ea;
 }
 
-gint
+guint
 mail_async_event_emit (MailAsyncEvent *ea,
                        mail_async_event_t type,
                        MailAsyncFunc func,
@@ -664,7 +666,7 @@
                        gpointer data)
 {
 	struct _proxy_msg *m;
-	gint id;
+	guint id;
 
 	/* We dont have a reply port for this, we dont
 	 * care when/if it gets executed, just queue it. */
@@ -687,7 +689,8 @@
 	 * overflow and deadlock us. */
 	if (type == MAIL_ASYNC_GUI) {
 		if (mail_in_main_thread ())
-			g_idle_add(idle_async_event, m);
+			m->idle_id = g_idle_add (
+				(GSourceFunc) idle_async_event, m);
 		else
 			mail_msg_main_loop_push(m);
 	} else
@@ -712,6 +715,10 @@
 			errno = EDEADLK;
 			return -1;
 		}
+		if (m->idle_id > 0) {
+			g_source_remove (m->idle_id);
+			m->idle_id = 0;
+		}
 		g_mutex_unlock(ea->lock);
 		mail_msg_wait(id);
 		g_mutex_lock(ea->lock);
diff -Nru evolution-2.30.2/mail/mail-mt.h evolution-2.30.3/mail/mail-mt.h
--- evolution-2.30.2/mail/mail-mt.h	2010-06-20 14:15:04.000000000 +0200
+++ evolution-2.30.3/mail/mail-mt.h	2010-06-24 17:13:38.000000000 +0200
@@ -102,7 +102,7 @@
 /* create a new async event handler */
 MailAsyncEvent *mail_async_event_new(void);
 /* forward a camel event (or other call) to the gui thread */
-gint mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsyncFunc func, gpointer , gpointer , gpointer );
+guint mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsyncFunc func, gpointer , gpointer , gpointer );
 /* wait for all outstanding async events to complete */
 gint mail_async_event_destroy(MailAsyncEvent *ea);
 
diff -Nru evolution-2.30.2/mail/message-list.c evolution-2.30.3/mail/message-list.c
--- evolution-2.30.2/mail/message-list.c	2010-06-20 14:15:04.000000000 +0200
+++ evolution-2.30.3/mail/message-list.c	2010-07-14 16:40:52.000000000 +0200
@@ -121,10 +121,10 @@
 	GtkTargetList *paste_target_list;
 
 	/* This aids in automatic message selection. */
-	time_t latest_read_date;
-	const gchar *latest_read_uid;
-	time_t latest_unread_date;
-	const gchar *latest_unread_uid;
+	time_t newest_read_date;
+	const gchar *newest_read_uid;
+	time_t oldest_unread_date;
+	const gchar *oldest_unread_uid;
 };
 
 enum {
@@ -704,20 +704,20 @@
 	 * requested message UID was not found and 'with_fallback' is set,
 	 * try a couple fallbacks:
 	 *
-	 * 1) Most recently received unread message in the list.
-	 * 2) Most recently received read message in the list.
+	 * 1) Oldest unread message in the list, by date received.
+	 * 2) Newest read message in the list, by date received.
 	 */
 	if (message_list->regen || message_list->regen_timeout_id) {
 		g_free (message_list->pending_select_uid);
 		message_list->pending_select_uid = g_strdup (uid);
 		message_list->pending_select_fallback = with_fallback;
 	} else if (with_fallback) {
-		if (node == NULL && priv->latest_unread_uid != NULL)
+		if (node == NULL && priv->oldest_unread_uid != NULL)
 			node = g_hash_table_lookup (
-				uid_nodemap, priv->latest_unread_uid);
-		if (node == NULL && priv->latest_read_uid != NULL)
+				uid_nodemap, priv->oldest_unread_uid);
+		if (node == NULL && priv->newest_read_uid != NULL)
 			node = g_hash_table_lookup (
-				uid_nodemap, priv->latest_read_uid);
+				uid_nodemap, priv->newest_read_uid);
 	}
 
 	if (node) {
@@ -2873,10 +2873,10 @@
 	g_hash_table_destroy (ml->uid_nodemap);
 	ml->uid_nodemap = g_hash_table_new (g_str_hash, g_str_equal);
 
-	ml->priv->latest_read_date = 0;
-	ml->priv->latest_read_uid = NULL;
-	ml->priv->latest_unread_date = 0;
-	ml->priv->latest_unread_uid = NULL;
+	ml->priv->newest_read_date = 0;
+	ml->priv->newest_read_uid = NULL;
+	ml->priv->oldest_unread_date = 0;
+	ml->priv->oldest_unread_uid = NULL;
 
 	if (ml->tree_root) {
 		/* we should be frozen already */
@@ -3040,14 +3040,17 @@
 	/* Track the latest seen and unseen messages shown, used in
 	 * fallback heuristics for automatic message selection. */
 	if (flags & CAMEL_MESSAGE_SEEN) {
-		if (date > message_list->priv->latest_read_date) {
-			message_list->priv->latest_read_date = date;
-			message_list->priv->latest_read_uid = uid;
+		if (date > message_list->priv->newest_read_date) {
+			message_list->priv->newest_read_date = date;
+			message_list->priv->newest_read_uid = uid;
 		}
 	} else {
-		if (date > message_list->priv->latest_unread_date) {
-			message_list->priv->latest_unread_date = date;
-			message_list->priv->latest_unread_uid = uid;
+		if (message_list->priv->oldest_unread_date == 0) {
+			message_list->priv->oldest_unread_date = date;
+			message_list->priv->oldest_unread_uid = uid;
+		} else if (date < message_list->priv->oldest_unread_date) {
+			message_list->priv->oldest_unread_date = date;
+			message_list->priv->oldest_unread_uid = uid;
 		}
 	}
 
@@ -3062,14 +3065,14 @@
 
 	uid = camel_message_info_uid (info);
 
-	if (uid == message_list->priv->latest_read_uid) {
-		message_list->priv->latest_read_date = 0;
-		message_list->priv->latest_read_uid = NULL;
+	if (uid == message_list->priv->newest_read_uid) {
+		message_list->priv->newest_read_date = 0;
+		message_list->priv->newest_read_uid = NULL;
 	}
 
-	if (uid == message_list->priv->latest_unread_uid) {
-		message_list->priv->latest_unread_date = 0;
-		message_list->priv->latest_unread_uid = NULL;
+	if (uid == message_list->priv->oldest_unread_uid) {
+		message_list->priv->oldest_unread_date = 0;
+		message_list->priv->oldest_unread_uid = NULL;
 	}
 
 	g_hash_table_remove (message_list->uid_nodemap, uid);
@@ -4410,21 +4413,8 @@
 free_message_info_data (gpointer uid, struct sort_message_info_data *data, struct sort_array_data *sort_data)
 {
 	if (data->values) {
-		gint i;
-
-		g_return_if_fail (data->values->len <= sort_data->sort_columns->len);
-
-		for (i = 0; i < data->values->len; i++) {
-			gpointer v = g_ptr_array_index (data->values, i);
-			struct sort_column_data *scol;
-
-			if (!v)
-				continue;
-
-			scol = g_ptr_array_index (sort_data->sort_columns, i);
-			ml_free_value (NULL, scol->col->compare_col, v, NULL);
-		}
-
+		/* values in this array are not newly allocated, even ml_tree_value_at_ex
+		   returns gpointer, not a gconstpointer */
 		g_ptr_array_free (data->values, TRUE);
 	}
 
diff -Nru evolution-2.30.2/modules/addressbook/e-book-shell-view.c evolution-2.30.3/modules/addressbook/e-book-shell-view.c
--- evolution-2.30.2/modules/addressbook/e-book-shell-view.c	2010-06-20 14:14:47.000000000 +0200
+++ evolution-2.30.3/modules/addressbook/e-book-shell-view.c	2010-08-05 12:31:15.000000000 +0200
@@ -33,6 +33,9 @@
 	EShellView *shell_view;
 	GList *keys, *iter;
 
+	g_return_if_fail (E_IS_SHELL_VIEW (book_shell_view));
+	g_return_if_fail (book_shell_view->priv != NULL);
+
 	shell_view = E_SHELL_VIEW (book_shell_view);
 	book_shell_content = book_shell_view->priv->book_shell_content;
 
@@ -114,10 +117,10 @@
 	book_shell_backend = book_shell_view->priv->book_shell_backend;
 	source_list = e_book_shell_backend_get_source_list (book_shell_backend);
 
-	g_signal_connect_swapped (
+	g_signal_connect_object (
 		source_list, "changed",
 		G_CALLBACK (book_shell_view_source_list_changed_cb),
-		book_shell_view);
+		book_shell_view, G_CONNECT_SWAPPED);
 }
 
 static void
diff -Nru evolution-2.30.2/modules/addressbook/e-book-shell-view-private.c evolution-2.30.3/modules/addressbook/e-book-shell-view-private.c
--- evolution-2.30.2/modules/addressbook/e-book-shell-view-private.c	2010-06-20 14:14:48.000000000 +0200
+++ evolution-2.30.3/modules/addressbook/e-book-shell-view-private.c	2010-08-05 12:31:15.000000000 +0200
@@ -139,6 +139,9 @@
 	EBookShellContent *book_shell_content;
 	EContact *contact;
 
+	g_return_if_fail (E_IS_SHELL_VIEW (book_shell_view));
+	g_return_if_fail (book_shell_view->priv != NULL);
+
 	book_shell_content = book_shell_view->priv->book_shell_content;
 
 	contact = e_addressbook_model_contact_at (model, index);
@@ -158,6 +161,9 @@
 	EBookShellContent *book_shell_content;
 	EContact *preview_contact;
 
+	g_return_if_fail (E_IS_SHELL_VIEW (book_shell_view));
+	g_return_if_fail (book_shell_view->priv != NULL);
+
 	book_shell_content = book_shell_view->priv->book_shell_content;
 
 	preview_contact =
@@ -259,22 +265,22 @@
 			hash_table, g_strdup (uid),
 			g_object_ref (widget));
 
-		g_signal_connect_swapped (
-			widget, "open-contact",
-			G_CALLBACK (open_contact), book_shell_view);
-
-		g_signal_connect_swapped (
-			widget, "popup-event",
-			G_CALLBACK (popup_event), book_shell_view);
+		g_signal_connect_object (
+			widget, "open-contact", G_CALLBACK (open_contact),
+			book_shell_view, G_CONNECT_SWAPPED);
+
+		g_signal_connect_object (
+			widget, "popup-event", G_CALLBACK (popup_event),
+			book_shell_view, G_CONNECT_SWAPPED);
 
-		g_signal_connect_swapped (
+		g_signal_connect_object (
 			widget, "command-state-change",
 			G_CALLBACK (e_shell_view_update_actions),
-			book_shell_view);
+			book_shell_view, G_CONNECT_SWAPPED);
 
-		g_signal_connect_swapped (
-			widget, "selection-change",
-			G_CALLBACK (selection_change), book_shell_view);
+		g_signal_connect_object (
+			widget, "selection-change", G_CALLBACK (selection_change),
+			book_shell_view, G_CONNECT_SWAPPED);
 
 		book = e_book_new (source, NULL);
 		view = E_ADDRESSBOOK_VIEW (widget);
@@ -284,13 +290,13 @@
 
 		model = e_addressbook_view_get_model (view);
 
-		g_signal_connect_swapped (
-			model, "contact-changed",
-			G_CALLBACK (contact_changed), book_shell_view);
-
-		g_signal_connect_swapped (
-			model, "contacts-removed",
-			G_CALLBACK (contacts_removed), book_shell_view);
+		g_signal_connect_object (
+			model, "contact-changed", G_CALLBACK (contact_changed),
+			book_shell_view, G_CONNECT_SWAPPED);
+
+		g_signal_connect_object (
+			model, "contacts-removed", G_CALLBACK (contacts_removed),
+			book_shell_view, G_CONNECT_SWAPPED);
 	}
 
 	e_book_shell_content_set_current_view (
@@ -473,25 +479,25 @@
 	selector = e_book_shell_sidebar_get_selector (
 		E_BOOK_SHELL_SIDEBAR (shell_sidebar));
 
-	g_signal_connect_swapped (
+	g_signal_connect_object (
 		selector, "button-press-event",
 		G_CALLBACK (book_shell_view_selector_button_press_event_cb),
-		book_shell_view);
+		book_shell_view, G_CONNECT_SWAPPED);
 
-	g_signal_connect_swapped (
+	g_signal_connect_object (
 		selector, "key-press-event",
 		G_CALLBACK (book_shell_view_selector_key_press_event_cb),
-		book_shell_view);
+		book_shell_view, G_CONNECT_SWAPPED);
 
-	g_signal_connect_swapped (
+	g_signal_connect_object (
 		selector, "popup-menu",
 		G_CALLBACK (book_shell_view_selector_popup_menu_cb),
-		book_shell_view);
+		book_shell_view, G_CONNECT_SWAPPED);
 
-	g_signal_connect_swapped (
+	g_signal_connect_object (
 		selector, "primary-selection-changed",
 		G_CALLBACK (book_shell_view_activate_selected_source),
-		book_shell_view);
+		book_shell_view, G_CONNECT_SWAPPED);
 
 	e_categories_add_change_hook (
 		(GHookFunc) e_book_shell_view_update_search_filter,
diff -Nru evolution-2.30.2/modules/calendar/e-cal-shell-backend.c evolution-2.30.3/modules/calendar/e-cal-shell-backend.c
--- evolution-2.30.2/modules/calendar/e-cal-shell-backend.c	2010-06-20 14:14:46.000000000 +0200
+++ evolution-2.30.3/modules/calendar/e-cal-shell-backend.c	2010-06-24 19:16:02.000000000 +0200
@@ -48,6 +48,7 @@
 #include "e-cal-shell-content.h"
 #include "e-cal-shell-migrate.h"
 #include "e-cal-shell-settings.h"
+#include "e-cal-shell-sidebar.h"
 #include "e-cal-shell-view.h"
 
 #define E_CAL_SHELL_BACKEND_GET_PRIVATE(obj) \
@@ -539,6 +540,8 @@
 	gchar *source_uid = NULL;
 	gchar *comp_uid = NULL;
 	gchar *comp_rid = NULL;
+	GDate start_date;
+	GDate end_date;
 	gboolean handled = FALSE;
 	GError *error = NULL;
 
@@ -553,6 +556,9 @@
 	if (cp == NULL)
 		goto exit;
 
+	g_date_clear (&start_date, 1);
+	g_date_clear (&end_date, 1);
+
 	while (*cp != '\0') {
 		gchar *header;
 		gchar *content;
@@ -572,7 +578,13 @@
 		content_len = strcspn (cp, "&");
 
 		content = g_strndup (cp, content_len);
-		if (g_ascii_strcasecmp (header, "source-uid") == 0)
+		if (g_ascii_strcasecmp (header, "startdate") == 0)
+			g_date_set_time_t (
+				&start_date, time_from_isodate (content));
+		else if (g_ascii_strcasecmp (header, "enddate") == 0)
+			g_date_set_time_t (
+				&end_date, time_from_isodate (content));
+		else if (g_ascii_strcasecmp (header, "source-uid") == 0)
 			source_uid = g_strdup (content);
 		else if (g_ascii_strcasecmp (header, "comp-uid") == 0)
 			comp_uid = g_strdup (content);
@@ -588,6 +600,21 @@
 		}
 	}
 
+	/* This is primarily for launching Evolution
+	 * from the calendar in the clock applet. */
+	if (g_date_valid (&start_date)) {
+		if (g_date_valid (&end_date))
+			e_cal_shell_backend_open_date_range (
+				E_CAL_SHELL_BACKEND (shell_backend),
+				&start_date, &end_date);
+		else
+			e_cal_shell_backend_open_date_range (
+				E_CAL_SHELL_BACKEND (shell_backend),
+				&start_date, NULL);
+		handled = TRUE;
+		goto exit;
+	}
+
 	if (source_uid == NULL || comp_uid == NULL)
 		goto exit;
 
@@ -831,3 +858,57 @@
 
 	return cal_shell_backend->priv->source_list;
 }
+
+void
+e_cal_shell_backend_open_date_range (ECalShellBackend *cal_shell_backend,
+                                     const GDate *start_date,
+                                     const GDate *end_date)
+{
+	EShell *shell;
+	EShellView *shell_view;
+	EShellBackend *shell_backend;
+	EShellSidebar *shell_sidebar;
+	GtkWidget *shell_window = NULL;
+	ECalendar *navigator;
+	GList *watched_windows;
+
+	g_return_if_fail (E_IS_CAL_SHELL_BACKEND (cal_shell_backend));
+
+	shell_backend = E_SHELL_BACKEND (cal_shell_backend);
+	shell = e_shell_backend_get_shell (shell_backend);
+	watched_windows = e_shell_get_watched_windows (shell);
+
+	/* Try to find an EShellWindow already in calendar view. */
+	while (watched_windows != NULL) {
+		GtkWidget *window = GTK_WIDGET (watched_windows->data);
+
+		if (E_IS_SHELL_WINDOW (window)) {
+			const gchar *active_view;
+
+			active_view = e_shell_window_get_active_view (
+				E_SHELL_WINDOW (window));
+			if (g_strcmp0 (active_view, "calendar") == 0) {
+				gtk_window_present (GTK_WINDOW (window));
+				shell_window = window;
+				break;
+			}
+		}
+
+		watched_windows = g_list_next (watched_windows);
+	}
+
+	/* Otherwise create a new EShellWindow in calendar view. */
+	if (shell_window == NULL)
+		shell_window = e_shell_create_shell_window (shell, "calendar");
+
+	/* Now dig up the date navigator and select the date range. */
+
+	shell_view = e_shell_window_get_shell_view (
+		E_SHELL_WINDOW (shell_window), "calendar");
+	shell_sidebar = e_shell_view_get_shell_sidebar (shell_view);
+	navigator = e_cal_shell_sidebar_get_date_navigator (
+		E_CAL_SHELL_SIDEBAR (shell_sidebar));
+
+	e_calendar_item_set_selection (
+		navigator->calitem, start_date, end_date);
+}
diff -Nru evolution-2.30.2/modules/calendar/e-cal-shell-backend.h evolution-2.30.3/modules/calendar/e-cal-shell-backend.h
--- evolution-2.30.2/modules/calendar/e-cal-shell-backend.h	2010-06-20 14:14:47.000000000 +0200
+++ evolution-2.30.3/modules/calendar/e-cal-shell-backend.h	2010-06-24 19:16:02.000000000 +0200
@@ -64,6 +64,10 @@
 					(GTypeModule *type_module);
 ESourceList *	e_cal_shell_backend_get_source_list
 					(ECalShellBackend *cal_shell_backend);
+void		e_cal_shell_backend_open_date_range
+					(ECalShellBackend *cal_shell_backend,
+					 const GDate *start_date,
+					 const GDate *end_date);
 
 G_END_DECLS
 
diff -Nru evolution-2.30.2/modules/windows-sens/evolution-windows-sens.c evolution-2.30.3/modules/windows-sens/evolution-windows-sens.c
--- evolution-2.30.2/modules/windows-sens/evolution-windows-sens.c	2010-06-20 14:14:45.000000000 +0200
+++ evolution-2.30.3/modules/windows-sens/evolution-windows-sens.c	2010-07-28 23:15:00.000000000 +0200
@@ -39,7 +39,7 @@
 const IID IID_IEnumEventObject;
 typedef struct IEnumEventObjectVtbl {
 	BEGIN_INTERFACE
-		HRESULT (WINAPI *QueryInterface)(IEnumEventObject *This,REFIID riid,gpointer *ppvObject);
+		HRESULT (WINAPI *QueryInterface)(IEnumEventObject *This,REFIID riid,PVOID *ppvObject);
 		ULONG (WINAPI *AddRef)(IEnumEventObject *This);
 		ULONG (WINAPI *Release)(IEnumEventObject *This);
 		HRESULT (WINAPI *Clone)(IEnumEventObject *This,IEnumEventObject **ppInterface);
@@ -57,7 +57,7 @@
 const IID IID_IEventObjectCollection;
 typedef struct IEventObjectCollectionVtbl {
 	BEGIN_INTERFACE
-		HRESULT (WINAPI *QueryInterface)(IEventObjectCollection *This,REFIID riid,gpointer *ppvObject);
+		HRESULT (WINAPI *QueryInterface)(IEventObjectCollection *This,REFIID riid,PVOID *ppvObject);
 		ULONG (WINAPI *AddRef)(IEventObjectCollection *This);
 		ULONG (WINAPI *Release)(IEventObjectCollection *This);
 		HRESULT (WINAPI *GetTypeInfoCount)(IEventObjectCollection *This,UINT *pctinfo);
@@ -81,7 +81,7 @@
 const IID IID_IEventSystem;
 typedef struct IEventSystemVtbl {
 	BEGIN_INTERFACE
-		HRESULT (WINAPI *QueryInterface)(IEventSystem *This,REFIID riid,gpointer *ppvObject);
+		HRESULT (WINAPI *QueryInterface)(IEventSystem *This,REFIID riid,PVOID *ppvObject);
 		ULONG (WINAPI *AddRef)(IEventSystem *This);
 		ULONG (WINAPI *Release)(IEventSystem *This);
 		HRESULT (WINAPI *GetTypeInfoCount)(IEventSystem *This,UINT *pctinfo);
@@ -105,7 +105,7 @@
 const IID IID_IEventSubscription;
 typedef struct IEventSubscriptionVtbl {
 	BEGIN_INTERFACE
-		HRESULT (WINAPI *QueryInterface)(IEventSubscription *This,REFIID riid,gpointer *ppvObject);
+		HRESULT (WINAPI *QueryInterface)(IEventSubscription *This,REFIID riid,PVOID *ppvObject);
 		ULONG (WINAPI *AddRef)(IEventSubscription *This);
 		ULONG (WINAPI *Release)(IEventSubscription *This);
 		HRESULT (WINAPI *GetTypeInfoCount)(IEventSubscription *This,UINT *pctinfo);
@@ -174,7 +174,7 @@
 const IID IID_ISensNetwork;
 typedef struct ISensNetworkVtbl {
 	BEGIN_INTERFACE
-		HRESULT (WINAPI *QueryInterface)(ISensNetwork *This,REFIID riid,gpointer *ppvObject);
+		HRESULT (WINAPI *QueryInterface)(ISensNetwork *This,REFIID riid,PVOID *ppvObject);
 		ULONG (WINAPI *AddRef)(ISensNetwork *This);
 		ULONG (WINAPI *Release)(ISensNetwork *This);
 		HRESULT (WINAPI *GetTypeInfoCount)(ISensNetwork *This,UINT *pctinfo);
@@ -261,7 +261,7 @@
 
 /* Functions to implement ISensNetwork interface */
 
-static HRESULT WINAPI e_sens_network_listener_queryinterface (ISensNetwork*,REFIID,gpointer *);
+static HRESULT WINAPI e_sens_network_listener_queryinterface (ISensNetwork*,REFIID,PVOID *);
 static ULONG WINAPI e_sens_network_listener_addref (ISensNetwork*);
 static ULONG WINAPI e_sens_network_listener_release (ISensNetwork*);
 static HRESULT WINAPI e_sens_network_listener_gettypeinfocount (ISensNetwork*, UINT*);
diff -Nru evolution-2.30.2/NEWS evolution-2.30.3/NEWS
--- evolution-2.30.2/NEWS	2010-06-20 19:11:45.000000000 +0200
+++ evolution-2.30.3/NEWS	2010-08-11 21:37:21.000000000 +0200
@@ -1,3 +1,56 @@
+Evolution 2.30.3 2010-08-11
+---------------------------
+
+Bug Fixes:
+	Bug 598833 - Do not ship dropped evo_mail_notifier.png
+	             (Yves-Alexis Perez)
+	Bug 604262 - "Copy Email Address" should also copy to primary
+	             clipboard (Matthew Barnes)
+	Bug 612178 - Do not access CamelStreamMem::buffer directly (Milan Crha)
+	Bug 615049 - Crash in remove_contact at e-addressbook-model.c:202
+	             (Milan Crha)
+	Bug 617854 - Critical warnings in calendar view (Milan Crha)
+	Bug 619959 - Crash in format_itip at itip-formatter.c line 2567
+	             (Milan Crha)
+	Bug 621819 - Can't drag message attachments to folders (Matthew Barnes)
+	Bug 621839 - Improve auto-selection of messages (take two)
+	             (Matthew Barnes)
+	Bug 622329 - Help menu points to the wrong FAQ page (Matthew Barnes)
+	Bug 622535 - Account assistant loops on first run (Matthew Barnes)
+	Bug 622547 - mail_async_event_destroy() doesn't cancel its idle
+	             callback (Matthew Barnes)
+	Bug 622559 - Changing search option should focus search entry
+	             (Matthew Barnes)
+	Bug 622633 - Can't launch Evolution from clock applet (Matthew Barnes)
+	Bug 623029 - Work week days not restored on start (Milan Crha)
+	Bug 623796 - Post Message to List asks for confirmation on close
+	             (Milan Crha)
+	Bug 624237 - Fails to start when smartcard is inserted (Matthew Barnes)
+	Bug 624335 - Abort after group-by-thread with certain sorting
+	             (Milan Crha)
+	Bug 624677 - Missing keyboard shortcut for "Save as mbox"
+	             (Matthew Barnes)
+	Bug 625204 - Typo in e_day_view_finish_long_event_resize()
+	             (Thomas Mittelstaedt)
+	Bug 626059 - Welcome messages has incorrect links (Christian Kirbach)
+
+Other Changes:
+	* EHintedEntry: Don't select hints on grab_focus(). (Matthew Barnes)
+	* Use PVOID instead of gpointer when working with COM+ function
+	  pointers (Fridrich Štrba)
+	* Fix two memory leaks when replying (David Woodhouse)
+	* Allow edit accounts in the capplet to go fwd/back.
+	  (Srinivasa Ragavan)
+	* Various folder tree icon enhancements. (Matthew Barnes)
+
+Translations:
+	Christian Kirbach (de)
+	Nana Suryana (id)
+	Shankar Prasad (kn)
+	Sandeep Shedmake (mr)
+	Armijn Hemel (nl)
+	krishnababu k (te)
+
 Evolution 2.30.2 2010-06-20
 ---------------------------
 
diff -Nru evolution-2.30.2/plugins/groupwise-features/install-shared.c evolution-2.30.3/plugins/groupwise-features/install-shared.c
--- evolution-2.30.2/plugins/groupwise-features/install-shared.c	2010-06-20 14:14:43.000000000 +0200
+++ evolution-2.30.3/plugins/groupwise-features/install-shared.c	2010-07-14 16:40:52.000000000 +0200
@@ -194,7 +194,8 @@
 	const gchar *name;
 	const gchar *email;
 	CamelMimeMessage *msg = (CamelMimeMessage *) target->message;
-	CamelStreamMem *content;
+	CamelStream *mem_content;
+	GByteArray *mem_bytes;
 	CamelDataWrapper *dw;
 	gchar *start_message;
 
@@ -213,9 +214,10 @@
 				return;
 		}
 
-		content = (CamelStreamMem *)camel_stream_mem_new();
-		camel_data_wrapper_write_to_stream(dw, (CamelStream *)content);
-		camel_stream_write((CamelStream *)content, "", 1);
+		mem_bytes = g_byte_array_new ();
+		mem_content = camel_stream_mem_new_with_byte_array (mem_bytes);
+		camel_data_wrapper_write_to_stream(dw, mem_content);
+		camel_stream_write (mem_content, "", 1);
 
 		from_addr = camel_mime_message_get_from ((CamelMimeMessage *)target->message);
 		if (from_addr && camel_internet_address_get(from_addr, 0, &name, &email)) {
@@ -226,7 +228,7 @@
 							   "Message from '%s'\n\n\n"
 							   "%s\n\n\n"
 							   "Click 'Apply' to install the shared folder\n\n"),
-							   name, name, content->buffer->data);
+							   name, name, mem_bytes->data);
 
 			page = gtk_label_new (start_message);
 			gtk_label_set_line_wrap (GTK_LABEL (page), TRUE);
@@ -252,7 +254,7 @@
 		} else
 			g_warning ("Could not get the sender name");
 
-		camel_object_unref(content);
+		camel_object_unref (mem_content);
 	}
 }
 
diff -Nru evolution-2.30.2/plugins/itip-formatter/itip-formatter.c evolution-2.30.3/plugins/itip-formatter/itip-formatter.c
--- evolution-2.30.2/plugins/itip-formatter/itip-formatter.c	2010-06-20 14:14:42.000000000 +0200
+++ evolution-2.30.3/plugins/itip-formatter/itip-formatter.c	2010-06-24 14:18:08.000000000 +0200
@@ -2536,6 +2536,7 @@
 	struct _itip_puri *puri;
 	CamelDataWrapper *content;
 	CamelStream *mem;
+	GByteArray *buffer = g_byte_array_new ();
 
 	classid = g_strdup_printf("itip:///%s", ((EMFormat *) target->format)->part_id->str);
 
@@ -2561,13 +2562,13 @@
 
 	/* This is non-gui thread. Download the part for using in the main thread */
 	content = camel_medium_get_content_object ((CamelMedium *) target->part);
-	mem = camel_stream_mem_new ();
+	mem = camel_stream_mem_new_with_byte_array (buffer);
 	camel_data_wrapper_decode_to_stream (content, mem);
 
-	if (((CamelStreamMem *) mem)->buffer->len == 0)
+	if (buffer->len == 0)
 		puri->vcalendar = NULL;
 	else
-		puri->vcalendar = g_strndup ((gchar *)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len);
+		puri->vcalendar = g_strndup ((gchar *)buffer->data, buffer->len);
 	camel_object_unref (mem);
 
 	camel_stream_printf (target->stream, "<table border=0 width=\"100%%\" cellpadding=3><tr>");
diff -Nru evolution-2.30.2/plugins/mail-to-task/mail-to-task.c evolution-2.30.3/plugins/mail-to-task/mail-to-task.c
--- evolution-2.30.2/plugins/mail-to-task/mail-to-task.c	2010-06-20 14:14:41.000000000 +0200
+++ evolution-2.30.3/plugins/mail-to-task/mail-to-task.c	2010-07-14 16:40:52.000000000 +0200
@@ -182,6 +182,7 @@
 	CamelStream *mem;
 	CamelContentType *type;
 	CamelMimePart *mime_part = CAMEL_MIME_PART (message);
+	GByteArray *mem_bytes;
 	ECalComponentText text;
 	GSList sl;
 	gchar *str, *convert_str = NULL;
@@ -208,10 +209,11 @@
 	if (!camel_content_type_is (type, "text", "plain"))
 		return;
 
-	mem = camel_stream_mem_new ();
+	mem_bytes = g_byte_array_new ();
+	mem = camel_stream_mem_new_with_byte_array (mem_bytes);
 	camel_data_wrapper_decode_to_stream (content, mem);
 
-	str = g_strndup ((const gchar *)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len);
+	str = g_strndup ((const gchar *) mem_bytes->data, mem_bytes->len);
 	camel_object_unref (mem);
 
 	/* convert to UTF-8 string */
diff -Nru evolution-2.30.2/po/de.po evolution-2.30.3/po/de.po
diff -Nru evolution-2.30.2/po/id.po evolution-2.30.3/po/id.po
diff -Nru evolution-2.30.2/po/kn.po evolution-2.30.3/po/kn.po
diff -Nru evolution-2.30.2/po/mr.po evolution-2.30.3/po/mr.po
diff -Nru evolution-2.30.2/po/nl.po evolution-2.30.3/po/nl.po
diff -Nru evolution-2.30.2/po/te.po evolution-2.30.3/po/te.po
diff -Nru evolution-2.30.2/shell/e-shell-searchbar.c evolution-2.30.3/shell/e-shell-searchbar.c
--- evolution-2.30.2/shell/e-shell-searchbar.c	2010-06-20 14:14:28.000000000 +0200
+++ evolution-2.30.3/shell/e-shell-searchbar.c	2010-06-24 14:20:30.000000000 +0200
@@ -436,8 +436,10 @@
 		e_shell_searchbar_set_search_text (searchbar, search_text);
 		if (search_text != NULL && *search_text != '\0')
 			e_shell_view_execute_search (shell_view);
-		else
+		else {
 			shell_searchbar_save_search_option (searchbar);
+			gtk_widget_grab_focus (searchbar->priv->search_entry);
+		}
 
 	} else if (search_text != NULL)
 		e_shell_searchbar_set_search_text (searchbar, NULL);
diff -Nru evolution-2.30.2/shell/e-shell-window-actions.c evolution-2.30.3/shell/e-shell-window-actions.c
--- evolution-2.30.2/shell/e-shell-window-actions.c	2010-06-20 14:14:28.000000000 +0200
+++ evolution-2.30.3/shell/e-shell-window-actions.c	2010-06-22 01:23:59.000000000 +0200
@@ -34,7 +34,7 @@
 	"Copyright \xC2\xA9 1999 - 2008 Novell, Inc. and Others"
 
 #define EVOLUTION_FAQ \
-	"http://www.go-evolution.org/FAQ";
+	"http://live.gnome.org/Evolution/FAQ";
 
 #define EVOLUTION_WEBSITE \
 	"http://www.gnome.org/projects/evolution/";
diff -Nru evolution-2.30.2/smime/gui/certificate-manager.c evolution-2.30.3/smime/gui/certificate-manager.c
--- evolution-2.30.2/smime/gui/certificate-manager.c	2010-06-20 14:14:40.000000000 +0200
+++ evolution-2.30.3/smime/gui/certificate-manager.c	2010-07-14 16:41:00.000000000 +0200
@@ -973,9 +973,11 @@
 	CERT_DestroyCertList (certList);
 }
 
-static void
+static gboolean
 populate_ui (CertificateManagerData *cfm)
 {
+	/* This is an idle callback. */
+
 	unload_certs (cfm, E_CERT_USER);
 	load_certs (cfm, E_CERT_USER, add_user_cert);
 
@@ -988,6 +990,8 @@
 	/* expand all three trees */
 	gtk_tree_view_expand_all (GTK_TREE_VIEW (cfm->yourcerts_treeview));
 	gtk_tree_view_expand_all (GTK_TREE_VIEW (cfm->contactcerts_treeview));
+
+	return FALSE;
 }
 
 void
@@ -1031,7 +1035,11 @@
 	initialize_contactcerts_ui(cfm_data);
 	initialize_authoritycerts_ui(cfm_data);
 
-	populate_ui (cfm_data);
+	/* Run this in an idle callback so Evolution has a chance to
+	 * fully initialize itself and start its main loop before we
+	 * load certificates, since doing so may trigger a password
+	 * dialog, and dialogs require a main loop. */
+	g_idle_add ((GSourceFunc) populate_ui, cfm_data);
 
 	widget = e_builder_get_widget (cfm_data->builder, "cert-manager-notebook");
 	g_object_ref (widget);
diff -Nru evolution-2.30.2/widgets/misc/e-attachment-button.c evolution-2.30.3/widgets/misc/e-attachment-button.c
--- evolution-2.30.2/widgets/misc/e-attachment-button.c	2010-06-20 14:14:32.000000000 +0200
+++ evolution-2.30.3/widgets/misc/e-attachment-button.c	2010-06-23 02:32:25.000000000 +0200
@@ -247,6 +247,18 @@
 }
 
 static void
+attachment_button_expand_drag_begin_cb (EAttachmentButton *button,
+                                        GdkDragContext *context)
+{
+	EAttachmentView *view;
+
+	view = e_attachment_button_get_view (button);
+
+	attachment_button_select_path (button);
+	e_attachment_view_drag_begin (view, context);
+}
+
+static void
 attachment_button_expand_drag_data_get_cb (EAttachmentButton *button,
                                            GdkDragContext *context,
                                            GtkSelectionData *selection,
@@ -263,6 +275,17 @@
 		view, context, selection, info, time);
 }
 
+static void
+attachment_button_expand_drag_end_cb (EAttachmentButton *button,
+                                      GdkDragContext *context)
+{
+	EAttachmentView *view;
+
+	view = e_attachment_button_get_view (button);
+
+	e_attachment_view_drag_end (view, context);
+}
+
 static gboolean
 attachment_button_toggle_button_press_event_cb (EAttachmentButton *button,
                                                 GdkEventButton *event)
@@ -579,20 +602,39 @@
 		G_CALLBACK (attachment_button_expand_clicked_cb), button);
 
 	g_signal_connect_swapped (
+		button->priv->expand_button, "drag-begin",
+		G_CALLBACK (attachment_button_expand_drag_begin_cb),
+		button);
+
+	g_signal_connect_swapped (
 		button->priv->expand_button, "drag-data-get",
 		G_CALLBACK (attachment_button_expand_drag_data_get_cb),
 		button);
 
 	g_signal_connect_swapped (
+		button->priv->expand_button, "drag-end",
+		G_CALLBACK (attachment_button_expand_drag_end_cb),
+		button);
+
+	g_signal_connect_swapped (
 		button->priv->toggle_button, "button-press-event",
 		G_CALLBACK (attachment_button_toggle_button_press_event_cb),
 		button);
 
 	g_signal_connect_swapped (
+		button->priv->toggle_button, "drag-begin",
+		G_CALLBACK (attachment_button_expand_drag_begin_cb),
+		button);
+
+	g_signal_connect_swapped (
 		button->priv->toggle_button, "drag-data-get",
 		G_CALLBACK (attachment_button_expand_drag_data_get_cb),
 		button);
 
+	g_signal_connect_swapped (
+		button->priv->toggle_button, "drag-end",
+		G_CALLBACK (attachment_button_expand_drag_end_cb),
+		button);
 }
 
 GType
diff -Nru evolution-2.30.2/widgets/misc/e-calendar-item.c evolution-2.30.3/widgets/misc/e-calendar-item.c
--- evolution-2.30.2/widgets/misc/e-calendar-item.c	2010-06-20 14:14:29.000000000 +0200
+++ evolution-2.30.3/widgets/misc/e-calendar-item.c	2010-06-24 19:16:02.000000000 +0200
@@ -188,8 +188,8 @@
 static void e_calendar_item_queue_signal_emission	(ECalendarItem	*calitem);
 static gboolean e_calendar_item_signal_emission_idle_cb	(gpointer data);
 static void e_calendar_item_set_selection_if_emission (ECalendarItem	*calitem,
-						       GDate		*start_date,
-						       GDate		*end_date,
+						       const GDate	*start_date,
+						       const GDate	*end_date,
 						       gboolean emission);
 
 /* Our arguments. */
@@ -3094,8 +3094,8 @@
 
 static void
 e_calendar_item_set_selection_if_emission (ECalendarItem	*calitem,
-					   GDate		*start_date,
-					   GDate		*end_date,
+					   const GDate		*start_date,
+					   const GDate		*end_date,
 					   gboolean emission)
 {
 	gint start_year, start_month, start_day;
@@ -3197,8 +3197,8 @@
 
 void
 e_calendar_item_set_selection (ECalendarItem	*calitem,
-			       GDate		*start_date,
-			       GDate		*end_date)
+			       const GDate	*start_date,
+			       const GDate	*end_date)
 {
 	/* If the user is in the middle of a selection, we must abort it. */
 	if (calitem->selecting) {
diff -Nru evolution-2.30.2/widgets/misc/e-calendar-item.h evolution-2.30.3/widgets/misc/e-calendar-item.h
--- evolution-2.30.2/widgets/misc/e-calendar-item.h	2010-06-20 14:14:33.000000000 +0200
+++ evolution-2.30.3/widgets/misc/e-calendar-item.h	2010-06-24 19:16:02.000000000 +0200
@@ -319,8 +319,8 @@
    the start of the selection is shown. If start_date is NULL it clears the
    selection. */
 void	e_calendar_item_set_selection		(ECalendarItem *calitem,
-						 GDate *start_date,
-						 GDate *end_date);
+						 const GDate *start_date,
+						 const GDate *end_date);
 
 /* Marks a particular day. Passing E_CALENDAR_ITEM_MARK_BOLD as the day style
    will result in the day being shown as bold by default. The style callback
diff -Nru evolution-2.30.2/widgets/misc/e-hinted-entry.c evolution-2.30.3/widgets/misc/e-hinted-entry.c
--- evolution-2.30.2/widgets/misc/e-hinted-entry.c	2010-06-20 14:14:32.000000000 +0200
+++ evolution-2.30.3/widgets/misc/e-hinted-entry.c	2010-06-25 02:42:23.000000000 +0200
@@ -39,18 +39,6 @@
 static gpointer parent_class;
 
 static void
-hinted_entry_hide_hint (EHintedEntry *entry)
-{
-	entry->priv->hint_shown = FALSE;
-
-	gtk_entry_set_text (GTK_ENTRY (entry), "");
-
-	gtk_widget_modify_text (GTK_WIDGET (entry), GTK_STATE_NORMAL, NULL);
-
-	g_object_notify (G_OBJECT (entry), "hint-shown");
-}
-
-static void
 hinted_entry_show_hint (EHintedEntry *entry)
 {
 	GtkStyle *style;
@@ -70,6 +58,19 @@
 }
 
 static void
+hinted_entry_show_text (EHintedEntry *entry,
+                        const gchar *text)
+{
+	entry->priv->hint_shown = FALSE;
+
+	gtk_entry_set_text (GTK_ENTRY (entry), text);
+
+	gtk_widget_modify_text (GTK_WIDGET (entry), GTK_STATE_NORMAL, NULL);
+
+	g_object_notify (G_OBJECT (entry), "hint-shown");
+}
+
+static void
 hinted_entry_set_property (GObject *object,
                            guint property_id,
                            const GValue *value,
@@ -122,6 +123,34 @@
 	G_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
+static void
+hinted_entry_grab_focus (GtkWidget *widget)
+{
+	EHintedEntryPrivate *priv;
+	GtkSettings *settings;
+	const gchar *property_name;
+	gboolean select_on_focus;
+
+	priv = E_HINTED_ENTRY_GET_PRIVATE (widget);
+
+	/* We don't want hints to be selected so we must temporarily
+	 * override the "gtk-entry-select-on-focus" setting. */
+
+	settings = gtk_widget_get_settings (widget);
+	property_name = "gtk-entry-select-on-focus";
+
+	g_object_get (settings, property_name, &select_on_focus, NULL);
+
+	if (priv->hint_shown)
+		g_object_set (settings, property_name, FALSE, NULL);
+
+	/* Chain up to parent's grab_focus() method. */
+	GTK_WIDGET_CLASS (parent_class)->grab_focus (widget);
+
+	if (priv->hint_shown)
+		g_object_set (settings, property_name, select_on_focus, NULL);
+}
+
 static gboolean
 hinted_entry_focus_in_event (GtkWidget *widget,
                              GdkEventFocus *event)
@@ -129,7 +158,7 @@
 	EHintedEntry *entry = E_HINTED_ENTRY (widget);
 
 	if (e_hinted_entry_get_hint_shown (entry))
-		hinted_entry_hide_hint (entry);
+		hinted_entry_show_text (entry, "");
 
 	/* Chain up to parent's focus_in_event() method. */
 	return GTK_WIDGET_CLASS (parent_class)->
@@ -168,6 +197,7 @@
 	object_class->finalize = hinted_entry_finalize;
 
 	widget_class = GTK_WIDGET_CLASS (class);
+	widget_class->grab_focus = hinted_entry_grab_focus;
 	widget_class->focus_in_event = hinted_entry_focus_in_event;
 	widget_class->focus_out_event = hinted_entry_focus_out_event;
 
@@ -269,14 +299,16 @@
 const gchar *
 e_hinted_entry_get_text (EHintedEntry *entry)
 {
+	const gchar *text = "";
+
 	/* XXX This clumsily overrides gtk_entry_get_text(). */
 
 	g_return_val_if_fail (E_IS_HINTED_ENTRY (entry), NULL);
 
-	if (e_hinted_entry_get_hint_shown (entry))
-		return "";
+	if (!e_hinted_entry_get_hint_shown (entry))
+		text = gtk_entry_get_text (GTK_ENTRY (entry));
 
-	return gtk_entry_get_text (GTK_ENTRY (entry));
+	return text;
 }
 
 void
@@ -296,8 +328,6 @@
 	if (*text == '\0' && !GTK_WIDGET_HAS_FOCUS (entry))
 #endif
 		hinted_entry_show_hint (entry);
-	else {
-		hinted_entry_hide_hint (entry);
-		gtk_entry_set_text (GTK_ENTRY (entry), text);
-	}
+	else
+		hinted_entry_show_text (entry, text);
 }
diff -Nru evolution-2.30.2/widgets/misc/e-web-view.c evolution-2.30.3/widgets/misc/e-web-view.c
--- evolution-2.30.2/widgets/misc/e-web-view.c	2010-06-20 14:14:34.000000000 +0200
+++ evolution-2.30.3/widgets/misc/e-web-view.c	2010-06-24 14:45:27.000000000 +0200
@@ -296,6 +296,10 @@
 	camel_object_unref (inet_addr);
 	camel_url_free (curl);
 
+	clipboard = gtk_clipboard_get (GDK_SELECTION_PRIMARY);
+	gtk_clipboard_set_text (clipboard, text, -1);
+	gtk_clipboard_store (clipboard);
+
 	clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
 	gtk_clipboard_set_text (clipboard, text, -1);
 	gtk_clipboard_store (clipboard);
diff -Nru evolution-data-server-2.30.2.1/aclocal.m4 evolution-data-server-2.30.3/aclocal.m4
--- evolution-data-server-2.30.2.1/aclocal.m4	2010-06-21 17:23:14.000000000 +0200
+++ evolution-data-server-2.30.3/aclocal.m4	2010-08-11 22:55:08.000000000 +0200
@@ -709,8 +709,9 @@
 fi])
 
 
-# nls.m4 serial 3 (gettext-0.15)
-dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
+# nls.m4 serial 5 (gettext-0.18)
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
+dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -728,17 +729,17 @@
 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
-AC_PREREQ(2.50)
+AC_PREREQ([2.50])
 
 AC_DEFUN([AM_NLS],
 [
   AC_MSG_CHECKING([whether NLS is requested])
   dnl Default is enabled NLS
-  AC_ARG_ENABLE(nls,
+  AC_ARG_ENABLE([nls],
     [  --disable-nls           do not use Native Language Support],
     USE_NLS=$enableval, USE_NLS=yes)
-  AC_MSG_RESULT($USE_NLS)
-  AC_SUBST(USE_NLS)
+  AC_MSG_RESULT([$USE_NLS])
+  AC_SUBST([USE_NLS])
 ])
 
 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
diff -Nru evolution-data-server-2.30.2.1/addressbook/backends/webdav/e-book-backend-webdav.c evolution-data-server-2.30.3/addressbook/backends/webdav/e-book-backend-webdav.c
--- evolution-data-server-2.30.2.1/addressbook/backends/webdav/e-book-backend-webdav.c	2010-06-20 14:15:51.000000000 +0200
+++ evolution-data-server-2.30.3/addressbook/backends/webdav/e-book-backend-webdav.c	2010-07-18 19:42:46.000000000 +0200
@@ -137,8 +137,8 @@
 	guint        status;
 
 	message = soup_message_new(SOUP_METHOD_GET, uri);
-	soup_message_headers_append(message->request_headers,
-				    "User-Agent", USERAGENT);
+	soup_message_headers_append (message->request_headers, "User-Agent", USERAGENT);
+	soup_message_headers_append (message->request_headers, "Connection", "close");
 
 	status = soup_session_send_message(webdav->priv->session, message);
 	if (status != 200) {
@@ -198,8 +198,8 @@
 	}
 
 	message = soup_message_new(SOUP_METHOD_PUT, uri);
-	soup_message_headers_append(message->request_headers,
-				    "User-Agent", USERAGENT);
+	soup_message_headers_append (message->request_headers, "User-Agent", USERAGENT);
+	soup_message_headers_append (message->request_headers, "Connection", "close");
 
 	property = e_source_get_property(source, "avoid_ifmatch");
 	if (property != NULL && strcmp(property, "1") == 0) {
@@ -230,7 +230,7 @@
 	e_contact_set(contact, E_CONTACT_UID, NULL);
 	e_contact_set(contact, E_CONTACT_REV, NULL);
 	request = e_vcard_to_string(E_VCARD(contact), EVC_FORMAT_VCARD_30);
-	soup_message_set_request(message, "text/x-vcard", SOUP_MEMORY_TEMPORARY,
+	soup_message_set_request(message, "text/vcard", SOUP_MEMORY_TEMPORARY,
 				 request, strlen(request));
 
 	status   = soup_session_send_message(webdav->priv->session, message);
@@ -362,8 +362,8 @@
 	guint        status;
 
 	message = soup_message_new(SOUP_METHOD_DELETE, uri);
-	soup_message_headers_append(message->request_headers,
-				    "User-Agent", USERAGENT);
+	soup_message_headers_append (message->request_headers, "User-Agent", USERAGENT);
+	soup_message_headers_append (message->request_headers, "Connection", "close");
 
 	status = soup_session_send_message(webdav->priv->session, message);
 	g_object_unref(message);
@@ -656,8 +656,8 @@
 		"<propfind xmlns=\"DAV:\"><prop><getetag/></prop></propfind>";
 
 	message = soup_message_new(SOUP_METHOD_PROPFIND, priv->uri);
-	soup_message_headers_append(message->request_headers,
-				    "User-Agent", USERAGENT);
+	soup_message_headers_append (message->request_headers, "User-Agent", USERAGENT);
+	soup_message_headers_append (message->request_headers, "Connection", "close");
 	soup_message_headers_append(message->request_headers, "Depth", "1");
 	soup_message_set_request(message, "text/xml", SOUP_MEMORY_TEMPORARY,
 			(gchar *) request, strlen(request));
diff -Nru evolution-data-server-2.30.2.1/calendar/backends/caldav/e-cal-backend-caldav.c evolution-data-server-2.30.3/calendar/backends/caldav/e-cal-backend-caldav.c
--- evolution-data-server-2.30.2.1/calendar/backends/caldav/e-cal-backend-caldav.c	2010-06-20 14:15:49.000000000 +0200
+++ evolution-data-server-2.30.3/calendar/backends/caldav/e-cal-backend-caldav.c	2010-07-18 19:42:46.000000000 +0200
@@ -889,11 +889,14 @@
 {
 	gchar *old_uri = NULL;
 
+	g_return_if_fail (msg != NULL);
+
 	if (new_location)
 		old_uri = soup_uri_to_string (soup_message_get_uri (msg), FALSE);
 
 	soup_message_set_flags (msg, SOUP_MESSAGE_NO_REDIRECT);
 	soup_message_add_header_handler (msg, "got_body", "Location", G_CALLBACK (redirect_handler), soup_session);
+	soup_message_headers_append (msg->request_headers, "Connection", "close");
 	soup_session_send_message (soup_session, msg);
 
 	if (new_location) {
diff -Nru evolution-data-server-2.30.2.1/camel/camel.c evolution-data-server-2.30.3/camel/camel.c
--- evolution-data-server-2.30.2.1/camel/camel.c	2010-06-20 14:15:41.000000000 +0200
+++ evolution-data-server-2.30.3/camel/camel.c	2010-07-18 19:42:46.000000000 +0200
@@ -32,6 +32,7 @@
 #include <prthread.h>
 #include "nss.h"      /* Don't use <> here or it will include the system nss.h instead */
 #include <ssl.h>
+#include <errno.h>
 #endif /* HAVE_NSS */
 
 #include <glib.h>
@@ -104,7 +105,7 @@
 	if (nss_init) {
 		gchar *nss_configdir = NULL;
 		gchar *nss_sql_configdir = NULL;
-		SECStatus status;
+		SECStatus status = SECFailure;
 		PRUint16 indx;
 
 		if (nss_initlock == NULL) {
@@ -138,7 +139,9 @@
 #else
 			gchar *user_nss_dir = g_build_filename ( g_get_home_dir (),
 								 ".pki/nssdb", NULL );
-			g_mkdir_with_parents (user_nss_dir, 0700);
+			if (g_mkdir_with_parents (user_nss_dir, 0700))
+				g_warning("Failed to create SQL database directory %s: %s\n",
+					  user_nss_dir, strerror(errno));
 
 			nss_sql_configdir = g_strconcat ("sql:", user_nss_dir, NULL);
 			g_free(user_nss_dir);
@@ -160,15 +163,14 @@
 			0);			/* flags */
 
 		if (status == SECFailure) {
-			g_free (nss_configdir);
-			g_free (nss_sql_configdir);
-			g_warning ("Failed to initialize NSS");
-			PR_Unlock (nss_initlock);
-			return -1;
+			g_warning ("Failed to initialize NSS SQL database in %s: NSS error %d",
+				   nss_sql_configdir, PORT_GetError());
+			/* Fall back to opening the old DBM database */
 		}
-#else
+#endif
 		/* Support old versions of libnss, pre-sqlite support. */
-		status = NSS_InitReadWrite (nss_configdir);
+		if (status == SECFailure)
+			status = NSS_InitReadWrite (nss_configdir);
 		if (status == SECFailure) {
 			/* Fall back to using volatile dbs? */
 			status = NSS_NoDB_Init (nss_configdir);
@@ -180,7 +182,6 @@
 				return -1;
 			}
 		}
-#endif
 
 		nss_initialized = TRUE;
 skip_nss_init:
diff -Nru evolution-data-server-2.30.2.1/camel/camel-mime-filter-tohtml.c evolution-data-server-2.30.3/camel/camel-mime-filter-tohtml.c
--- evolution-data-server-2.30.2.1/camel/camel-mime-filter-tohtml.c	2010-06-20 14:15:39.000000000 +0200
+++ evolution-data-server-2.30.3/camel/camel-mime-filter-tohtml.c	2010-07-18 19:42:46.000000000 +0200
@@ -317,7 +317,7 @@
 			len = inptr - start;
 
 			do {
-				if (camel_url_scanner_scan (html->scanner, start, len, &match)) {
+				if (camel_url_scanner_scan (html->scanner, start, len - (len > 0 && start[len - 1] == 0 ? 1 : 0), &match)) {
 					/* write out anything before the first regex match */
 					outptr = writeln (filter, (const guchar *)start, (const guchar *)start + match.um_so,
 							  outptr, &outend);
diff -Nru evolution-data-server-2.30.2.1/camel/camel-offline-folder.c evolution-data-server-2.30.3/camel/camel-offline-folder.c
--- evolution-data-server-2.30.2.1/camel/camel-offline-folder.c	2010-06-20 14:15:40.000000000 +0200
+++ evolution-data-server-2.30.3/camel/camel-offline-folder.c	2010-07-18 19:42:46.000000000 +0200
@@ -101,7 +101,6 @@
 offline_downsync_sync (CamelSession *session, CamelSessionThreadMsg *mm)
 {
 	struct _offline_downsync_msg *m = (struct _offline_downsync_msg *) mm;
-	CamelMimeMessage *message;
 	gint i;
 
 	camel_operation_start (NULL, _("Downloading new messages for offline mode"));
@@ -111,8 +110,7 @@
 			gint pc = i * 100 / m->changes->uid_added->len;
 
 			camel_operation_progress (NULL, pc);
-			if ((message = camel_folder_get_message (m->folder, m->changes->uid_added->pdata[i], &mm->ex)))
-				camel_object_unref (message);
+			camel_folder_sync_message (m->folder, m->changes->uid_added->pdata[i], &mm->ex);
 		}
 	} else {
 		camel_offline_folder_downsync ((CamelOfflineFolder *) m->folder, "(match-all)", &mm->ex);
diff -Nru evolution-data-server-2.30.2.1/camel/camel-operation.c evolution-data-server-2.30.3/camel/camel-operation.c
--- evolution-data-server-2.30.2.1/camel/camel-operation.c	2010-06-20 14:15:45.000000000 +0200
+++ evolution-data-server-2.30.3/camel/camel-operation.c	2010-07-22 13:29:44.000000000 +0200
@@ -492,6 +492,8 @@
 	va_list ap;
 	gchar *msg;
 	struct _status_stack *s;
+	CamelOperationStatusFunc status_func;
+	gpointer status_data;
 
 	if (cc == NULL)
 		cc = co_getcc();
@@ -516,9 +518,13 @@
 	cc->lastreport = s;
 	cc->status_stack = g_slist_prepend(cc->status_stack, s);
 
+	/* This avoids a race with camel_operation_mute() after we unlock. */
+	status_func = cc->status;
+	status_data = cc->status_data;
+
 	UNLOCK();
 
-	cc->status(cc, msg, CAMEL_OPERATION_START, cc->status_data);
+	status_func (cc, msg, CAMEL_OPERATION_START, status_data);
 
 	d(printf("start '%s'\n", msg, pc));
 }
@@ -543,11 +549,16 @@
 	if (cc == NULL)
 		cc = co_getcc();
 
-	if (cc == NULL || cc->status == NULL)
+	if (cc == NULL)
 		return;
 
 	LOCK();
 
+	if (cc->status == NULL) {
+		UNLOCK();
+		return;
+	}
+
 	va_start(ap, what);
 	msg = g_strdup_vprintf(what, ap);
 	va_end(ap);
@@ -560,9 +571,6 @@
 	d(printf("start '%s'\n", msg, pc));
 
 	UNLOCK();
-
-	/* we dont report it yet */
-	/*cc->status(cc, msg, CAMEL_OPERATION_START, cc->status_data);*/
 }
 
 static guint stamp(void)
@@ -592,6 +600,8 @@
 	guint now;
 	struct _status_stack *s;
 	gchar *msg = NULL;
+	CamelOperationStatusFunc status_func;
+	gpointer status_data;
 
 	if (cc == NULL)
 		cc = co_getcc();
@@ -613,10 +623,12 @@
 	   they started, then they update every second */
 	now = stamp();
 	if (cc->status_update == now) {
-		cc = NULL;
+		UNLOCK();
+		return;
 	} else if (s->flags & CAMEL_OPERATION_TRANSIENT) {
 		if (s->stamp + CAMEL_OPERATION_TRANSIENT_DELAY > now) {
-			cc = NULL;
+			UNLOCK();
+			return;
 		} else {
 			cc->status_update = now;
 			cc->lastreport = s;
@@ -628,12 +640,15 @@
 		msg = g_strdup(s->msg);
 	}
 
+	/* This avoids a race with camel_operation_mute() after we unlock. */
+	status_func = cc->status;
+	status_data = cc->status_data;
+
 	UNLOCK();
 
-	if (cc) {
-		cc->status(cc, msg, pc, cc->status_data);
-		g_free(msg);
-	}
+	status_func (cc, msg, pc, status_data);
+
+	g_free(msg);
 }
 
 /**
@@ -662,6 +677,8 @@
 	guint now;
 	gchar *msg = NULL;
 	gint pc = 0;
+	CamelOperationStatusFunc status_func;
+	gpointer status_data;
 
 	if (cc == NULL)
 		cc = co_getcc();
@@ -712,10 +729,14 @@
 	g_free(s);
 	cc->status_stack = g_slist_delete_link(cc->status_stack, cc->status_stack);
 
+	/* This avoids a race with camel_operation_mute() after we unlock. */
+	status_func = cc->status;
+	status_data = cc->status_data;
+
 	UNLOCK();
 
 	if (msg) {
-		cc->status(cc, msg, pc, cc->status_data);
-		g_free(msg);
+		status_func (cc, msg, pc, status_data);
+		g_free (msg);
 	}
 }
diff -Nru evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-folder.c evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-folder.c
--- evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-folder.c	2010-06-20 14:15:36.000000000 +0200
+++ evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-folder.c	2010-08-11 20:24:40.000000000 +0200
@@ -39,6 +39,7 @@
 #include  "camel/camel-string-utils.h"
 #include "camel-folder-search.h"
 
+#include "camel-imapx-utils.h"
 #include "camel-imapx-store.h"
 #include "camel-imapx-folder.h"
 #include "camel-imapx-summary.h"
@@ -50,7 +51,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#define d(x)
+#define d(x) camel_imapx_debug(debug, x)
 
 #define CF_CLASS(o) (CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(o)))
 static CamelObjectClass *parent_class;
@@ -107,6 +108,8 @@
 	ifolder->ignore_recent = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify) g_free, NULL);
 	ifolder->exists_on_server = 0;
 	ifolder->unread_on_server = 0;
+	ifolder->modseq_on_server = 0;
+	ifolder->uidnext_on_server = 0;
 
 	istore = (CamelIMAPXStore *) store;
 	if (!g_ascii_strcasecmp (folder_name, "INBOX")) {
@@ -126,25 +129,33 @@
 imapx_refresh_info (CamelFolder *folder, CamelException *ex)
 {
 	CamelIMAPXStore *istore = (CamelIMAPXStore *)folder->parent_store;
+	CamelIMAPXServer *server;
 
 	if (CAMEL_OFFLINE_STORE (istore)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
 		return;
 
 	camel_service_connect((CamelService *)istore, ex);
-	if (istore->server && camel_imapx_server_connect (istore->server, TRUE, ex))
-		camel_imapx_server_refresh_info(istore->server, folder, ex);
+	server = camel_imapx_store_get_server(istore, ex);
+	if (server) {
+		camel_imapx_server_refresh_info(server, folder, ex);
+		camel_object_unref(server);
+	}
 }
 
 static void
 imapx_expunge (CamelFolder *folder, CamelException *ex)
 {
 	CamelIMAPXStore *is = (CamelIMAPXStore *)folder->parent_store;
+	CamelIMAPXServer *server;
 
 	if (CAMEL_OFFLINE_STORE (is)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
 		return;
 
-	if (is->server && camel_imapx_server_connect (is->server, TRUE, ex))
-		camel_imapx_server_expunge(is->server, folder, ex);
+	server = camel_imapx_store_get_server(is, ex);
+	if (server) {
+		camel_imapx_server_expunge(server, folder, ex);
+		camel_object_unref(server);
+	}
 
 }
 
@@ -152,6 +163,7 @@
 imapx_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
 {
 	CamelIMAPXStore *is = (CamelIMAPXStore *)folder->parent_store;
+	CamelIMAPXServer *server;
 	CamelException eex = CAMEL_EXCEPTION_INITIALISER;
 
 	if (CAMEL_OFFLINE_STORE (is)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
@@ -160,17 +172,20 @@
 	if (!ex)
 		ex = &eex;
 
-	if (is->server && camel_imapx_server_connect (is->server, TRUE, ex))
-		camel_imapx_server_sync_changes (is->server, folder, ex);
+	server = camel_imapx_store_get_server(is, ex);
+	if (server)
+		camel_imapx_server_sync_changes (server, folder, ex);
 
 	/* Sync twice - make sure deleted flags are written out,
 	   then sync again incase expunge changed anything */
 	camel_exception_clear(ex);
 
-	if (is->server && expunge) {
-		camel_imapx_server_expunge(is->server, folder, ex);
+	if (server && expunge) {
+		camel_imapx_server_expunge(server, folder, ex);
 		camel_exception_clear(ex);
 	}
+	if (server)
+		camel_object_unref(server);
 }
 
 static CamelMimeMessage *
@@ -180,6 +195,7 @@
 	CamelStream *stream = NULL;
 	CamelIMAPXStore *istore = (CamelIMAPXStore *)folder->parent_store;
 	CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *) folder;
+	CamelIMAPXServer *server;
 	const gchar *path = NULL;
 	gboolean offline_message = FALSE;
 
@@ -200,10 +216,14 @@
 		if (CAMEL_OFFLINE_STORE (istore)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
 			return NULL;
 
-		if (istore->server && camel_imapx_server_connect (istore->server, TRUE, ex)) {
-			stream = camel_imapx_server_get_message(istore->server, folder, uid, ex);
+		server = camel_imapx_store_get_server(istore, ex);
+		if (server) {
+			stream = camel_imapx_server_get_message(server, folder, uid, ex);
+			camel_object_unref(server);
 		} else {
-			camel_exception_setv(ex, 1, "not authenticated");
+			/* It should _always_ be set */
+			if (!camel_exception_is_set (ex))
+				camel_exception_setv(ex, 1, "not authenticated");
 			return NULL;
 		}
 	}
@@ -227,12 +247,16 @@
 imapx_sync_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
 {
 	CamelIMAPXStore *istore = (CamelIMAPXStore *)folder->parent_store;
+	CamelIMAPXServer *server;
 
 	if (CAMEL_OFFLINE_STORE (istore)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
 		return;
 
-	if (istore->server && camel_imapx_server_connect (istore->server, TRUE, ex))
-		camel_imapx_server_sync_message (istore->server, folder, uid, ex);
+	server = camel_imapx_store_get_server(istore, ex);
+	if (server) {
+		camel_imapx_server_sync_message (server, folder, uid, ex);
+		camel_object_unref(server);
+	}
 }
 
 static void
@@ -241,12 +265,16 @@
 		      gboolean delete_originals, CamelException *ex)
 {
 	CamelIMAPXStore *istore = (CamelIMAPXStore *) source->parent_store;
+	CamelIMAPXServer *server;
 
 	if (CAMEL_OFFLINE_STORE (istore)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
 		return;
 
-	if (istore->server && camel_imapx_server_connect (istore->server, TRUE, ex))
-		camel_imapx_server_copy_message (istore->server, source, dest, uids, delete_originals, ex);
+	server = camel_imapx_store_get_server(istore, ex);
+	if (server) {
+		camel_imapx_server_copy_message (server, source, dest, uids, delete_originals, ex);
+		camel_object_unref(server);
+	}
 
 	imapx_refresh_info (dest, ex);
 }
@@ -255,6 +283,7 @@
 imapx_append_message(CamelFolder *folder, CamelMimeMessage *message, const CamelMessageInfo *info, gchar **appended_uid, CamelException *ex)
 {
 	CamelIMAPXStore *istore = (CamelIMAPXStore *)folder->parent_store;
+	CamelIMAPXServer *server;
 
 	if (CAMEL_OFFLINE_STORE (istore)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
 		return;
@@ -262,8 +291,11 @@
 	if (appended_uid)
 		*appended_uid = NULL;
 
-	if (istore->server && camel_imapx_server_connect (istore->server, TRUE, ex))
-		camel_imapx_server_append_message(istore->server, folder, message, info, ex);
+	server = camel_imapx_store_get_server(istore, ex);
+	if (server) {
+		camel_imapx_server_append_message(server, folder, message, info, ex);
+		camel_object_unref(server);
+	}
 }
 
 gchar *
diff -Nru evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-folder.h evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-folder.h
--- evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-folder.h	2010-06-20 14:15:36.000000000 +0200
+++ evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-folder.h	2010-08-11 20:24:40.000000000 +0200
@@ -47,6 +47,9 @@
 
 	guint32 exists_on_server;
 	guint32 unread_on_server;
+	guint64 modseq_on_server;
+	guint64 uidvalidity_on_server;
+	guint32 uidnext_on_server;
 
 	/* hash table of UIDs to ignore as recent when updating folder */
 	GHashTable *ignore_recent;
diff -Nru evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-provider.c evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-provider.c
--- evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-provider.c	2010-06-20 14:15:36.000000000 +0200
+++ evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-provider.c	2010-08-11 20:24:40.000000000 +0200
@@ -40,8 +40,12 @@
 static gint  imapx_url_equal (gconstpointer a, gconstpointer b);
 
 CamelProviderConfEntry imapx_conf_entries[] = {
-		{ CAMEL_PROVIDER_CONF_SECTION_START, "mailcheck", NULL,
+	{ CAMEL_PROVIDER_CONF_SECTION_START, "mailcheck", NULL,
 	  N_("Checking for New Mail") },
+/* Not for stable branch -- new string. Set it with gconf-editor instead
+	{ CAMEL_PROVIDER_CONF_CHECKBOX, "use_qresync", NULL,
+	  N_("Use _Quick Resync if the server supports it"), "1" },
+*/
 	{ CAMEL_PROVIDER_CONF_CHECKBOX, "use_idle", NULL,
 	  N_("Use I_dle if the server supports it"), "1" },
 	{ CAMEL_PROVIDER_CONF_CHECKBOX, "check_all", NULL,
diff -Nru evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-server.c evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-server.c
--- evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-server.c	2010-06-20 14:15:36.000000000 +0200
+++ evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-server.c	2010-08-11 20:24:40.000000000 +0200
@@ -3,6 +3,7 @@
 #include <config.h>
 #endif
 
+#include <time.h>
 #include <errno.h>
 #include <string.h>
 #include <glib.h>
@@ -52,8 +53,8 @@
 #include "camel-imapx-store.h"
 #include "camel-imapx-summary.h"
 
-#define c(x)
-#define e(x) 
+#define c(x) camel_imapx_debug(command, x)
+#define e(x) camel_imapx_debug(extra, x)
 
 #define CFS_CLASS(x) ((CamelFolderSummaryClass *)((CamelObject *)x)->klass)
 
@@ -62,6 +63,9 @@
 #define QUEUE_LOCK(x) (g_static_rec_mutex_lock(&(x)->queue_lock))
 #define QUEUE_UNLOCK(x) (g_static_rec_mutex_unlock(&(x)->queue_lock))
 
+#define IDLE_LOCK(x) (g_mutex_lock((x)->idle_lock))
+#define IDLE_UNLOCK(x) (g_mutex_unlock((x)->idle_lock))
+
 /* All comms with server go here */
 
 /* Try pipelining fetch requests, 'in bits' */
@@ -89,6 +93,8 @@
 void imapx_uidset_init(struct _uidset_state *ss, gint total, gint limit);
 gint imapx_uidset_done(struct _uidset_state *ss, struct _CamelIMAPXCommand *ic);
 gint imapx_uidset_add(struct _uidset_state *ss, struct _CamelIMAPXCommand *ic, const gchar *uid);
+static gboolean imapx_command_idle_stop (CamelIMAPXServer *is, CamelException *ex);
+static gint imapx_continuation(CamelIMAPXServer *imap, CamelException *ex, gboolean litplus);
 static gboolean imapx_disconnect (CamelIMAPXServer *is);
 static gint imapx_uid_cmp(gconstpointer ap, gconstpointer bp, gpointer data);
 
@@ -103,6 +109,7 @@
 	CAMEL_IMAPX_COMMAND_FILE,
 	CAMEL_IMAPX_COMMAND_STRING,
 	CAMEL_IMAPX_COMMAND_MASK = 0xff,
+	CAMEL_IMAPX_COMMAND_LITERAL_PLUS = 0x4000, /* continuation with literal+ */
 	CAMEL_IMAPX_COMMAND_CONTINUATION = 0x8000 /* does this command expect continuation? */
 } camel_imapx_command_part_t;
 
@@ -127,11 +134,12 @@
 struct _CamelIMAPXCommand {
 	struct _CamelIMAPXCommand *next, *prev;
 
+	CamelIMAPXServer *is;
 	gint pri;
 
 	const gchar *name;	/* command name/type (e.g. FETCH) */
 
-	gchar *select;		/* folder to select */
+	CamelFolder *select;		/* folder to select */
 
 	struct _status_info *status; /* status for command, indicates it is complete if != NULL */
 
@@ -153,7 +161,7 @@
 	struct _CamelIMAPXJob *job;
 };
 
-CamelIMAPXCommand *camel_imapx_command_new(const gchar *name, const gchar *select, const gchar *fmt, ...);
+CamelIMAPXCommand *camel_imapx_command_new(CamelIMAPXServer *is, const gchar *name, CamelFolder *select, const gchar *fmt, ...);
 void camel_imapx_command_add(CamelIMAPXCommand *ic, const gchar *fmt, ...);
 void camel_imapx_command_free(CamelIMAPXCommand *ic);
 void camel_imapx_command_close(CamelIMAPXCommand *ic);
@@ -162,8 +170,10 @@
 /* states for the connection? */
 enum {
 	IMAPX_DISCONNECTED,
+	IMAPX_SHUTDOWN,
 	IMAPX_CONNECTED,
 	IMAPX_AUTHENTICATED,
+	IMAPX_INITIALISED,
 	IMAPX_SELECTED
 };
 
@@ -254,6 +264,8 @@
 			/* used for biulding uidset stuff */
 			gint index;
 			gint last_index;
+			gboolean update_unseen;
+			gboolean dummy_exception;
 			struct _uidset_state uidset;
 			/* changes during refresh */
 			CamelFolderChangeInfo *changes;
@@ -264,6 +276,7 @@
 			guint32 off_set;
 			GArray *on_user; /* imapx_flag_change */
 			GArray *off_user;
+			gint unread_change;
 		} sync_changes;
 		struct {
 			gchar *path;
@@ -280,6 +293,7 @@
 		struct {
 			gchar *pattern;
 			guint32 flags;
+			const gchar *ext;
 			GHashTable *folders;
 		} list;
 
@@ -297,6 +311,7 @@
 	} u;
 };
 
+static CamelIMAPXJob *imapx_match_active_job (CamelIMAPXServer *is, guint32 type, const gchar *uid);
 static void imapx_job_done (CamelIMAPXServer *is, CamelIMAPXJob *job);
 static void imapx_run_job (CamelIMAPXServer *is, CamelIMAPXJob *job);
 static void imapx_job_fetch_new_messages_start (CamelIMAPXServer *is, CamelIMAPXJob *job);
@@ -305,15 +320,28 @@
 static gint imapx_uids_array_cmp (gconstpointer ap, gconstpointer bp);
 static void imapx_server_sync_changes(CamelIMAPXServer *is, CamelFolder *folder, gint pri, CamelException *ex);
 
+enum _idle_state {
+	IMAPX_IDLE_OFF,
+	IMAPX_IDLE_PENDING,	/* Queue is idle; waiting to send IDLE command
+				   soon if nothing more interesting happens */
+	IMAPX_IDLE_ISSUED,	/* Sent IDLE command; waiting for response */
+	IMAPX_IDLE_STARTED,	/* IDLE continuation received; IDLE active */
+	IMAPX_IDLE_CANCEL,	/* Cancelled from ISSUED state; need to send
+				   DONE as soon as we receive continuation */
+};
+#define IMAPX_IDLE_DWELL_TIME	2 /* Number of seconds to remain in PENDING
+				     state waiting for other commands to be
+				     queued, before actually sending IDLE */
+
 typedef struct _CamelIMAPXIdle CamelIMAPXIdle;
+
 struct _CamelIMAPXIdle {
 	GMutex *idle_lock;
 	EFlag *idle_start_watch;
 	GThread *idle_thread;
 
-	gboolean idle_issue_done;
-	gboolean in_idle;
-	gboolean started;
+	time_t started;
+	enum _idle_state state;
 	gboolean idle_exit;
 };
 
@@ -322,7 +350,7 @@
 static void imapx_start_idle (CamelIMAPXServer *is);
 static void imapx_exit_idle (CamelIMAPXServer *is);
 static void imapx_init_idle (CamelIMAPXServer *is);
-static void imapx_stop_idle (CamelIMAPXServer *is, CamelException *ex);
+static gboolean imapx_stop_idle (CamelIMAPXServer *is, CamelException *ex);
 static void camel_imapx_server_idle (CamelIMAPXServer *is, CamelFolder *folder, CamelException *ex);
 
 enum {
@@ -439,11 +467,10 @@
 			camel_stream_write_to_stream((CamelStream *)ob, (CamelStream *)null);
 			camel_stream_reset((CamelStream *)ob);
 		}
-		type |= CAMEL_IMAPX_COMMAND_CONTINUATION;
+		type |= CAMEL_IMAPX_COMMAND_LITERAL_PLUS;
 		camel_object_ref(ob);
 		ob_size = null->written;
 		camel_object_unref((CamelObject *)null);
-		camel_stream_printf((CamelStream *)ic->mem, "{%u}", ob_size);
 		break;
 	}
 	case CAMEL_IMAPX_COMMAND_AUTH: {
@@ -466,20 +493,28 @@
 		} else
 			o = NULL;
 
-		camel_stream_printf((CamelStream *)ic->mem, "{%u}", ob_size);
-		type |= CAMEL_IMAPX_COMMAND_CONTINUATION;
+		type |= CAMEL_IMAPX_COMMAND_LITERAL_PLUS;
 		break;
 	}
 	case CAMEL_IMAPX_COMMAND_STRING:
 		o = g_strdup(o);
 		ob_size = strlen(o);
-		camel_stream_printf((CamelStream *)ic->mem, "{%u}", ob_size);
-		type |= CAMEL_IMAPX_COMMAND_CONTINUATION;
+		type |= CAMEL_IMAPX_COMMAND_LITERAL_PLUS;
 		break;
 	default:
 		ob_size = 0;
 	}
 
+	if (type & CAMEL_IMAPX_COMMAND_LITERAL_PLUS) {
+		if (ic->is->cinfo->capa & IMAPX_CAPABILITY_LITERALPLUS) {
+			camel_stream_printf((CamelStream *)ic->mem, "{%u+}", ob_size);
+		} else {
+			type &= ~CAMEL_IMAPX_COMMAND_LITERAL_PLUS;
+			type |= CAMEL_IMAPX_COMMAND_CONTINUATION;
+			camel_stream_printf((CamelStream *)ic->mem, "{%u}", ob_size);
+		}
+	}
+
 	cp = g_malloc0(sizeof(*cp));
 	cp->type = type;
 	cp->ob_size = ob_size;
@@ -591,6 +626,7 @@
 				case 's': /* simple string */
 					s = va_arg(ap, gchar *);
 					c(printf("got string '%s'\n", s));
+				output_string:
 					if (*s) {
 						guchar mask = imapx_is_mask(s);
 
@@ -617,6 +653,10 @@
 					} else {
 						camel_stream_write((CamelStream *)ic->mem, "\"\"", 2);
 					}
+					if (encoded) {
+						g_free(encoded);
+						encoded = NULL;
+					}
 					break;
 				case 'f': /* imap folder name */
 					folder = va_arg(ap, CamelFolder *);
@@ -628,9 +668,12 @@
 					} else
 						encoded = camel_utf8_utf7 (folder->full_name);
 
-					camel_stream_printf((CamelStream *)ic->mem, "\"%s\"", encoded?encoded:"");
+					if (encoded) {
+						s = encoded;
+						goto output_string;
+					} else 
+						camel_stream_write((CamelStream *)ic->mem, "\"\"", 2);
 
-					g_free (encoded);
 					break;
 				case 'F': /* IMAP flags set */
 					f = va_arg(ap, guint32);
@@ -678,7 +721,7 @@
 }
 
 CamelIMAPXCommand *
-camel_imapx_command_new(const gchar *name, const gchar *select, const gchar *fmt, ...)
+camel_imapx_command_new(CamelIMAPXServer *is, const gchar *name, CamelFolder *select, const gchar *fmt, ...)
 {
 	CamelIMAPXCommand *ic;
 	static gint tag = 0;
@@ -688,7 +731,8 @@
 	ic->tag = tag++;
 	ic->name = name;
 	ic->mem = (CamelStreamMem *)camel_stream_mem_new();
-	ic->select = g_strdup(select);
+	ic->select = select;
+	ic->is = is;
 	camel_dlist_init(&ic->parts);
 	ic->ex = camel_exception_new ();
 
@@ -726,8 +770,7 @@
 	if (ic->mem)
 		camel_object_unref((CamelObject *)ic->mem);
 	imapx_free_status(ic->status);
-	g_free(ic->select);
-
+ 
 	while ((cp = ((CamelIMAPXCommandPart *)camel_dlist_remhead(&ic->parts)))) {
 		g_free(cp->data);
 		if (cp->ob) {
@@ -774,29 +817,52 @@
 	/* TODO: If we support literal+ we should be able to write the whole command out
 	   at this point .... >here< */
 
-	if (cp->type & CAMEL_IMAPX_COMMAND_CONTINUATION)
+	if (cp->type & (CAMEL_IMAPX_COMMAND_CONTINUATION|CAMEL_IMAPX_COMMAND_LITERAL_PLUS))
 		imap->literal = ic;
 
 	camel_dlist_addtail(&imap->active, (CamelDListNode *)ic);
 
 	g_static_rec_mutex_lock (&imap->ostream_lock);
 
-	c(printf("Staring command (active=%d,%s) %c%05u %s\r\n", camel_dlist_length(&imap->active), imap->literal?" literal":"", imap->tagprefix, ic->tag, cp->data));
+	c(printf("Starting command (active=%d,%s) %c%05u %s\r\n", camel_dlist_length(&imap->active), imap->literal?" literal":"", imap->tagprefix, ic->tag, cp->data));
 	if (!imap->stream || camel_stream_printf((CamelStream *)imap->stream, "%c%05u %s\r\n", imap->tagprefix, ic->tag, cp->data) == -1) {
+		camel_exception_set (ic->ex, 1, "Failed to issue the command");
+	err:
 		g_static_rec_mutex_unlock (&imap->ostream_lock);
 
-		camel_exception_set (ic->ex, 1, "Failed to issue the command");
 		camel_dlist_remove ((CamelDListNode *)ic);
 		if (ic && ic->complete)
 			ic->complete (imap, ic);
 		return FALSE;
 	}
+	while (imap->literal == ic &&
+	       ic->current->type & CAMEL_IMAPX_COMMAND_LITERAL_PLUS) {
+		/* Sent LITERAL+ continuation immediately */
+		imapx_continuation(imap, ic->ex, TRUE);
+		if (camel_exception_is_set(ic->ex))
+			goto err;
+	}
 
 	g_static_rec_mutex_unlock (&imap->ostream_lock);
 
 	return TRUE;
 }
 
+static gboolean duplicate_fetch_or_refresh(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
+{
+	if (!ic->job)
+		return FALSE;
+
+	if (!(ic->job->type & (IMAPX_JOB_FETCH_NEW_MESSAGES|IMAPX_JOB_REFRESH_INFO)))
+		return FALSE;
+
+	if (imapx_match_active_job (is, IMAPX_JOB_FETCH_NEW_MESSAGES|IMAPX_JOB_REFRESH_INFO, NULL)) {
+		c(printf("Not yet sending duplicate fetch/refresh %s command\n", ic->name));
+		return TRUE;
+	}
+
+	return FALSE;
+}
 /* See if we can start another task yet.
 
 	If we're waiting for a literal, we cannot proceed.
@@ -823,11 +889,32 @@
 	gint pri = -128;
 
 	c(printf("** Starting next command\n"));
-	if (is->literal != NULL || is->select_pending != NULL) {
-		c(if (is->select_pending))
-			c(printf("* no, waiting for literal/pending select '%s'\n", is->select_pending->full_name));
+	if (is->literal) {
+		c(printf("* no; waiting for literal '%s'\n", is->literal->name));
+		return;
+	}
+
+	if (is->select_pending) {
+		c(printf("-- Checking job queue for non-folder jobs\n"));
+		ic = (CamelIMAPXCommand *)is->queue.head;
+		nc = ic->next;
+		while (nc && is->literal == NULL && count < MAX_COMMANDS && ic->pri >= pri) {
+			c(printf("-- %3d '%s'?\n", (gint)ic->pri, ic->name));
+			if (!ic->select) {
+				c(printf("--> starting '%s'\n", ic->name));
+				pri = ic->pri;
+				camel_dlist_remove((CamelDListNode *)ic);
+				imapx_command_start(is, ic);
+				count++;
+			}
+			ic = nc;
+			nc = nc->next;
+		}
 
-		/* TODO prolly start the store operations which do not require any folder to be selected */
+		if (count)
+			return;
+
+		c(printf("* no, waiting for pending select '%s'\n", camel_folder_get_full_name (is->select_pending)));
 		return;
 	}
 
@@ -835,9 +922,13 @@
 		gboolean empty = imapx_is_command_queue_empty (is);
 
 		if (imapx_in_idle (is) && !camel_dlist_empty (&is->queue)) {
-			imapx_stop_idle (is, ex);
-			c(printf ("waiting for idle to stop \n"));
-			return;
+			/* if imapx_stop_idle() returns FALSE, it was only
+			   pending and we can go ahead and send a new command
+			   immediately. If it returns TRUE, we must wait. */
+			if (imapx_stop_idle (is, ex)) {
+				c(printf ("waiting for idle to stop \n"));
+				return;
+			}
 		} else if (empty && !imapx_in_idle (is)) {
 			imapx_start_idle (is);
 			c(printf ("starting idle \n"));
@@ -853,8 +944,9 @@
 	}
 
 	/* See if any queued jobs on this select first */
-	if (is->select) {
-		c(printf("- we're selected on '%s', current jobs?\n", is->select));
+	if (is->select_folder) {
+		c(printf("- we're selected on '%s', current jobs?\n",
+			 camel_folder_get_full_name(is->select_folder)));
 		for (ic = (CamelIMAPXCommand *)is->active.head;ic->next;ic=ic->next) {
 			c(printf("-  %3d '%s'\n", (gint)ic->pri, ic->name));
 			if (ic->pri > pri)
@@ -872,14 +964,19 @@
 		nc = ic->next;
 		while (nc && is->literal == NULL && count < MAX_COMMANDS && ic->pri >= pri) {
 			c(printf("-- %3d '%s'?\n", (gint)ic->pri, ic->name));
-			if (ic->select == NULL || strcmp(ic->select, is->select) == 0) {
+			if (!ic->select || ((ic->select == is->select_folder) &&
+					    !duplicate_fetch_or_refresh(is, ic))) {
 				c(printf("--> starting '%s'\n", ic->name));
 				pri = ic->pri;
 				camel_dlist_remove((CamelDListNode *)ic);
 				imapx_command_start(is, ic);
 				count++;
-			} else
-				break;
+			} else {
+				/* This job isn't for the selected folder, but we don't want to
+				   consider jobs with _lower_ priority than this, even if they
+				   are for the selected folder. */
+				pri = ic->pri;
+			}
 			ic = nc;
 			nc = nc->next;
 		}
@@ -892,14 +989,17 @@
 
 	/* If we need to select a folder for the first command, do it now, once
 	   it is complete it will re-call us if it succeeded */
-	if (ic->job->folder) {
-		imapx_select(is, ic->job->folder, FALSE, ex);
+	if (ic->select) {
+		c(printf("Selecting folder '%s' for command '%s'(%p)\n",
+			 camel_folder_get_full_name(ic->select), ic->name, ic));
+		imapx_select(is, ic->select, FALSE, ex);
 	} else {
 		pri = ic->pri;
 		nc = ic->next;
 		count = 0;
 		while (nc && is->literal == NULL && count < MAX_COMMANDS && ic->pri >= pri) {
-			if (ic->select == NULL || (is->select && strcmp(ic->select, is->select))) {
+			if (!ic->select || (ic->select == is->select_folder &&
+					    !duplicate_fetch_or_refresh(is, ic))) {
 				c(printf("* queueing job %3d '%s'\n", (gint)ic->pri, ic->name));
 				pri = ic->pri;
 				camel_dlist_remove((CamelDListNode *)ic);
@@ -937,6 +1037,15 @@
 
 	QUEUE_LOCK(is);
 
+	if (is->state == IMAPX_SHUTDOWN) {
+		c(printf("refuse to queue job on disconnected server\n"));
+		camel_exception_set(ic->ex, 1, "Server disconnected");
+		QUEUE_UNLOCK(is);
+		if (ic->complete)
+			ic->complete(is, ic);
+		return;
+	}
+
 	scan = (CamelIMAPXCommand *)is->queue.head;
 	if (scan->next == NULL)
 		camel_dlist_addtail(&is->queue, (CamelDListNode *)ic);
@@ -982,20 +1091,19 @@
 }
 
 static gboolean
-imapx_job_matches (const gchar *folder_name, CamelIMAPXJob *job, guint32 type, const gchar *uid)
+imapx_job_matches (CamelFolder *folder, CamelIMAPXJob *job, guint32 type, const gchar *uid)
 {
 	switch (job->type) {
 		case IMAPX_JOB_GET_MESSAGE:
-			if (folder_name	&& strcmp(job->folder->full_name, folder_name) == 0
-					&& strcmp(job->u.get_message.uid, uid) == 0)
+			if (folder == job->folder && 
+			    strcmp(job->u.get_message.uid, uid) == 0)
 				return TRUE;
 			break;
 		case IMAPX_JOB_FETCH_NEW_MESSAGES:
 		case IMAPX_JOB_REFRESH_INFO:
 		case IMAPX_JOB_SYNC_CHANGES:
 		case IMAPX_JOB_EXPUNGE:
-			if (folder_name
-					&& strcmp(job->folder->full_name, folder_name) == 0)
+			if (folder == job->folder)
 				return TRUE;
 			break;
 		case IMAPX_JOB_LIST:
@@ -1019,7 +1127,7 @@
 		if (!job || !(job->type & type))
 			continue;
 
-		if (imapx_job_matches (is->select, job, type, uid))
+		if (imapx_job_matches (is->select_folder, job, type, uid))
 			goto found;
 	}
 	job = NULL;
@@ -1029,7 +1137,7 @@
 }
 
 static CamelIMAPXJob *
-imapx_is_job_in_queue (CamelIMAPXServer *is, const gchar *folder_name, guint32 type, const gchar *uid)
+imapx_is_job_in_queue (CamelIMAPXServer *is, CamelFolder *folder, guint32 type, const gchar *uid)
 {
 	CamelDListNode *node;
 	CamelIMAPXJob *job = NULL;
@@ -1043,7 +1151,7 @@
 		if (!job || !(job->type & type))
 			continue;
 
-		if (imapx_job_matches (folder_name, job, type, uid)) {
+		if (imapx_job_matches (folder, job, type, uid)) {
 			found = TRUE;
 			break;
 		}
@@ -1057,6 +1165,40 @@
 		return NULL;
 }
 
+static void
+imapx_expunge_uid_from_summary(CamelIMAPXServer *imap, gchar *uid, gboolean unsolicited)
+{
+	CamelMessageInfo *mi;
+	CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *)imap->select_folder;
+
+	if (unsolicited && ifolder->exists_on_server)
+		ifolder->exists_on_server--;
+
+	if (imap->changes == NULL)
+		imap->changes = camel_folder_change_info_new();
+
+	mi = camel_folder_summary_uid (imap->select_folder->summary, uid);
+	if (mi) {
+		imapx_update_summary_for_removed_message (mi, imap->select_folder, unsolicited);
+		camel_message_info_free (mi);
+	}
+
+	camel_folder_summary_remove_uid_fast (imap->select_folder->summary, uid);
+	imap->expunged = g_slist_prepend (imap->expunged, uid);
+
+	camel_folder_change_info_remove_uid (imap->changes, uid);
+
+	if (imapx_idle_supported (imap) && imapx_in_idle (imap)) {
+		camel_db_delete_uids (imap->store->cdb_w, imap->select_folder->full_name, imap->expunged, NULL);
+		imapx_update_store_summary (imap->select_folder);
+		camel_object_trigger_event(imap->select_folder, "folder_changed", imap->changes);
+
+		g_slist_foreach (imap->expunged, (GFunc) g_free, NULL);
+		imap->expunged = NULL;
+		camel_folder_change_info_clear (imap->changes);
+	}
+}
+
 /* handle any untagged responses */
 static gint
 imapx_untagged(CamelIMAPXServer *imap, CamelException *ex)
@@ -1106,37 +1248,47 @@
 		c(printf("expunged: %d\n", id));
 		if (imap->select_folder) {
 			gchar *uid = NULL;
-			CamelMessageInfo *mi;
 
 			uid = camel_folder_summary_uid_from_index (imap->select_folder->summary, expunge - 1);
 			if (!uid)
 				break;
 
-			if (imap->changes == NULL)
-				imap->changes = camel_folder_change_info_new();
-
-			mi = camel_folder_summary_uid (imap->select_folder->summary, uid);
-			if (mi) {
-				imapx_update_summary_for_removed_message (mi, imap->select_folder);
-				camel_message_info_free (mi);
-			}
-
-			camel_folder_summary_remove_uid_fast (imap->select_folder->summary, uid);
-			imap->expunged = g_slist_prepend (imap->expunged, uid);
+			imapx_expunge_uid_from_summary(imap, uid, TRUE);
+		}
 
-			camel_folder_change_info_remove_uid (imap->changes, uid);
+		break;
+	}
+	case IMAPX_VANISHED: {
+		GPtrArray *uids;
+		gboolean unsolicited = TRUE;
+		int i;
+		guint len;
+		guchar *token;
+		gint tok;
 
-			if (imapx_idle_supported (imap) && imapx_in_idle (imap)) {
-				camel_db_delete_uids (imap->store->cdb_w, imap->select_folder->full_name, imap->expunged, NULL);
-				imapx_update_store_summary (imap->select_folder);
-				camel_object_trigger_event(imap->select_folder, "folder_changed", imap->changes);
-
-				g_slist_foreach (imap->expunged, (GFunc) g_free, NULL);
-				imap->expunged = NULL;
-				camel_folder_change_info_clear (imap->changes);
+		tok = camel_imapx_stream_token (imap->stream, &token, &len, ex);
+		if (camel_exception_is_set(ex))
+			return -1;
+		if (tok == '(') {
+			unsolicited = FALSE;
+			while (tok != ')') {
+				/* We expect this to be 'EARLIER' */
+				tok = camel_imapx_stream_token(imap->stream, &token, &len, ex);
+				if (camel_exception_is_set(ex))
+					return -1;
 			}
-		}
+		} else
+			camel_imapx_stream_ungettoken(imap->stream, tok, token, len);
 
+		uids = imapx_parse_uids(imap->stream, ex);
+		if (camel_exception_is_set(ex))
+			return -1;
+		for (i = 0; i < uids->len; i++) {
+			gchar *uid = g_strdup_printf("%u", GPOINTER_TO_UINT(g_ptr_array_index (uids, i)));
+			c(printf("vanished: %s\n", uid));
+			imapx_expunge_uid_from_summary(imap, uid, unsolicited);
+		}
+		g_ptr_array_free (uids, FALSE);
 		break;
 	}
 	case IMAPX_NAMESPACE: {
@@ -1206,8 +1358,23 @@
 			}
 		}
 
-		if (finfo->got & FETCH_FLAGS && !(finfo->got & FETCH_UID)) {
-			if (imap->select_folder) {
+		if ((finfo->got & FETCH_FLAGS) && !(finfo->got & FETCH_HEADER)) {
+			CamelIMAPXJob *job = imapx_match_active_job (imap, IMAPX_JOB_FETCH_NEW_MESSAGES|IMAPX_JOB_REFRESH_INFO, NULL);
+			/* This is either a refresh_info job, check to see if it is and update
+			   if so, otherwise it must've been an unsolicited response, so update
+			   the summary to match */
+
+			if (job && (finfo->got & FETCH_UID)) {
+				struct _refresh_info r;
+
+				r.uid = finfo->uid;
+				finfo->uid = NULL;
+				r.server_flags = finfo->flags;
+				r.server_user_flags = finfo->user_flags;
+				finfo->user_flags = NULL;
+				r.exists = FALSE;
+				g_array_append_val(job->u.refresh_info.infos, r);
+			} else if (imap->select_folder) {
 				CamelFolder *folder;
 				CamelMessageInfo *mi = NULL;
 				gboolean changed = FALSE;
@@ -1218,11 +1385,24 @@
 
 				c(printf("flag changed: %d\n", id));
 
-				if ( (uid = camel_folder_summary_uid_from_index (folder->summary, id - 1)))
-				{
+				if (finfo->got & FETCH_UID) {
+					uid = finfo->uid;
+					finfo->uid = NULL;
+				} else {
+					uid = camel_folder_summary_uid_from_index (folder->summary, id - 1);
+				}
+
+				if (uid) {
 					mi = camel_folder_summary_uid (folder->summary, uid);
-					if (mi)
-						changed = imapx_update_message_info_flags (mi, finfo->flags, finfo->user_flags, folder);
+					if (mi) {
+						/* It's unsolicited _unless_ imap->select_pending (i.e. during
+						   a QRESYNC SELECT */
+						changed = imapx_update_message_info_flags (mi, finfo->flags, finfo->user_flags, folder, !imap->select_pending);
+					} else {
+						/* This (UID + FLAGS for previously unknown message) might
+						   happen during a SELECT (QRESYNC). We should use it. */
+						c(printf("flags changed for unknown uid %s\n.", uid));
+					}
 					finfo->user_flags = NULL;
 				}
 
@@ -1247,27 +1427,6 @@
 			}
 		}
 
-		if ((finfo->got & (FETCH_FLAGS|FETCH_UID)) == (FETCH_FLAGS|FETCH_UID) && !(finfo->got & FETCH_HEADER)) {
-			CamelIMAPXJob *job = imapx_match_active_job (imap, IMAPX_JOB_FETCH_NEW_MESSAGES|IMAPX_JOB_REFRESH_INFO, NULL);
-
-			/* This is either a refresh_info job, check to see if it is and update
-			   if so, otherwise it must've been an unsolicited response, so update
-			   the summary to match */
-
-			if (job) {
-				struct _refresh_info r;
-
-				r.uid = finfo->uid;
-				finfo->uid = NULL;
-				r.server_flags = finfo->flags;
-				r.server_user_flags = finfo->user_flags;
-				finfo->user_flags = NULL;
-				r.exists = FALSE;
-				g_array_append_val(job->u.refresh_info.infos, r);
-			} else {
-			}
-		}
-
 		if ((finfo->got & (FETCH_HEADER|FETCH_UID)) == (FETCH_HEADER|FETCH_UID)) {
 			CamelIMAPXJob *job = imapx_match_active_job (imap, IMAPX_JOB_FETCH_NEW_MESSAGES|IMAPX_JOB_REFRESH_INFO, NULL);
 
@@ -1329,6 +1488,23 @@
 						finfo->user_flags = NULL;
 					}
 
+					/* If the message is a really new one -- equal or higher than what
+					   we know as UIDNEXT for the folder, then it came in since we last
+					   fetched UIDNEXT and UNREAD count. We'll update UIDNEXT in the
+					   command completion, but update UNREAD count now according to the
+					   message SEEN flag */
+					if (!(server_flags & CAMEL_MESSAGE_SEEN)) {
+						CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *)job->folder;
+						unsigned long long uidl = strtoull(mi->uid, NULL, 10);
+
+						if (uidl >= ifolder->uidnext_on_server) {
+							c(printf("Updating unread count for new message %s\n", mi->uid));
+							((CamelIMAPXFolder *)job->folder)->unread_on_server++;
+						} else {
+							c(printf("Not updating unread count for new message %s\n", mi->uid));
+						}
+					}
+
 					binfo = (CamelMessageInfoBase *) mi;
 					binfo->size = finfo->size;
 
@@ -1344,8 +1520,10 @@
 							g_hash_table_remove (ifolder->ignore_recent, mi->uid);
 						}
 
-						if (job->op)
-							camel_operation_progress (job->op, (camel_folder_summary_count (job->folder->summary) * 100)/imap->exists);
+						if (job->op) {
+							int cnt = (camel_folder_summary_count (job->folder->summary) * 100 )/ifolder->exists_on_server;
+							camel_operation_progress (job->op, cnt?cnt:1);
+						}
 					}
 				}
 			}
@@ -1386,21 +1564,67 @@
 	case IMAPX_STATUS: {
 		struct _state_info *sinfo = imapx_parse_status_info (imap->stream, ex);
 		if (sinfo) {
-			/* this is what we use atm */
-			imap->exists = sinfo->messages;
-			imap->unread = sinfo->unseen;
+			CamelIMAPXStoreSummary *s = ((CamelIMAPXStore *)imap->store)->summary;
+			CamelIMAPXStoreNamespace *ns;
+			CamelIMAPXFolder *ifolder = NULL;;
+
+			ns = camel_imapx_store_summary_namespace_find_full(s, sinfo->name);
+			if (ns) {
+				gchar *path_name;
+
+				path_name = camel_imapx_store_summary_full_to_path(s, sinfo->name, ns->sep);
+				c(printf("Got folder path '%s' for full '%s'\n", path_name, sinfo->name));
+				if (path_name) {
+					ifolder = (void *)camel_store_get_folder(imap->store, path_name, 0, ex);
+					g_free (path_name);
+				}
+			}
+			if (ifolder) {
+				ifolder->unread_on_server = sinfo->unseen;
+				ifolder->exists_on_server = sinfo->messages;
+				ifolder->modseq_on_server = sinfo->highestmodseq;
+				ifolder->uidnext_on_server = sinfo->uidnext;
+				ifolder->uidvalidity_on_server = sinfo->uidvalidity;
+			} else {
+				c(printf("Received STATUS for unknown folder '%s'\n", sinfo->name));
+			}
 
+			g_free (sinfo->name);
 			g_free (sinfo);
 		}
 		break;
 	}
-	case IMAPX_BYE: case IMAPX_OK: case IMAPX_NO: case IMAPX_BAD: case IMAPX_PREAUTH:
+	case IMAPX_BYE: {
+		guchar *token;
+
+		camel_imapx_stream_text (imap->stream, &token, ex);
+		if (!camel_exception_is_set(ex)) {
+			c(printf("BYE: %s\n", token));
+			camel_exception_setv(ex, 1, "IMAP server said BYE: %s", token);
+		}
+		imap->state = IMAPX_SHUTDOWN;
+		return -1;
+	}
+	case IMAPX_PREAUTH:
+		c(printf("preauthenticated\n"));
+		if (imap->state < IMAPX_AUTHENTICATED)
+			imap->state = IMAPX_AUTHENTICATED;
+		/* fall through... */
+	case IMAPX_OK: case IMAPX_NO: case IMAPX_BAD:
 		/* TODO: validate which ones of these can happen as unsolicited responses */
 		/* TODO: handle bye/preauth differently */
 		camel_imapx_stream_ungettoken(imap->stream, tok, token, len);
 		sinfo = imapx_parse_status(imap->stream, ex);
+		if (camel_exception_is_set(ex))
+			return -1;
 		camel_object_trigger_event(imap, "status", sinfo);
 		switch (sinfo->condition) {
+		case IMAPX_CLOSED:
+			c(printf("previously selected folder is now closed\n"));
+			if (imap->select_pending && !imap->select_folder) {
+				imap->select_folder = imap->select_pending;
+			}
+			break;
 		case IMAPX_READ_WRITE:
 			imap->mode = IMAPX_MODE_READ|IMAPX_MODE_WRITE;
 			c(printf("folder is read-write\n"));
@@ -1415,15 +1639,31 @@
 		case IMAPX_UNSEEN:
 			imap->unseen = sinfo->u.unseen;
 			break;
+		case IMAPX_HIGHESTMODSEQ:
+			imap->highestmodseq = sinfo->u.highestmodseq;
+			break;
 		case IMAPX_PERMANENTFLAGS:
 			imap->permanentflags = sinfo->u.permanentflags;
 			break;
+		case IMAPX_UIDNEXT:
+			imap->uidnext = sinfo->u.uidnext;
+			break;
 		case IMAPX_ALERT:
 			c(printf("ALERT!: %s\n", sinfo->text));
 			break;
 		case IMAPX_PARSE:
 			c(printf("PARSE: %s\n", sinfo->text));
 			break;
+		case IMAPX_CAPABILITY:
+			if (sinfo->u.cinfo) {
+				struct _capability_info *cinfo = imap->cinfo;
+				imap->cinfo = sinfo->u.cinfo;
+				sinfo->u.cinfo = NULL;
+				if (cinfo)
+					imapx_free_capability(cinfo);
+				c(printf("got capability flags %08x\n", imap->cinfo->capa));
+			}
+			break;
 		default:
 			break;
 		}
@@ -1440,13 +1680,11 @@
 /* handle any continuation requests
    either data continuations, or auth continuation */
 static gint
-imapx_continuation(CamelIMAPXServer *imap, CamelException *ex)
+imapx_continuation(CamelIMAPXServer *imap, CamelException *ex, gboolean litplus)
 {
 	CamelIMAPXCommand *ic, *newliteral = NULL;
 	CamelIMAPXCommandPart *cp;
 
-	c(printf("got continuation response\n"));
-
 	/* The 'literal' pointer is like a write-lock, nothing else
 	   can write while we have it ... so we dont need any
 	   ohter lock here.  All other writes go through
@@ -1455,7 +1693,21 @@
 		camel_imapx_stream_skip (imap->stream, ex);
 
 		c(printf("Got continuation response for IDLE \n"));
-		imap->idle->started = TRUE;
+		IDLE_LOCK(imap->idle);
+		/* We might have actually sent the DONE already! */
+		if (imap->idle->state == IMAPX_IDLE_ISSUED)
+			imap->idle->state = IMAPX_IDLE_STARTED;
+		else if (imap->idle->state == IMAPX_IDLE_CANCEL) {
+			/* IDLE got cancelled after we sent the command, while
+			   we were waiting for this continuation. Send DONE
+			   immediately. */
+			imapx_command_idle_stop(imap, ex);
+			imap->idle->state = IMAPX_IDLE_OFF;
+		} else {
+			c(printf("idle starts in wrong state %d\n",
+				 imap->idle->state));
+		}
+		IDLE_UNLOCK(imap->idle);
 
 		QUEUE_LOCK(imap);
 		imap->literal = NULL;
@@ -1466,13 +1718,17 @@
 	}
 
 	ic = imap->literal;
-	if (ic == NULL) {
-		camel_imapx_stream_skip(imap->stream, ex);
-		c(printf("got continuation response with no outstanding continuation requests?\n"));
-		return 1;
+	if (!litplus) {
+		if (ic == NULL) {
+			camel_imapx_stream_skip(imap->stream, ex);
+			c(printf("got continuation response with no outstanding continuation requests?\n"));
+			return 1;
+		}
+		c(printf("got continuation response for data\n"));
+	} else {
+		c(printf("sending LITERAL+ continuation\n"));
 	}
 
-	c(printf("got continuation response for data\n"));
 	cp = ic->current;
 	switch (cp->type & CAMEL_IMAPX_COMMAND_MASK) {
 	case CAMEL_IMAPX_COMMAND_DATAWRAPPER:
@@ -1499,10 +1755,11 @@
 		c(printf("got auth continuation, feeding token '%s' back to auth mech\n", resp));
 
 		camel_stream_write((CamelStream *)imap->stream, resp, strlen(resp));
-
+		g_free(resp);
 		/* we want to keep getting called until we get a status reponse from the server
 		   ignore what sasl tells us */
 		newliteral = ic;
+		/* We already ate the end of the input stream line */
 		goto noskip;
 		break; }
 	case CAMEL_IMAPX_COMMAND_FILE: {
@@ -1528,14 +1785,15 @@
 		return -1;
 	}
 
-	camel_imapx_stream_skip(imap->stream, ex);
+	if (!litplus)
+		camel_imapx_stream_skip(imap->stream, ex);
  noskip:
 	cp = cp->next;
 	if (cp->next) {
 		ic->current = cp;
-		c(printf("next part of command \"A%05u: %s\"\n", ic->tag, cp->data));
+		c(printf("next part of command \"%c%05u: %s\"\n", imap->tagprefix, ic->tag, cp->data));
 		camel_stream_printf((CamelStream *)imap->stream, "%s\r\n", cp->data);
-		if (cp->type & CAMEL_IMAPX_COMMAND_CONTINUATION) {
+		if (cp->type & (CAMEL_IMAPX_COMMAND_CONTINUATION|CAMEL_IMAPX_COMMAND_LITERAL_PLUS)) {
 			newliteral = ic;
 		} else {
 			g_assert(cp->next->next == NULL);
@@ -1548,7 +1806,8 @@
 	QUEUE_LOCK(imap);
 	imap->literal = newliteral;
 
-	imapx_command_start_next(imap, ex);
+	if (!litplus)
+		imapx_command_start_next(imap, ex);
 	QUEUE_UNLOCK(imap);
 
 	return 1;
@@ -1645,7 +1904,7 @@
 	else if (tok == IMAPX_TOK_TOKEN)
 		imapx_completion (is, token, len, ex);
 	else if (tok == '+')
-		imapx_continuation (is, ex);
+		imapx_continuation (is, ex, FALSE);
 	else
 		camel_exception_set (ex, 1, "unexpected server response:");
 }
@@ -1653,7 +1912,7 @@
 /* Used to run 1 command synchronously,
    use for capa, login, and namespaces only. */
 static void
-imapx_command_run(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
+imapx_command_run (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 /* throws IO,PARSE exception */
 {
 	camel_imapx_command_close(ic);
@@ -1662,9 +1921,9 @@
 	imapx_command_start(is, ic);
 	QUEUE_UNLOCK(is);
 
-	do {
+	while (ic->status == NULL && !camel_exception_is_set (ic->ex))
 		imapx_step(is, ic->ex);
-	} while (ic->status == NULL && !camel_exception_is_set (ic->ex));
+	
 	if (is->literal == ic)
 		is->literal = NULL;
 
@@ -1679,16 +1938,6 @@
 	e_flag_set (ic->flag);
 }
 
-/* change status to a job and remove command_run_sync */
-static void
-imapx_command_status_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
-{
-	CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *) ic->job->folder;
-
-	ifolder->unread_on_server = is->unread;
-	e_flag_set (ic->flag);
-}
-
 /* The caller should free the command as well */
 static void
 imapx_command_run_sync (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
@@ -1720,6 +1969,10 @@
 
 	if (job->noreply) {
 		camel_exception_clear(job->ex);
+		if (job->type == IMAPX_JOB_FETCH_NEW_MESSAGES &&
+		    job->u.refresh_info.dummy_exception)
+			camel_exception_free (job->ex);
+
 		g_free(job);
 	} else
 		camel_msgport_reply((CamelMsg *) job);
@@ -1728,7 +1981,7 @@
 static gboolean
 imapx_register_job (CamelIMAPXServer *is, CamelIMAPXJob *job)
 {
-	if (is->state >= IMAPX_AUTHENTICATED) {
+	if (is->state >= IMAPX_INITIALISED) {
 		QUEUE_LOCK (is);
 		camel_dlist_addhead (&is->jobs, (CamelDListNode *)job);
 		QUEUE_UNLOCK (is);
@@ -1768,8 +2021,6 @@
 /* ********************************************************************** */
 // IDLE support
 
-#define IDLE_LOCK(x) (g_mutex_lock((x)->idle_lock))
-#define IDLE_UNLOCK(x) (g_mutex_unlock((x)->idle_lock))
 
 /*TODO handle negative cases sanely */
 static gboolean
@@ -1796,9 +2047,7 @@
 	}
 
 	IDLE_LOCK (idle);
-	idle->in_idle = FALSE;
-	idle->idle_issue_done = FALSE;
-	idle->started = FALSE;
+	idle->state = IMAPX_IDLE_OFF;
 	IDLE_UNLOCK (idle);
 
 	imapx_job_done (is, ic->job);
@@ -1811,7 +2060,7 @@
 	CamelIMAPXCommand *ic;
 	CamelIMAPXCommandPart *cp;
 
-	ic = camel_imapx_command_new ("IDLE", job->folder->full_name, "IDLE");
+	ic = camel_imapx_command_new (is, "IDLE", job->folder, "IDLE");
 	ic->job = job;
 	ic->pri = job->pri;
 	ic->complete = imapx_command_idle_done;
@@ -1821,7 +2070,16 @@
 	cp->type |= CAMEL_IMAPX_COMMAND_CONTINUATION;
 
 	QUEUE_LOCK (is);
-	imapx_command_start (is, ic);
+	IDLE_LOCK(is->idle);
+	/* Don't issue it if the idle was cancelled already */
+	if (is->idle->state == IMAPX_IDLE_PENDING) {
+		is->idle->state = IMAPX_IDLE_ISSUED;
+		imapx_command_start (is, ic);
+	} else {
+		imapx_job_done (is, ic->job);
+		camel_imapx_command_free (ic);
+	}
+	IDLE_UNLOCK(is->idle);
 	QUEUE_UNLOCK (is);
 }
 
@@ -1842,7 +2100,8 @@
 }
 
 static void
-imapx_server_fetch_new_messages (CamelIMAPXServer *is, CamelFolder *folder, gboolean async, CamelException *ex)
+imapx_server_fetch_new_messages (CamelIMAPXServer *is, CamelFolder *folder, gboolean async,
+				 gboolean update_unseen, CamelException *ex)
 {
 	CamelIMAPXJob *job;
 
@@ -1851,8 +2110,13 @@
 	job->start = imapx_job_fetch_new_messages_start;
 	job->folder = folder;
 	job->noreply = async;
+	if (!ex) {
+		job->u.refresh_info.dummy_exception = TRUE;
+		ex = camel_exception_new ();
+	}
 	job->ex = ex;
 	job->u.refresh_info.changes = camel_folder_change_info_new();
+	job->u.refresh_info.update_unseen = update_unseen;
 	job->op = camel_operation_registered ();
 
 	if (imapx_register_job (is, job))
@@ -1869,20 +2133,37 @@
 	CamelIMAPXServer *is = (CamelIMAPXServer *) data;
 
 	while (TRUE) {
-		CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *) is->select_folder;
+		CamelIMAPXFolder *ifolder;
 
 		e_flag_clear (is->idle->idle_start_watch);
-		camel_imapx_server_idle (is, is->select_folder, ex);
 
-		if (!camel_exception_is_set (ex) && ifolder->exists_on_server >
-				camel_folder_summary_count (((CamelFolder *) ifolder)->summary) && imapx_is_command_queue_empty (is))
-			imapx_server_fetch_new_messages (is, is->select_folder, TRUE, ex);
+		IDLE_LOCK(is->idle);
+		while ((ifolder = (CamelIMAPXFolder *) is->select_folder) &&
+		       is->idle->state == IMAPX_IDLE_PENDING &&
+		       !is->idle->idle_exit) {
+			time_t dwelled = time(NULL) - is->idle->started;
+
+			if (dwelled < IMAPX_IDLE_DWELL_TIME) {
+				IDLE_UNLOCK(is->idle);
+				g_usleep((IMAPX_IDLE_DWELL_TIME - dwelled) * G_USEC_PER_SEC);
+				IDLE_LOCK(is->idle);
+				continue;
+			}
+			IDLE_UNLOCK(is->idle);
+			camel_imapx_server_idle (is, (void *)ifolder, ex);
 
-		if (camel_exception_is_set (ex)) {
-			e(printf ("Caught exception in idle thread:  %s \n", ex->desc));
-			/* No way to asyncronously notify UI ? */
-			camel_exception_clear (ex);
+			if (!camel_exception_is_set (ex) && ifolder->exists_on_server >
+			    camel_folder_summary_count (((CamelFolder *) ifolder)->summary) && imapx_is_command_queue_empty (is))
+				imapx_server_fetch_new_messages (is, is->select_folder, TRUE, TRUE, ex);
+
+			if (camel_exception_is_set (ex)) {
+				e(printf ("Caught exception in idle thread:  %s \n", ex->desc));
+				/* No way to asyncronously notify UI ? */
+				camel_exception_clear (ex);
+			}
+			IDLE_LOCK(is->idle);
 		}
+		IDLE_UNLOCK(is->idle);
 
 		e_flag_wait (is->idle->idle_start_watch);
 
@@ -1895,19 +2176,37 @@
 	return NULL;
 }
 
-static void
+static gboolean
 imapx_stop_idle (CamelIMAPXServer *is, CamelException *ex)
 {
 	CamelIMAPXIdle *idle = is->idle;
+	int stopped = FALSE;
+	time_t now;
 
+	time(&now);
 	IDLE_LOCK (idle);
 
-	if (!idle->idle_issue_done && idle->started) {
+	switch(idle->state) {
+	case IMAPX_IDLE_ISSUED:
+		idle->state = IMAPX_IDLE_CANCEL;
+	case IMAPX_IDLE_CANCEL:
+		stopped = TRUE;
+		break;
+
+	case IMAPX_IDLE_STARTED:
 		imapx_command_idle_stop (is, ex);
-		idle->idle_issue_done = TRUE;
+		idle->state = IMAPX_IDLE_OFF;
+		stopped = TRUE;
+		c(printf("Stopping idle after %ld seconds\n",
+			 (long)(now - idle->started)));
+	case IMAPX_IDLE_PENDING:
+		idle->state = IMAPX_IDLE_OFF;
+	case IMAPX_IDLE_OFF:
+		break;
 	}
-
 	IDLE_UNLOCK (idle);
+
+	return stopped;
 }
 
 static void
@@ -1921,6 +2220,7 @@
 imapx_exit_idle (CamelIMAPXServer *is)
 {
 	CamelIMAPXIdle *idle = is->idle;
+	GThread *thread = NULL;
 
 	if (!idle)
 		return;
@@ -1931,13 +2231,16 @@
 		idle->idle_exit = TRUE;
 		e_flag_set (idle->idle_start_watch);
 
-		if (idle->idle_thread)
-			g_thread_join (idle->idle_thread);
+		thread = idle->idle_thread;
+		idle->idle_thread = 0;
 	}
 
 	idle->idle_thread = NULL;
 	IDLE_UNLOCK (idle);
 
+	if (thread)
+		g_thread_join (thread);
+
 	g_mutex_free (idle->idle_lock);
 	if (idle->idle_start_watch)
 		e_flag_free (idle->idle_start_watch);
@@ -1956,14 +2259,16 @@
 
 	IDLE_LOCK (idle);
 
+	g_assert (idle->state == IMAPX_IDLE_OFF);
+	time(&idle->started);
+	idle->state = IMAPX_IDLE_PENDING;
+
 	if (!idle->idle_thread) {
 		idle->idle_start_watch = e_flag_new ();
 		idle->idle_thread = g_thread_create ((GThreadFunc) imapx_idle_thread, is, TRUE, NULL);
 	} else
 		e_flag_set (idle->idle_start_watch);
 
-	idle->in_idle = TRUE;
-
 	IDLE_UNLOCK (idle);
 }
 
@@ -1974,7 +2279,7 @@
 	CamelIMAPXIdle *idle = is->idle;
 
 	IDLE_LOCK (idle);
-	ret = idle->in_idle;
+	ret = (idle->state > IMAPX_IDLE_OFF);
 	IDLE_UNLOCK (idle);
 
 	return ret;
@@ -1983,7 +2288,7 @@
 static gboolean
 imapx_idle_supported (CamelIMAPXServer *is)
 {
-	return (is->cinfo && is->cinfo->capa & IMAPX_CAPABILITY_IDLE && is->use_idle);
+	return (is->cinfo->capa & IMAPX_CAPABILITY_IDLE && is->use_idle);
 }
 
 // end IDLE
@@ -1991,7 +2296,6 @@
 static void
 imapx_command_select_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 {
-
 	if (camel_exception_is_set (ic->ex) || ic->status->result != IMAPX_OK) {
 		CamelDList failed;
 		CamelIMAPXCommand *cw, *cn;
@@ -2005,7 +2309,9 @@
 
 		if (is->select_pending) {
 			while (cn) {
-				if (cw->select && strcmp(cw->select, is->select_pending->full_name) == 0) {
+				if (cw->select && cw->select == is->select_pending) {
+					c(printf("Cancelling command '%s'(%p) for folder '%s'\n",
+						 cw->name, cw, camel_folder_get_full_name(cw->select)));
 					camel_dlist_remove((CamelDListNode *)cw);
 					camel_dlist_addtail(&failed, (CamelDListNode *)cw);
 				}
@@ -2022,23 +2328,44 @@
 			while (cn) {
 				if (ic->status)
 					cw->status = imapx_copy_status(ic->status);
-				camel_exception_setv (cw->ex, 1, "select %s failed", cw->select);
+				if (camel_exception_is_set(ic->ex))
+					camel_exception_xfer (cw->ex, ic->ex);
+				else {
+					camel_exception_setv (cw->ex, 1, "SELECT %s failed: %s",
+							      camel_folder_get_full_name(cw->select),
+							      ic->status->text?ic->status->text:"<unknown reason>");
+				}
 				cw->complete(is, cw);
 				cw = cn;
 				cn = cn->next;
 			}
 		}
-
 		if (is->select_pending)
 			camel_object_unref(is->select_pending);
+
+		/* A [CLOSED] status may have caused us to assume that it had happened */
+		if (is->select_folder)
+			is->select_folder = NULL;
+
+		is->state = IMAPX_INITIALISED;
 	} else {
 		CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *) is->select_pending;
 		c(printf("Select ok!\n"));
 
-		is->select_folder = is->select_pending;
-		is->select = g_strdup(is->select_folder->full_name);
+		if (!is->select_folder) {
+			/* This could have been done earlier by a [CLOSED] status */
+			is->select_folder = is->select_pending;
+		}
 		is->state = IMAPX_SELECTED;
 		ifolder->exists_on_server = is->exists;
+		ifolder->modseq_on_server = is->highestmodseq;
+		if (ifolder->uidnext_on_server < is->uidnext) {
+			imapx_server_fetch_new_messages (is, is->select_pending, TRUE, TRUE, NULL);
+			/* We don't do this right now because we want the new messages to
+			   update the unseen count. */
+			//ifolder->uidnext_on_server = is->uidnext;
+		}
+		ifolder->uidvalidity_on_server = is->uidvalidity;
 #if 0
 		/* This must trigger a complete index rebuild! */
 		if (is->uidvalidity && is->uidvalidity != ((CamelIMAPXSummary *)is->select_folder->summary)->uidvalidity)
@@ -2077,7 +2404,7 @@
 	if (is->select_pending)
 		return;
 
-	if (is->select && strcmp(is->select, folder->full_name) == 0 && !forced)
+	if (is->select_folder == folder && !forced)
 		return;
 
 	if (!camel_dlist_empty(&is->active))
@@ -2086,23 +2413,87 @@
 	is->select_pending = folder;
 	camel_object_ref(folder);
 	if (is->select_folder) {
-		g_free(is->select);
 		camel_object_unref(is->select_folder);
-		is->select = NULL;
 		is->select_folder = NULL;
+	} else {
+		/* If no folder was selected, we won't get a [CLOSED] status
+		   so just point select_folder at the new folder immediately */
+		is->select_folder = is->select_pending;
 	}
 
 	is->uidvalidity = 0;
 	is->unseen = 0;
+	is->highestmodseq = 0;
 	is->permanentflags = 0;
 	is->exists = 0;
 	is->recent = 0;
 	is->mode = 0;
+	is->uidnext = 0;
 
 	/* Hrm, what about reconnecting? */
-	is->state = IMAPX_AUTHENTICATED;
+	is->state = IMAPX_INITIALISED;
+
+	ic = camel_imapx_command_new(is, "SELECT", NULL, "SELECT %f", folder);
+
+	if (is->use_qresync) {
+		CamelIMAPXSummary *isum = (CamelIMAPXSummary *)folder->summary;
+		CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *)folder;
+		gint total = camel_folder_summary_count(folder->summary);
+		const gchar *uid = "1";
+
+		if (total)
+		    uid = camel_folder_summary_uid_from_index (folder->summary, 0);
+
+		if (isum->modseq && ifolder->uidvalidity_on_server) {
+			c(printf("SELECT QRESYNC %ld %ld\n", ifolder->uidvalidity_on_server, isum->modseq));
+			camel_imapx_command_add(ic, " (QRESYNC (%ld %ld %s:*", ifolder->uidvalidity_on_server, isum->modseq, uid);
+
+			if (total > 10) {
+				int i;
+				GString *seqs, *uids;
+
+				seqs = g_string_new(" ");
+				uids = g_string_new(")");
+
+				/* Include some seq/uid pairs to avoid a huge VANISHED list 
+				   (see RFC5162 §3.1). Work backwards exponentially from the
+				   end of the mailbox, starting with the message 9 from the
+				   end, then 27 from the end, then 81 from the end... */
+				i = 3;
+				do {
+					gchar buf[10];
+
+					i *= 3;
+					if (i > total)
+						i = total;
+
+					if (i != 9) { /* If not the first time */
+						g_string_prepend(seqs, ",");
+						g_string_prepend(uids, ",");
+					}
+
+					/* IMAP sequence numbers are one higher than the corresponding
+					   indices in our folder summary -- they start from one, while
+					   the summary starts from zero. */
+					sprintf(buf, "%d", total - i + 1);
+					g_string_prepend(seqs, buf);
+ 					g_string_prepend(uids, camel_folder_summary_uid_from_index(folder->summary, total - i));
+				} while (i < total);
+
+				g_string_prepend(seqs, " (");
+
+				c(printf("adding QRESYNC seq/uidset %s%s\n", seqs->str, uids->str));
+				camel_imapx_command_add(ic, seqs->str);
+				camel_imapx_command_add(ic, uids->str);
+				
+				g_string_free(seqs, TRUE);
+				g_string_free(uids, TRUE);
+
+			}
+			camel_imapx_command_add(ic, "))");
+		}
+	}
 
-	ic = camel_imapx_command_new("SELECT", NULL, "SELECT %f", folder);
 	ic->complete = imapx_command_select_done;
 	imapx_command_start (is, ic);
 }
@@ -2114,15 +2505,12 @@
 static gboolean
 connect_to_server_process (CamelIMAPXServer *is, const gchar *cmd, CamelException *ex)
 {
-	CamelIMAPXCommand *ic;
 	CamelStream *cmd_stream;
 	gint ret, i = 0;
 	gchar *buf;
 	gchar *cmd_copy;
 	gchar *full_cmd;
 	gchar *child_env[7];
-	guchar *buffer = NULL;
-	guint len;
 
 	/* Put full details in the environment, in case the connection
 	   program needs them */
@@ -2214,36 +2602,6 @@
 	camel_object_unref(cmd_stream);
 	is->is_process_stream = TRUE;
 
-	camel_imapx_stream_gets (is->stream, &buffer, &len);
-	e(printf("Got greeting '%.*s'\n", len, buffer));
-
-	if (!buffer) {
-		camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
-				     "No response from server.\n");
-		return FALSE;
-	} else if (!strncmp((gchar *)buffer, "* PREAUTH", 9)) {
-		is->state = IMAPX_AUTHENTICATED;
-	} else if (strncmp((gchar *)buffer, "* OK", 4)) {
-		camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
-				     "Unrecognised greeting from server: %.*s\n",
-				     len, buffer);
-		return FALSE;
-	}
-
-	ic = camel_imapx_command_new("CAPABILITY", NULL, "CAPABILITY");
-	imapx_command_run(is, ic);
-
-	if (camel_exception_is_set (ic->ex) || ic->status->result != IMAPX_OK) {
-		if (!camel_exception_is_set (ic->ex))
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, "%s", ic->status->text);
-		else
-			camel_exception_xfer (ex, ic->ex);
-
-		camel_imapx_command_free(ic);
-		return FALSE;
-	}
-	camel_imapx_command_free(ic);
-
 	return TRUE;
 }
 #endif /* G_OS_WIN32 */
@@ -2258,8 +2616,9 @@
 #ifdef HAVE_SSL
 	const gchar *mode;
 #endif
-	guchar *buffer = NULL;
 	guint len;
+	guchar *token;
+	gint tok;
 	const gchar *serv;
 	const gchar *port = NULL;
 	struct addrinfo *ai, hints = { 0 };
@@ -2270,8 +2629,12 @@
 
 	if (camel_url_get_param(is->url, "use_command") &&
 	    (command = camel_url_get_param(is->url, "command"))) {
+		camel_exception_clear(ex);
 		connect_to_server_process(is, command, ex);
-		goto exit;
+		if (camel_exception_is_set (ex))
+			goto exit;
+		else
+			goto connected;
 	}
 #endif
 	if (is->url->port) {
@@ -2343,22 +2706,48 @@
 	sockopt.value.keep_alive = TRUE;
 	camel_tcp_stream_setsockopt ((CamelTcpStream *)tcp_stream, &sockopt);
 
-	camel_imapx_stream_gets (is->stream, &buffer, &len);
-	e(printf("Got greeting '%.*s'\n", len, buffer));
+ connected:
+	while (1) {
+		// poll ?  wait for other stuff? loop?
+		if (camel_application_is_exiting || is->parser_quit) {
+			camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
+					     "Connection to server cancelled\n");
+			return FALSE;
+		}
+			
+		tok = camel_imapx_stream_token (is->stream, &token, &len, ex);
+		if (camel_exception_is_set (ex)) {
+			return FALSE;
+		}
 
-	ic = camel_imapx_command_new("CAPABILITY", NULL, "CAPABILITY");
-	imapx_command_run(is, ic);
+		if (tok == '*') {
+			imapx_untagged (is, ex);
+			break;
+		}
+		camel_imapx_stream_ungettoken(is->stream, tok, token, len);
+		camel_imapx_stream_text (is->stream, &token, ex);
+		if (camel_exception_is_set (ex)) {
+			return FALSE;
+		}
+		e(printf("Got unexpected line before greeting:  '%s'\n", token));
+		g_free(token);
+	}
 
-	if (camel_exception_is_set (ic->ex) || ic->status->result != IMAPX_OK) {
-		if (!camel_exception_is_set (ic->ex))
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, "%s", ic->status->text);
-		else
-			camel_exception_xfer (ex, ic->ex);
+	if (!is->cinfo) {
+		ic = camel_imapx_command_new(is, "CAPABILITY", NULL, "CAPABILITY");
+		imapx_command_run(is, ic);
 
+		if (camel_exception_is_set (ic->ex) || ic->status->result != IMAPX_OK) {
+			if (!camel_exception_is_set (ic->ex))
+				camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, "%s", ic->status->text);
+			else
+				camel_exception_xfer (ex, ic->ex);
+
+			camel_imapx_command_free(ic);
+			return FALSE;
+		}
 		camel_imapx_command_free(ic);
-		goto exit;
 	}
-	camel_imapx_command_free(ic);
 
 #ifdef HAVE_SSL
 	if (ssl_mode == 2)
@@ -2371,7 +2760,7 @@
 			goto exit;
 		}
 
-		ic = camel_imapx_command_new ("STARTTLS", NULL, "STARTTLS");
+		ic = camel_imapx_command_new (is, "STARTTLS", NULL, "STARTTLS");
 		imapx_command_run (is, ic);
 
 		if (camel_exception_is_set (ic->ex) || ic->status->result != IMAPX_OK) {
@@ -2383,6 +2772,16 @@
 			camel_imapx_command_free(ic);
 			goto exit;
 		}
+
+		/* See if we got new capabilities in the STARTTLS response */
+		imapx_free_capability(is->cinfo);
+		is->cinfo = NULL;
+		if (ic->status->condition == IMAPX_CAPABILITY) {
+			is->cinfo = ic->status->u.cinfo;
+			ic->status->u.cinfo = NULL;
+			c(printf("got capability flags %08x\n", is->cinfo->capa));
+		}
+
 		camel_imapx_command_free(ic);
 
 		if (camel_tcp_stream_ssl_enable_ssl (CAMEL_TCP_STREAM_SSL (tcp_stream)) == -1) {
@@ -2391,6 +2790,16 @@
 					is->url->host, _("SSL negotiations failed"));
 			goto exit;
 		}
+		/* Get new capabilities if they weren't already given */
+		if (!is->cinfo) {
+			ic = camel_imapx_command_new(is, "CAPABILITY", NULL, "CAPABILITY");
+			imapx_command_run (is, ic);
+			camel_exception_xfer (ex, ic->ex);
+			camel_imapx_command_free(ic);
+
+			if (camel_exception_is_set (ex))
+				goto exit;
+		}
 	}
 #endif
 
@@ -2436,10 +2845,10 @@
 			goto exception;
 
 		if (is->state == IMAPX_AUTHENTICATED)
-			break;
+			goto preauthed;
 
 		if (!authtype && service->url->authmech) {
-			if (is->cinfo && !g_hash_table_lookup (is->cinfo->auth_types, service->url->authmech)) {
+			if (!g_hash_table_lookup (is->cinfo->auth_types, service->url->authmech)) {
 				camel_exception_setv (
 					ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
 					_("IMAP server %s does not support requested "
@@ -2489,17 +2898,29 @@
 		}
 
 		if (authtype && (sasl = camel_sasl_new ("imap", authtype->authproto, service))) {
-			ic = camel_imapx_command_new ("AUTHENTICATE", NULL, "AUTHENTICATE %A", sasl);
+			ic = camel_imapx_command_new (is, "AUTHENTICATE", NULL, "AUTHENTICATE %A", sasl);
 			camel_object_unref(sasl);
 		} else {
-			ic = camel_imapx_command_new("LOGIN", NULL, "LOGIN %s %s", service->url->user, service->url->passwd);
+			ic = camel_imapx_command_new(is, "LOGIN", NULL, "LOGIN %s %s", service->url->user, service->url->passwd);
 		}
 
 		imapx_command_run (is, ic);
 
-		if (!(camel_exception_is_set (ic->ex) || ic->status->result != IMAPX_OK))
+		if (!(camel_exception_is_set (ic->ex) || ic->status->result != IMAPX_OK)) {
+			/* Forget old capabilities after login */
+			if (is->cinfo) {
+				imapx_free_capability(is->cinfo);
+				is->cinfo = NULL;
+			}
+
+			if (ic->status->condition == IMAPX_CAPABILITY) {
+				is->cinfo = ic->status->u.cinfo;
+				ic->status->u.cinfo = NULL;
+				c(printf("got capability flags %08x\n", is->cinfo->capa));
+			}
+
 			authenticated = TRUE;
-		else {
+		} else {
 			/* If exception is set, it might be mostly due to cancellation and we would get an
 			   io error, else re-prompt. If authentication fails for other reasons ic->status would be
 			    set with the error message */
@@ -2519,22 +2940,23 @@
 		camel_imapx_command_free(ic);
 	}
 
-	/* After login we re-capa */
-	if (is->cinfo) {
-		imapx_free_capability(is->cinfo);
-		is->cinfo = NULL;
-	}
-
-	ic = camel_imapx_command_new("CAPABILITY", NULL, "CAPABILITY");
-	imapx_command_run (is, ic);
-	camel_exception_xfer (ex, ic->ex);
-	camel_imapx_command_free(ic);
-
 	if (camel_exception_is_set (ex))
 		goto exception;
 
+	/* After login we re-capa unless the server already told us */
+	if (!is->cinfo) {
+		ic = camel_imapx_command_new(is, "CAPABILITY", NULL, "CAPABILITY");
+		imapx_command_run (is, ic);
+		camel_exception_xfer (ex, ic->ex);
+		camel_imapx_command_free(ic);
+
+		if (camel_exception_is_set (ex))
+			goto exception;
+	}
+
 	is->state = IMAPX_AUTHENTICATED;
 
+ preauthed:
 	if (((CamelIMAPXStore *)is->store)->rec_options & IMAPX_USE_IDLE)
 		is->use_idle = TRUE;
 	else
@@ -2545,7 +2967,7 @@
 
 	/* Fetch namespaces */
 	if (is->cinfo->capa & IMAPX_CAPABILITY_NAMESPACE) {
-		ic = camel_imapx_command_new ("NAMESPACE", NULL, "NAMESPACE");
+		ic = camel_imapx_command_new (is, "NAMESPACE", NULL, "NAMESPACE");
 		imapx_command_run (is, ic);
 		camel_exception_xfer (ex, ic->ex);
 		camel_imapx_command_free (ic);
@@ -2553,6 +2975,19 @@
 		if (camel_exception_is_set (ex))
 			goto exception;
 	}
+	if (((CamelIMAPXStore *)is->store)->rec_options & IMAPX_USE_QRESYNC &&
+	    is->cinfo->capa & IMAPX_CAPABILITY_QRESYNC) {
+		ic = camel_imapx_command_new (is, "ENABLE", NULL, "ENABLE CONDSTORE QRESYNC");
+		imapx_command_run (is, ic);
+		camel_exception_xfer (ex, ic->ex);
+		camel_imapx_command_free (ic);
+
+		if (camel_exception_is_set (ex))
+			goto exception;
+
+		is->use_qresync = TRUE;
+	} else
+		is->use_qresync = FALSE;
 
 	if (((CamelIMAPXStore *) is->store)->summary->namespaces == NULL) {
 		CamelIMAPXNamespaceList *nsl = NULL;
@@ -2572,8 +3007,10 @@
 		imapx_store->dir_sep = ns->sep;
 	}
 
-	if (!camel_exception_is_set (ex))
+	if (!camel_exception_is_set (ex)) {
+		is->state = IMAPX_INITIALISED;
 		return;
+	}
 
 exception:
 	imapx_disconnect (is);
@@ -2613,7 +3050,7 @@
 			if (job->op)
 				camel_operation_progress (job->op, (job->u.get_message.fetch_offset *100)/job->u.get_message.size);
 
-			ic = camel_imapx_command_new("FETCH", job->folder->full_name,
+			ic = camel_imapx_command_new(is, "FETCH", job->folder,
 					"UID FETCH %t (BODY.PEEK[]", job->u.get_message.uid);
 			camel_imapx_command_add(ic, "<%u.%u>", job->u.get_message.fetch_offset, MULTI_SIZE);
 			camel_imapx_command_add(ic, ")");
@@ -2679,7 +3116,7 @@
 
 	if (job->u.get_message.use_multi_fetch) {
 		for (i=0; i < 3 && job->u.get_message.fetch_offset < job->u.get_message.size;i++) {
-			ic = camel_imapx_command_new("FETCH", job->folder->full_name,
+			ic = camel_imapx_command_new(is, "FETCH", job->folder,
 					"UID FETCH %t (BODY.PEEK[]", job->u.get_message.uid);
 			camel_imapx_command_add(ic, "<%u.%u>", job->u.get_message.fetch_offset, MULTI_SIZE);
 			camel_imapx_command_add(ic, ")");
@@ -2691,7 +3128,7 @@
 			imapx_command_queue(is, ic);
 		}
 	} else {
-		ic = camel_imapx_command_new("FETCH", job->folder->full_name,
+		ic = camel_imapx_command_new(is, "FETCH", job->folder,
 				"UID FETCH %t (BODY.PEEK[])", job->u.get_message.uid);
 		ic->complete = imapx_command_fetch_message_done;
 		ic->job = job;
@@ -2710,7 +3147,7 @@
 	GPtrArray *uids = job->u.copy_messages.uids;
 	gint i = index;
 
-	ic = camel_imapx_command_new ("COPY", job->folder->full_name, "UID COPY ");
+	ic = camel_imapx_command_new (is, "COPY", job->folder, "UID COPY ");
 	ic->complete = imapx_command_copy_messages_step_done;
 	ic->job = job;
 	ic->pri = job->pri;
@@ -2820,7 +3257,7 @@
 	if (!camel_exception_is_set (ic->ex) && ic->status->result == IMAPX_OK) {
 		if (ic->status->condition == IMAPX_APPENDUID) {
 			c(printf("Got appenduid %d %d\n", (gint)ic->status->u.appenduid.uidvalidity, (gint)ic->status->u.appenduid.uid));
-			if (ic->status->u.appenduid.uidvalidity == is->uidvalidity) {
+			if (ic->status->u.appenduid.uidvalidity == ifolder->uidvalidity_on_server) {
 				CamelFolderChangeInfo *changes;
 				gchar *uid;
 
@@ -2832,7 +3269,10 @@
 
 				/* should we update the message count ? */
 				camel_folder_summary_add (job->folder->summary, mi);
-
+				imapx_set_message_info_flags_for_new_message (mi, 
+									      ((CamelMessageInfoBase *)job->u.append_message.info)->flags,
+									      ((CamelMessageInfoBase *)job->u.append_message.info)->user_flags,
+									      job->folder);
 				changes = camel_folder_change_info_new ();
 				camel_folder_change_info_add_uid (changes, mi->uid);
 				camel_object_trigger_event (CAMEL_OBJECT (job->folder), "folder_changed",
@@ -2867,7 +3307,7 @@
 	CamelIMAPXCommand *ic;
 
 	/* TODO: we could supply the original append date from the file timestamp */
-	ic = camel_imapx_command_new("APPEND", NULL,
+	ic = camel_imapx_command_new(is, "APPEND", NULL,
 				     "APPEND %f %F %P",
 				     job->folder,
 				     ((CamelMessageInfoBase *)job->u.append_message.info)->flags,
@@ -2947,6 +3387,8 @@
 static void
 imapx_command_step_fetch_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 {
+	CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *)ic->job->folder;
+	CamelIMAPXSummary *isum = (CamelIMAPXSummary *)ic->job->folder->summary;
 	CamelIMAPXJob *job = ic->job;
 	gint i = job->u.refresh_info.index;
 	GArray *infos = job->u.refresh_info.infos;
@@ -2971,7 +3413,7 @@
 	if (i<infos->len) {
 		camel_imapx_command_free (ic);
 
-		ic = camel_imapx_command_new("FETCH", job->folder->full_name, "UID FETCH ");
+		ic = camel_imapx_command_new(is, "FETCH", job->folder, "UID FETCH ");
 		ic->complete = imapx_command_step_fetch_done;
 		ic->job = job;
 		ic->pri = job->pri - 1;
@@ -3000,6 +3442,22 @@
 		}
 	}
 
+	if (camel_folder_summary_count(job->folder->summary)) {
+		gchar *uid = camel_folder_summary_uid_from_index (job->folder->summary,
+						  camel_folder_summary_count(job->folder->summary) - 1);
+		unsigned long long uidl = strtoull(uid, NULL, 10);
+		g_free(uid);
+
+		uidl++;
+
+		if (uidl > ifolder->uidnext_on_server) {
+			c(printf("Updating uidnext_on_server for '%s' to %lld\n",
+				 camel_folder_get_full_name(job->folder), uidl));
+			ifolder->uidnext_on_server = uidl;
+		}
+	}
+	isum->uidnext = ifolder->uidnext_on_server;
+
 cleanup:
 	for (i=0;i<infos->len;i++) {
 		struct _refresh_info *r = &g_array_index(infos, struct _refresh_info, i);
@@ -3047,12 +3505,18 @@
 		CamelMessageInfo *s_minfo = NULL;
 		CamelIMAPXMessageInfo *info;
 		CamelFolderSummary *s = job->folder->summary;
+		CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *)job->folder;
 		GSList *removed = NULL, *l;
 		gboolean fetch_new = FALSE;
 		gint i;
 		guint j = 0;
 		GPtrArray *uids;
 
+		/* Actually we wanted to do this after the SELECT but before the
+		   FETCH command was issued. But this should suffice. */
+		((CamelIMAPXSummary *)s)->uidnext = ifolder->uidnext_on_server;
+		((CamelIMAPXSummary *)s)->modseq = ifolder->modseq_on_server;
+
 		/* Here we do the typical sort/iterate/merge loop.
 		   If the server flags dont match what we had, we modify our
 		   flags to pick up what the server now has - but we merge
@@ -3091,7 +3555,7 @@
 			if (s_minfo && uid_cmp(s_minfo->uid, r->uid, s) == 0) {
 				info = (CamelIMAPXMessageInfo *)s_minfo;
 
-				if (imapx_update_message_info_flags ((CamelMessageInfo *) info, r->server_flags, r->server_user_flags, job->folder))
+				if (imapx_update_message_info_flags ((CamelMessageInfo *) info, r->server_flags, r->server_user_flags, job->folder, FALSE))
 					camel_folder_change_info_change_uid (job->u.refresh_info.changes, camel_message_info_uid (s_minfo));
 				r->exists = TRUE;
 			} else
@@ -3131,9 +3595,9 @@
 			gchar *uid = (gchar *) l->data;
 			CamelMessageInfo *mi;
 
-			mi = camel_folder_summary_uid (is->select_folder->summary, uid);
+			mi = camel_folder_summary_uid (job->folder->summary, uid);
 			if (mi) {
-				imapx_update_summary_for_removed_message (mi, is->select_folder);
+				imapx_update_summary_for_removed_message (mi, job->folder, FALSE);
 				camel_message_info_free (mi);
 			}
 
@@ -3159,7 +3623,9 @@
 		if (fetch_new) {
 			camel_operation_start (job->op, _("Fetching summary information for new messages in %s"), job->folder->name);
 			imapx_uidset_init(&job->u.refresh_info.uidset, BATCH_FETCH_COUNT, 0);
-			/* command will be free'ed in step_fetch_done */
+			/* These are new messages which arrived since we last knew the unseen count;
+			   update it as they arrive. */
+			job->u.refresh_info.update_unseen = TRUE;
 			imapx_command_step_fetch_done(is, ic);
 			return;
 		}
@@ -3176,6 +3642,10 @@
 		g_free(r->uid);
 	}
 
+	/* There's no sane way to get the server-side unseen count on the
+	   select mailbox. So just work it out from the flags */
+	((CamelIMAPXFolder *)job->folder)->unread_on_server = job->folder->summary->unread_count;
+
 	g_array_free(job->u.refresh_info.infos, TRUE);
 	imapx_job_done (is, job);
 	camel_imapx_command_free (ic);
@@ -3186,9 +3656,11 @@
 {
 	CamelIMAPXCommand *ic;
 
-	camel_operation_start (job->op, _("Scanning for changed messages in %s"), job->folder->name);
+	camel_operation_start (
+		job->op, _("Scanning for changed messages in %s"),
+		job->folder->name);
 
-	ic = camel_imapx_command_new ("FETCH", job->folder->full_name,
+	ic = camel_imapx_command_new (is, "FETCH", job->folder,
 				     "UID FETCH 1:* (UID FLAGS)");
 	ic->job = job;
 	ic->complete = imapx_job_scan_changes_done;
@@ -3200,6 +3672,9 @@
 static void
 imapx_command_fetch_new_messages_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 {
+	CamelIMAPXSummary *isum = (CamelIMAPXSummary *)ic->job->folder->summary;
+	CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *)ic->job->folder;
+
 	if (camel_exception_is_set (ic->ex) || ic->status->result != IMAPX_OK) {
 		if (!camel_exception_is_set (ic->ex))
 			camel_exception_setv(ic->job->ex, 1, "Error fetching new messages : %s", ic->status->text);
@@ -3215,6 +3690,23 @@
 		camel_folder_change_info_clear(ic->job->u.refresh_info.changes);
 	}
 
+	if (camel_folder_summary_count(ic->job->folder->summary)) {
+		gchar *uid = camel_folder_summary_uid_from_index (ic->job->folder->summary,
+					  camel_folder_summary_count(ic->job->folder->summary) - 1);
+		unsigned long long uidl = strtoull(uid, NULL, 10);
+		g_free(uid);
+
+		uidl++;
+
+		if (uidl > ifolder->uidnext_on_server) {
+			c(printf("Updating uidnext_on_server for '%s' to %lld\n",
+				 camel_folder_get_full_name(ic->job->folder), uidl));
+			ifolder->uidnext_on_server = uidl;
+		}
+	}
+
+	isum->uidnext = ifolder->uidnext_on_server;
+
 exception:
 	if (ic->job->noreply)
 		camel_folder_change_info_free(ic->job->u.refresh_info.changes);
@@ -3238,22 +3730,26 @@
 	total = camel_folder_summary_count (folder->summary);
 	diff = ifolder->exists_on_server - total;
 
-	if (total > 0)
+	if (total > 0) {
+		unsigned long long uidl;
 		uid = camel_folder_summary_uid_from_index (folder->summary, total - 1);
-	else
+		uidl = strtoull(uid, NULL, 10);
+		g_free(uid);
+		uid = g_strdup_printf("%lld", uidl+1);
+	} else
 		uid = g_strdup ("1");
 
 	camel_operation_start (job->op, _("Fetching summary information for new messages in %s"), folder->name);
 
 	if (diff > BATCH_FETCH_COUNT) {
-		ic = camel_imapx_command_new ("FETCH", job->folder->full_name,
-				     "FETCH %s:* (UID FLAGS)", uid);
+		ic = camel_imapx_command_new (is, "FETCH", job->folder,
+				     "UID FETCH %s:* (UID FLAGS)", uid);
 		imapx_uidset_init(&job->u.refresh_info.uidset, BATCH_FETCH_COUNT, 0);
 		job->u.refresh_info.infos = g_array_new (0, 0, sizeof(struct _refresh_info));
 		ic->pri = job->pri;
 		ic->complete = imapx_command_step_fetch_done;
 	} else {
-		ic = camel_imapx_command_new ("FETCH", job->folder->full_name,
+		ic = camel_imapx_command_new (is, "FETCH", job->folder,
 					"UID FETCH %s:* (RFC822.SIZE RFC822.HEADER FLAGS)", uid);
 		ic->pri = job->pri;
 		ic->complete = imapx_command_fetch_new_messages_done;
@@ -3269,64 +3765,152 @@
 {
 	guint32 total;
 	CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *) job->folder;
+	CamelIMAPXSummary *isum = (CamelIMAPXSummary *)job->folder->summary;
 	CamelFolder *folder = job->folder;
 	CamelException *ex = job->ex;
+	gboolean need_rescan = FALSE;
+	gboolean is_selected = FALSE;
+	gboolean can_qresync = FALSE;
 
-	total = camel_folder_summary_count (folder->summary);
-	/* Check if there are any new messages. The old imap doc says one needs to reselect in case of inbox to fetch
-	   new messages. Need to check if its still true. Just use noop now */
-	if (ifolder->exists_on_server == total) {
-		camel_imapx_server_noop (is, folder, ex);
-
-		if (camel_exception_is_set (ex))
-			goto exception;
-	}
-
-	/* Fetch the new messages */
-	if (ifolder->exists_on_server > total)
-	{
-		imapx_server_fetch_new_messages (is, folder, FALSE, job->ex);
-		if (camel_exception_is_set (job->ex))
-			goto exception;
-	}
-
-	/* Sync changes before fetching status, else unread count will not match. need to think about better ways for this */
+	/* Sync changes first, else unread count will not
+	   match. Need to think about better ways for this */
 	imapx_server_sync_changes (is, folder, job->pri, ex);
 	if (camel_exception_is_set (job->ex))
-		goto exception;
+		goto done;
 
-	/* Check if a rescan is needed */
+#if 0 /* There are issues with this still; continue with the buggy behaviour
+	 where we issue STATUS on the current folder, for now...*/
+	if (is->select_folder == folder)
+		is_selected = TRUE;
+#endif
 	total = camel_folder_summary_count (folder->summary);
-	if (ifolder->exists_on_server == total) {
-		guint32 unread;
-		CamelIMAPXCommand *ic;
 
-		ic = camel_imapx_command_new ("STATUS", folder->full_name, "STATUS %f (MESSAGES UNSEEN)", folder);
-		ic->job = job;
-		ic->pri = job->pri;
-		ic->complete = imapx_command_status_done;
-		imapx_command_run_sync (is, ic);
+	/* We don't have valid unread count or modseq for currently-selected server
+	   (unless we want to re-SELECT it). We fake unread count when fetching
+	   message flags, but don't depend on modseq for the selected folder */
+	if (total != ifolder->exists_on_server ||
+	    isum->uidnext != ifolder->uidnext_on_server ||
+	    folder->summary->unread_count != ifolder->unread_on_server ||
+	    (!is_selected && isum->modseq != ifolder->modseq_on_server))
+		need_rescan = TRUE;
+
+	/* This is probably the first check of this folder after startup;
+	   use STATUS to check whether the cached summary is valid, rather
+	   than blindly updating. Only for servers which support CONDSTORE
+	   though. */
+	if ((isum->modseq && !ifolder->modseq_on_server))
+		need_rescan = FALSE;
 
-		if (camel_exception_is_set (ic->ex) || ic->status->result != IMAPX_OK) {
-			if (!camel_exception_is_set (ic->ex))
-				camel_exception_setv(job->ex, 1, "Error refreshing folder: %s", ic->status->text);
+	/* If we don't think there's anything to do, poke it to check */
+	if (!need_rescan) {
+		CamelIMAPXCommand *ic;
+		
+		if (is_selected) {
+			/* We may not issue STATUS on the current folder. Use SELECT or NOOP instead. */
+			if (0 /* server needs SELECT not just NOOP*/) {
+				if (imapx_idle_supported(is) && imapx_in_idle(is))
+					imapx_stop_idle(is, job->ex);
+				if (camel_exception_is_set(job->ex))
+					goto done;
+				/* This doesn't work -- this is an immediate command, not queued */
+				imapx_select(is, folder, TRUE, job->ex);
+				if (camel_exception_is_set(job->ex))
+					goto done;
+			} else {
+				/* Or maybe just NOOP, unless we're in IDLE in which case do nothing */
+				if (!imapx_idle_supported(is) || !imapx_in_idle(is)) {
+					camel_imapx_server_noop(is, folder, job->ex);
+					if (camel_exception_is_set(job->ex))
+						goto done;
+				}
+			}
+		} else {
+			if (is->cinfo->capa & IMAPX_CAPABILITY_CONDSTORE)
+				ic = camel_imapx_command_new (is, "STATUS", NULL, "STATUS %f (MESSAGES UNSEEN UIDVALIDITY UIDNEXT HIGHESTMODSEQ)", folder);
 			else
-				camel_exception_xfer (job->ex, ic->ex);
+				ic = camel_imapx_command_new (is, "STATUS", NULL, "STATUS %f (MESSAGES UNSEEN UIDVALIDITY UIDNEXT)", folder);
+		
+			ic->job = job;
+			ic->pri = job->pri;
+
+			imapx_command_run_sync (is, ic);
 
+			if (camel_exception_is_set (ic->ex) || ic->status->result != IMAPX_OK) {
+				if (!camel_exception_is_set (ic->ex))
+					camel_exception_setv(job->ex, 1, "Error refreshing folder: %s", ic->status->text);
+				else
+					camel_exception_xfer (job->ex, ic->ex);
+
+				camel_imapx_command_free (ic);
+				goto done;
+			}
 			camel_imapx_command_free (ic);
-			goto exception;
 		}
-		camel_imapx_command_free (ic);
 
-		camel_object_get (folder, NULL, CAMEL_FOLDER_UNREAD, &unread, NULL);
-		if (ifolder->exists_on_server == total && unread == ifolder->unread_on_server)
-			goto exception;
+		/* Recalulate need_rescan */
+		if (total != ifolder->exists_on_server ||
+		    isum->uidnext != ifolder->uidnext_on_server ||
+		    folder->summary->unread_count != ifolder->unread_on_server ||
+		    (!is_selected && isum->modseq != ifolder->modseq_on_server))
+			need_rescan = TRUE;
+
+	}
+
+	if (is->use_qresync && isum->modseq && ifolder->uidvalidity_on_server)
+		can_qresync = TRUE;
+
+	e(printf("folder %s is %sselected, total %u / %u, unread %u / %u, modseq %llu / %llu, uidnext %u / %u: will %srescan\n",
+		 folder->full_name, is_selected?"": "not ", total, ifolder->exists_on_server,
+		 folder->summary->unread_count, ifolder->unread_on_server,
+		 (unsigned long long)isum->modseq, (unsigned long long)ifolder->modseq_on_server,
+		 isum->uidnext, ifolder->uidnext_on_server,
+		 need_rescan?"":"not "));
+
+	/* Fetch new messages first, so that they appear to the user ASAP */
+	if (ifolder->exists_on_server > total ||
+	    ifolder->uidnext_on_server > isum->uidnext)
+	{
+		if (!total)
+			need_rescan = FALSE;
+
+		imapx_server_fetch_new_messages (is, folder, FALSE, FALSE, job->ex);
+		if (camel_exception_is_set (job->ex))
+			goto done;
+
+		/* If QRESYNC-capable we'll have got all flags changes in SELECT */
+		if (can_qresync)
+			goto qresync_done;
+	}
+
+	if (!need_rescan)
+		goto done;
+
+	if (can_qresync) {
+		/* Actually we only want to select it; no need for the NOOP */
+		camel_imapx_server_noop(is, folder, ex);
+	qresync_done:
+		isum->modseq = ifolder->modseq_on_server;
+		total = camel_folder_summary_count(job->folder->summary);
+		if (total != ifolder->exists_on_server ||
+		    folder->summary->unread_count != ifolder->unread_on_server ||
+		    (isum->modseq != ifolder->modseq_on_server)) {
+			c(printf("Eep, after QRESYNC we're out of sync. total %u / %u, unread %u / %u, modseq %" G_GUINT64_FORMAT " / %" G_GUINT64_FORMAT "\n",
+				 total, ifolder->exists_on_server,
+				 folder->summary->unread_count, ifolder->unread_on_server,
+				 isum->modseq, ifolder->modseq_on_server));
+		} else {
+			c(printf("OK, after QRESYNC we're still in sync. total %u / %u, unread %u / %u, modseq %" G_GUINT64_FORMAT " / %" G_GUINT64_FORMAT "\n",
+				 total, ifolder->exists_on_server,
+				 folder->summary->unread_count, ifolder->unread_on_server,
+				 isum->modseq, ifolder->modseq_on_server));
+			goto done;
+		}
 	}
 
 	imapx_job_scan_changes_start (is, job);
 	return;
 
-exception:
+done:
 	imapx_job_done (is, job);
 }
 
@@ -3358,7 +3942,7 @@
 				CamelMessageInfo *mi = camel_folder_summary_uid (folder->summary, uid);
 
 				if (mi) {
-					imapx_update_summary_for_removed_message (mi, folder);
+					imapx_update_summary_for_removed_message (mi, folder, FALSE);
 					camel_message_info_free (mi);
 				}
 
@@ -3390,7 +3974,7 @@
 	imapx_server_sync_changes (is, job->folder, job->pri, job->ex);
 
 	/* TODO handle UIDPLUS capability */
-	ic = camel_imapx_command_new("EXPUNGE", job->folder->full_name, "EXPUNGE");
+	ic = camel_imapx_command_new(is, "EXPUNGE", job->folder, "EXPUNGE");
 	ic->job = job;
 	ic->pri = job->pri;
 	ic->complete = imapx_command_expunge_done;
@@ -3419,9 +4003,14 @@
 {
 	CamelIMAPXCommand *ic;
 
-	ic = camel_imapx_command_new("LIST", NULL, "%s \"\" %s",
+	ic = camel_imapx_command_new(is, "LIST", NULL, "%s \"\" %s",
 				     (job->u.list.flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED)?"LSUB":"LIST",
 				     job->u.list.pattern);
+	if (job->u.list.ext) {
+		/* Hm, we need a way to add atoms _without_ quoting or using literals */
+		camel_imapx_command_add(ic, " ");
+		camel_imapx_command_add(ic, job->u.list.ext);
+	}
 	ic->pri = job->pri;
 	ic->job = job;
 	ic->complete = imapx_command_list_done;
@@ -3471,7 +4060,7 @@
 		str = "UNSUBSCRIBE";
 
 	encoded_fname = imapx_encode_folder_name ((CamelIMAPXStore *) is->store, job->u.manage_subscriptions.folder_name);
-	ic = camel_imapx_command_new (str, NULL, "%s %s", str, encoded_fname);
+	ic = camel_imapx_command_new (is, str, NULL, "%s %s", str, encoded_fname);
 
 	ic->pri = job->pri;
 	ic->job = job;
@@ -3504,7 +4093,7 @@
 	gchar *encoded_fname = NULL;
 
 	encoded_fname = camel_utf8_utf7 (job->u.folder_name);
-	ic = camel_imapx_command_new ("CREATE", NULL, "CREATE %s", encoded_fname);
+	ic = camel_imapx_command_new (is, "CREATE", NULL, "CREATE %s", encoded_fname);
 	ic->pri = job->pri;
 	ic->job = job;
 	ic->complete = imapx_command_create_folder_done;
@@ -3537,8 +4126,10 @@
 
 	encoded_fname = imapx_encode_folder_name ((CamelIMAPXStore *) is->store, job->u.folder_name);
 
+	job->folder = camel_store_get_folder(is->store, "INBOX", 0, job->ex);
+
 	/* make sure to-be-deleted folder is not selected by selecting INBOX for this operation */
-	ic = camel_imapx_command_new ("DELETE", "INBOX", "DELETE %s", encoded_fname);
+	ic = camel_imapx_command_new (is, "DELETE", job->folder, "DELETE %s", encoded_fname);
 	ic->pri = job->pri;
 	ic->job = job;
 	ic->complete = imapx_command_delete_folder_done;
@@ -3569,10 +4160,12 @@
 	CamelIMAPXCommand *ic;
 	gchar *en_ofname = NULL, *en_nfname = NULL;
 
+	job->folder = camel_store_get_folder(is->store, "INBOX", 0, job->ex);
+
 	en_ofname = imapx_encode_folder_name ((CamelIMAPXStore *) is->store, job->u.rename_folder.ofolder_name);
 	en_nfname = imapx_encode_folder_name ((CamelIMAPXStore *) is->store, job->u.rename_folder.nfolder_name);
 
-	ic = camel_imapx_command_new ("RENAME", "INBOX", "RENAME %s %s", en_ofname, en_nfname);
+	ic = camel_imapx_command_new (is, "RENAME", job->folder, "RENAME %s %s", en_ofname, en_nfname);
 	ic->pri = job->pri;
 	ic->job = job;
 	ic->complete = imapx_command_rename_folder_done;
@@ -3603,10 +4196,7 @@
 {
 	CamelIMAPXCommand *ic;
 
-	if (job->folder)
-		ic = camel_imapx_command_new ("NOOP", job->folder->full_name, "NOOP");
-	else
-		ic = camel_imapx_command_new ("NOOP", NULL, "NOOP");
+	ic = camel_imapx_command_new (is, "NOOP", job->folder, "NOOP");
 
 	ic->job = job;
 	ic->complete = imapx_command_noop_done;
@@ -3629,7 +4219,9 @@
 	{ "\\DRAFT", CAMEL_MESSAGE_DRAFT },
 	{ "\\FLAGGED", CAMEL_MESSAGE_FLAGGED },
 	{ "\\SEEN", CAMEL_MESSAGE_SEEN },
-	{ "\\RECENT", CAMEL_IMAPX_MESSAGE_RECENT }
+	{ "\\RECENT", CAMEL_IMAPX_MESSAGE_RECENT },
+	{ "JUNK", CAMEL_MESSAGE_JUNK },
+	{ "NOTJUNK", CAMEL_MESSAGE_NOTJUNK }
 };
 
 /*
@@ -3688,6 +4280,9 @@
 
 			/* FIXME: move over user flags too */
 		}
+		/* Apply the changes to server-side unread count; it won't tell
+		   us of these changes, of course. */
+		((CamelIMAPXFolder *)job->folder)->unread_on_server += job->u.sync_changes.unread_change;
 	}
 
 	if (job->commands == 0) {
@@ -3753,7 +4348,7 @@
 				if ( (on && (((flags ^ sflags) & flags) & flag))
 				     || (!on && (((flags ^ sflags) & ~flags) & flag))) {
 					if (ic == NULL) {
-						ic = camel_imapx_command_new("STORE", job->folder->full_name, "UID STORE ");
+						ic = camel_imapx_command_new(is, "STORE", job->folder, "UID STORE ");
 						ic->complete = imapx_command_sync_changes_done;
 						ic->job = job;
 						ic->pri = job->pri;
@@ -3766,6 +4361,14 @@
 					imapx_command_queue(is, ic);
 					ic = NULL;
 				}
+				if (flag == CAMEL_MESSAGE_SEEN) {
+					/* Remember how the server's unread count will change if this
+					   command succeeds */
+					if (on)
+						job->u.sync_changes.unread_change--;
+					else
+						job->u.sync_changes.unread_change++;
+				}
 				camel_message_info_free (info);
 			}
 		}
@@ -3781,7 +4384,7 @@
 					CamelIMAPXMessageInfo *info = c->infos->pdata[i];
 
 					if (ic == NULL) {
-						ic = camel_imapx_command_new("STORE", job->folder->full_name, "UID STORE ");
+						ic = camel_imapx_command_new(is, "STORE", job->folder, "UID STORE ");
 						ic->complete = imapx_command_sync_changes_done;
 						ic->job = job;
 						ic->pri = job->pri;
@@ -3935,7 +4538,7 @@
 				errno = EINTR;
 		}
 
-		if (camel_application_is_exiting || is->parser_quit) {
+		if (is->parser_quit) {
 			camel_exception_setv (&ex, CAMEL_EXCEPTION_USER_CANCEL, "Operation Cancelled: %s", g_strerror(errno));
 			break;
 		}
@@ -3954,11 +4557,11 @@
 		}
 	}
 
-	imapx_disconnect (is);
-	cancel_all_jobs (is, &ex);
+	QUEUE_LOCK(is);
+	is->state = IMAPX_SHUTDOWN;
+	QUEUE_UNLOCK(is);
 
-	if (imapx_idle_supported (is))
-		imapx_exit_idle (is);
+	cancel_all_jobs (is, &ex);
 
 	camel_exception_clear (&ex);
 
@@ -4012,11 +4615,29 @@
 static void
 imapx_server_finalise(CamelIMAPXServer *is, CamelIMAPXServerClass *isclass)
 {
+	e(printf("imapx_server_finalise\n"));
+
+	QUEUE_LOCK(is);
+	is->state = IMAPX_SHUTDOWN;
+	QUEUE_UNLOCK(is);
+
+	is->parser_quit = TRUE;
+	camel_operation_cancel (is->op);
+
+	if (is->parser_thread)
+		g_thread_join (is->parser_thread);
+
+	if (is->cinfo && imapx_idle_supported (is))
+		imapx_exit_idle (is);
+
+	imapx_disconnect (is);
+
 	g_static_rec_mutex_free(&is->queue_lock);
 	g_static_rec_mutex_free (&is->ostream_lock);
 	g_hash_table_destroy (is->uid_eflags);
 
 	camel_folder_change_info_free (is->changes);
+
 }
 
 CamelType
@@ -4073,11 +4694,6 @@
 		is->select_folder = NULL;
 	}
 
-	if (is->select) {
-		g_free(is->select);
-		is->select = NULL;
-	}
-
 	if (is->select_pending) {
 		camel_object_unref(is->select_pending);
 		is->select_pending = NULL;
@@ -4097,39 +4713,23 @@
 
 /* Client commands */
 gboolean
-camel_imapx_server_connect (CamelIMAPXServer *is, gboolean connect, CamelException *ex)
+camel_imapx_server_connect (CamelIMAPXServer *is, CamelException *ex)
 {
-	gboolean ret = FALSE;
-
-	CAMEL_SERVICE_REC_LOCK (is->store, connect_lock);
-	if (connect) {
-		if (is->state == IMAPX_AUTHENTICATED || is->state == IMAPX_SELECTED) {
-			ret = TRUE;
-			goto exit;
-		}
+	if (is->state == IMAPX_SHUTDOWN)
+		return FALSE;
 
-		g_static_rec_mutex_lock (&is->ostream_lock);
-		imapx_reconnect (is, ex);
-		g_static_rec_mutex_unlock (&is->ostream_lock);
+	if (is->state >= IMAPX_INITIALISED)
+		return TRUE;
 
-		if (camel_exception_is_set (ex)) {
-			ret = FALSE;
-			goto exit;
-		}
+	g_static_rec_mutex_lock (&is->ostream_lock);
+	imapx_reconnect (is, ex);
+	g_static_rec_mutex_unlock (&is->ostream_lock);
 
-		is->parser_thread = g_thread_create((GThreadFunc) imapx_parser_thread, is, TRUE, NULL);
-		ret = TRUE;
-	} else {
-		is->parser_quit = TRUE;
-		camel_operation_cancel (is->op);
-		if (is->parser_thread)
-			g_thread_join (is->parser_thread);
-		ret = TRUE;
-	}
+	if (camel_exception_is_set (ex))
+		return FALSE;
 
-exit:
-	CAMEL_SERVICE_REC_UNLOCK (is->store, connect_lock);
-	return ret;
+	is->parser_thread = g_thread_create((GThreadFunc) imapx_parser_thread, is, TRUE, NULL);
+	return TRUE;
 }
 
 static CamelStream *
@@ -4152,7 +4752,7 @@
 
 	QUEUE_LOCK (is);
 
-	if ((job = imapx_is_job_in_queue (is, folder->full_name, IMAPX_JOB_GET_MESSAGE, uid))) {
+	if ((job = imapx_is_job_in_queue (is, folder, IMAPX_JOB_GET_MESSAGE, uid))) {
 		flag = g_hash_table_lookup (is->uid_eflags, uid);
 
 		if (pri > job->pri)
@@ -4361,7 +4961,7 @@
 
 	QUEUE_LOCK (is);
 
-	if (imapx_is_job_in_queue (is, folder->full_name, IMAPX_JOB_REFRESH_INFO, NULL)) {
+	if (imapx_is_job_in_queue (is, folder, IMAPX_JOB_REFRESH_INFO, NULL)) {
 		QUEUE_UNLOCK (is);
 		return;
 	}
@@ -4533,7 +5133,7 @@
 
 	QUEUE_LOCK (is);
 
-	if ((job = imapx_is_job_in_queue (is, folder->full_name, IMAPX_JOB_SYNC_CHANGES, NULL))) {
+	if ((job = imapx_is_job_in_queue (is, folder, IMAPX_JOB_SYNC_CHANGES, NULL))) {
 		if (pri > job->pri)
 			job->pri = pri;
 
@@ -4585,7 +5185,7 @@
 	/* Do we really care to wait for this one to finish? */
 	QUEUE_LOCK (is);
 
-	if (imapx_is_job_in_queue (is, folder->full_name, IMAPX_JOB_EXPUNGE, NULL)) {
+	if (imapx_is_job_in_queue (is, folder, IMAPX_JOB_EXPUNGE, NULL)) {
 		QUEUE_UNLOCK (is);
 		return;
 	}
@@ -4646,7 +5246,8 @@
 }
 
 GPtrArray *
-camel_imapx_server_list(CamelIMAPXServer *is, const gchar *top, guint32 flags, CamelException *ex)
+camel_imapx_server_list(CamelIMAPXServer *is, const gchar *top, guint32 flags,
+			const gchar *ext, CamelException *ex)
 {
 	CamelIMAPXJob *job;
 	GPtrArray *folders = NULL;
@@ -4659,6 +5260,7 @@
 	job->start = imapx_job_list_start;
 	job->pri = IMAPX_PRIORITY_LIST;
 	job->ex = ex;
+	job->u.list.ext = ext;
 	job->u.list.flags = flags;
 	job->u.list.folders = g_hash_table_new(imapx_name_hash, imapx_name_equal);
 	job->u.list.pattern = g_alloca(strlen(encoded_name)+5);
diff -Nru evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-server.h evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-server.h
--- evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-server.h	2010-06-20 14:15:36.000000000 +0200
+++ evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-server.h	2010-08-11 20:24:40.000000000 +0200
@@ -75,16 +75,16 @@
 
 	/* info on currently selected folder */
 	struct _CamelFolder *select_folder;
-	gchar *select;
 	struct _CamelFolderChangeInfo *changes;
 	struct _CamelFolder *select_pending;
 	guint32 permanentflags;
-	guint32 uidvalidity;
 	guint32 unseen;
+	guint64 uidvalidity;
+	guint64 highestmodseq;
+	guint32 uidnext;
 	guint32 exists;
 	guint32 recent;
 	guint32 mode;
-	guint32 unread;
 
 	/* any expunges that happened from the last command, they are
 	   processed after the command completes. */
@@ -102,6 +102,8 @@
 	struct _CamelIMAPXIdle *idle;
 	gboolean use_idle;
 
+	gboolean use_qresync;
+
 	/* used for storing eflags to syncronize duplicate get_message requests */
 	GHashTable *uid_eflags;
 };
@@ -115,10 +117,10 @@
 CamelType               camel_imapx_server_get_type     (void);
 CamelIMAPXServer *camel_imapx_server_new(struct _CamelStore *store, struct _CamelURL *url);
 
-gboolean camel_imapx_server_connect(CamelIMAPXServer *is, gint state, CamelException *ex);
+gboolean camel_imapx_server_connect(CamelIMAPXServer *is, CamelException *ex);
 gboolean imapx_connect_to_server (CamelIMAPXServer *is, CamelException *ex);
 
-GPtrArray *camel_imapx_server_list(CamelIMAPXServer *is, const gchar *top, guint32 flags, CamelException *ex);
+GPtrArray *camel_imapx_server_list(CamelIMAPXServer *is, const gchar *top, guint32 flags, const gchar *ext, CamelException *ex);
 
 void camel_imapx_server_refresh_info(CamelIMAPXServer *is, CamelFolder *folder, struct _CamelException *ex);
 void camel_imapx_server_sync_changes(CamelIMAPXServer *is, CamelFolder *folder, CamelException *ex);
diff -Nru evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-store.c evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-store.c
--- evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-store.c	2010-06-20 14:15:36.000000000 +0200
+++ evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-store.c	2010-08-11 20:24:40.000000000 +0200
@@ -124,6 +124,9 @@
 
 	if (camel_url_get_param (url, "use_idle"))
 		istore->rec_options |= IMAPX_USE_IDLE;
+
+	if (camel_url_get_param (url, "use_qresync"))
+		istore->rec_options |= IMAPX_USE_QRESYNC;
 }
 
 static void
@@ -204,16 +207,48 @@
 					service->url->user, service->url->host);
 }
 
+CamelIMAPXServer *
+camel_imapx_store_get_server(CamelIMAPXStore *store, CamelException *ex)
+{
+	CamelIMAPXServer *server = NULL;
+
+	CAMEL_SERVICE_REC_LOCK (store, connect_lock);
+
+	if (store->server && camel_imapx_server_connect(store->server, ex)) {
+		camel_object_ref(store->server);
+		server = store->server;
+	} else {
+		if (store->server) {
+			camel_object_unref(store->server);
+			store->server = NULL;
+		}
+
+		server = camel_imapx_server_new(CAMEL_STORE(store), CAMEL_SERVICE(store)->url);
+		if (camel_imapx_server_connect(server, ex)) {
+			store->server = server;
+			camel_object_ref(server);
+		} else {
+			camel_object_unref(server);
+			server = NULL;
+		}
+	}
+	CAMEL_SERVICE_REC_UNLOCK (store, connect_lock);
+	return server;
+}
+
 static gboolean
 imapx_connect (CamelService *service, CamelException *ex)
 {
 	CamelIMAPXStore *istore = (CamelIMAPXStore *)service;
+	CamelIMAPXServer *server;
 
-	/* We never really are 'connected' or 'disconnected' */
-	if (istore->server == NULL)
-		istore->server = camel_imapx_server_new((CamelStore *)istore, service->url);
+	server = camel_imapx_store_get_server(istore, ex);
+	if (server) {
+		camel_object_unref(server);
+		return TRUE;
+	}
 
-	return camel_imapx_server_connect (istore->server, TRUE, ex);
+	return FALSE;
 }
 
 static gboolean
@@ -223,8 +258,14 @@
 
 	CAMEL_SERVICE_CLASS (parent_class)->disconnect (service, clean, ex);
 
-	if (istore->server)
-		camel_imapx_server_connect(istore->server, FALSE, ex);
+	CAMEL_SERVICE_REC_LOCK (service, connect_lock);
+
+	if (istore->server) {
+		camel_object_unref(istore->server);
+		istore->server = NULL;
+	}
+
+	CAMEL_SERVICE_REC_UNLOCK (service, connect_lock);
 
 	return TRUE;
 }
@@ -267,12 +308,16 @@
 imapx_noop (CamelStore *store, CamelException *ex)
 {
 	CamelIMAPXStore *istore = (CamelIMAPXStore *) store;
+	CamelIMAPXServer *server;
 
 	if (CAMEL_OFFLINE_STORE(store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
 		return;
 
-	if (istore->server && camel_imapx_server_connect (istore->server, TRUE, ex))
-		camel_imapx_server_noop (istore->server, NULL, ex);
+	server = camel_imapx_store_get_server(istore, ex);
+	if (server) {
+		camel_imapx_server_noop (server, NULL, ex);
+		camel_object_unref(server);
+	}
 }
 
 static guint
@@ -528,12 +573,17 @@
 imapx_subscribe_folder (CamelStore *store, const gchar *folder_name, gboolean emit_signal, CamelException *ex)
 {
 	CamelIMAPXStore *istore = (CamelIMAPXStore *) store;
+	CamelIMAPXServer *server;
 
 	if (CAMEL_OFFLINE_STORE(store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
 		return;
 
-	if (istore->server && camel_imapx_server_connect (istore->server, TRUE, ex))
-		camel_imapx_server_manage_subscription (istore->server, folder_name, TRUE, ex);
+	server = camel_imapx_store_get_server(istore, ex);
+	if (!server)
+		return;
+
+	camel_imapx_server_manage_subscription (server, folder_name, TRUE, ex);
+	camel_object_unref(server);
 
 	if (!camel_exception_is_set (ex))
 		imapx_mark_folder_subscribed (istore, folder_name, emit_signal, ex);
@@ -543,12 +593,17 @@
 imapx_unsubscribe_folder (CamelStore *store, const gchar *folder_name, gboolean emit_signal, CamelException *ex)
 {
 	CamelIMAPXStore *istore = (CamelIMAPXStore *) store;
+	CamelIMAPXServer *server;
 
 	if (CAMEL_OFFLINE_STORE(store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
 		return;
 
-	if (istore->server && camel_imapx_server_connect (istore->server, TRUE, ex))
-		camel_imapx_server_manage_subscription (istore->server, folder_name, FALSE, ex);
+	server = camel_imapx_store_get_server(istore, ex);
+	if (!server)
+		return;
+
+	camel_imapx_server_manage_subscription (server, folder_name, FALSE, ex);
+	camel_object_unref(server);
 
 	if (!camel_exception_is_set (ex))
 		imapx_unmark_folder_subscribed (istore, folder_name, emit_signal, ex);
@@ -614,15 +669,19 @@
 imapx_delete_folder (CamelStore *store, const gchar *folder_name, CamelException *ex)
 {
 	CamelIMAPXStore *istore = (CamelIMAPXStore *) store;
+	CamelIMAPXServer *server;
 
 	if (CAMEL_OFFLINE_STORE (store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL) {
 		camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
 				     _("You must be working online to complete this operation"));
 		return;
 	}
+	server = camel_imapx_store_get_server(istore, ex);
+	if (!server)
+		return;
 
-	if (istore->server && camel_imapx_server_connect (istore->server, TRUE, ex))
-		camel_imapx_server_delete_folder (istore->server, folder_name, ex);
+	camel_imapx_server_delete_folder (server, folder_name, ex);
+	camel_object_unref(server);
 
 	if (!camel_exception_is_set (ex))
 		imapx_delete_folder_from_cache (istore, folder_name, ex);
@@ -650,12 +709,6 @@
 				npath = g_strdup(new_name);
 			nfull = camel_imapx_store_summary_path_to_full(istore->summary, npath, istore->dir_sep);
 
-			/* workaround for broken server (courier uses '.') that doesn't rename
-			   subordinate folders as required by rfc 2060 */
-			if (istore->dir_sep == '.') {
-				camel_imapx_server_rename_folder (istore->server, path, nfull, ex);
-			}
-
 			camel_store_info_set_string((CamelStoreSummary *)istore->summary, si, CAMEL_STORE_INFO_PATH, npath);
 			camel_store_info_set_string((CamelStoreSummary *)istore->summary, si, CAMEL_IMAPX_STORE_INFO_FULL_NAME, nfull);
 
@@ -671,6 +724,7 @@
 imapx_rename_folder (CamelStore *store, const gchar *old, const gchar *new, CamelException *ex)
 {
 	CamelIMAPXStore *istore = (CamelIMAPXStore *) store;
+	CamelIMAPXServer *server;
 	gchar *oldpath, *newpath, *storage_path;
 
 	if (CAMEL_OFFLINE_STORE (store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL) {
@@ -682,8 +736,11 @@
 	if (istore->rec_options & IMAPX_SUBSCRIPTIONS)
 		imapx_unsubscribe_folder (store, old, FALSE, ex);
 
-	if (istore->server && camel_imapx_server_connect (istore->server, TRUE, ex))
-		camel_imapx_server_rename_folder (istore->server, old, new, ex);
+	server = camel_imapx_store_get_server(istore, ex);
+	if (server) {
+		camel_imapx_server_rename_folder (server, old, new, ex);
+		camel_object_unref(server);
+	}
 
 	if (camel_exception_is_set (ex)) {
 		imapx_subscribe_folder (store, old, FALSE, ex);
@@ -714,10 +771,10 @@
 static CamelFolderInfo *
 imapx_create_folder (CamelStore *store, const gchar *parent_name, const gchar *folder_name, CamelException *ex)
 {
-	const gchar *c;
 	CamelStoreInfo *si;
 	CamelIMAPXStoreNamespace *ns;
 	CamelIMAPXStore *istore = (CamelIMAPXStore *) store;
+	CamelIMAPXServer *server;
 	gchar *real_name, *full_name, *parent_real;
 	CamelFolderInfo *fi = NULL;
 	gchar dir_sep;
@@ -728,7 +785,8 @@
 		return NULL;
 	}
 
-	if (!(istore->server && camel_imapx_server_connect (istore->server, TRUE, ex)))
+	server = camel_imapx_store_get_server(istore, ex);
+	if (!server)
 		return NULL;
 
 	if (!parent_name)
@@ -740,14 +798,11 @@
 	else
 		dir_sep = '/';
 
-	c = folder_name;
-	while (*c && *c != dir_sep && !strchr ("#%*", *c))
-		c++;
-
-	if (*c != '\0') {
+	if (strchr(folder_name, dir_sep)) {
 		camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_PATH,
 				      _("The folder name \"%s\" is invalid because it contains the character \"%c\""),
-				      folder_name, *c);
+				      folder_name, dir_sep);
+		camel_object_unref(server);
 		return NULL;
 	}
 
@@ -755,6 +810,7 @@
 	if (parent_real == NULL) {
 		camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_STATE,
 				     _("Unknown parent folder: %s"), parent_name);
+		camel_object_unref(server);
 		return NULL;
 	}
 
@@ -762,6 +818,7 @@
 	if (si && si->flags & CAMEL_STORE_INFO_FOLDER_NOINFERIORS) {
 		camel_exception_set (ex, CAMEL_EXCEPTION_FOLDER_INVALID_STATE,
 				_("The parent folder is not allowed to contain subfolders"));
+		camel_object_unref(server);
 		return NULL;
 	}
 
@@ -772,7 +829,8 @@
 	full_name = imapx_concat (istore, parent_real, real_name);
 	g_free(real_name);
 
-	camel_imapx_server_create_folder (istore->server, full_name, ex);
+	camel_imapx_server_create_folder (server, full_name, ex);
+	camel_object_unref(server);
 
 	if (!camel_exception_is_set (ex)) {
 		CamelIMAPXStoreInfo *si;
@@ -897,7 +955,7 @@
 }
 
 static void
-add_folders_to_summary (CamelIMAPXStore *istore, GPtrArray *folders, GHashTable *table, gboolean subcribed)
+add_folders_to_summary (CamelIMAPXStore *istore, CamelIMAPXServer *server, GPtrArray *folders, GHashTable *table, gboolean subscribed)
 {
 	gint i = 0;
 
@@ -905,18 +963,30 @@
 		struct _list_info *li = folders->pdata[i];
 		CamelIMAPXStoreInfo *si;
 		guint32 new_flags;
-		CamelFolderInfo *fi, *hfi;
+		CamelFolderInfo *fi, *sfi;
 		gchar *path;
 		CamelURL *url;
 
+		if (subscribed) {
+			path = camel_imapx_store_summary_path_to_full (istore->summary, li->name, li->separator);
+			sfi = g_hash_table_lookup (table, path);
+			if (sfi)
+				sfi->flags |= CAMEL_STORE_INFO_FOLDER_SUBSCRIBED;
+
+			g_free(path);
+			continue;
+		}
+
 		si = camel_imapx_store_summary_add_from_full (istore->summary, li->name, li->separator);
-		if (!si)
+		if (!si) {
+			camel_object_unref(server);
 			continue;
+		}
 
 		new_flags = (si->info.flags & (CAMEL_STORE_INFO_FOLDER_SUBSCRIBED | CAMEL_STORE_INFO_FOLDER_CHECK_FOR_NEW)) |
 						(li->flags & ~CAMEL_STORE_INFO_FOLDER_SUBSCRIBED);
 
-		if (!(istore->server->cinfo->capa & IMAPX_CAPABILITY_NAMESPACE))
+		if (!istore->server->cinfo || !(istore->server->cinfo->capa & IMAPX_CAPABILITY_NAMESPACE))
 			istore->dir_sep = li->separator;
 
 		if (si->info.flags != new_flags) {
@@ -932,15 +1002,6 @@
 		} else
 			fi->name = g_strdup(camel_store_info_name(istore->summary, si));
 
-		hfi = g_hash_table_lookup (table, fi->full_name);
-		if (hfi) {
-			if (subcribed)
-				hfi->flags |= CAMEL_STORE_INFO_FOLDER_SUBSCRIBED;
-
-			camel_folder_info_free (fi);
-			continue;
-		}
-
 		/* HACK: some servers report noinferiors for all folders (uw-imapd)
 		   We just translate this into nochildren, and let the imap layer enforce
 		   it.  See create folder */
@@ -948,9 +1009,6 @@
 			li->flags = (li->flags & ~CAMEL_FOLDER_NOINFERIORS) | CAMEL_FOLDER_NOCHILDREN;
 		fi->flags = li->flags;
 
-		if (subcribed)
-			fi->flags |= CAMEL_STORE_INFO_FOLDER_SUBSCRIBED;
-
 		url = camel_url_new (istore->base_url, NULL);
 		path = alloca(strlen(fi->full_name)+2);
 		sprintf(path, "/%s", fi->full_name);
@@ -982,15 +1040,16 @@
 }
 
 static void
-fetch_folders_for_pattern (CamelIMAPXStore *istore, const gchar *pattern, guint32 flags, GHashTable *table, CamelException *ex)
+fetch_folders_for_pattern (CamelIMAPXStore *istore, CamelIMAPXServer *server, const gchar *pattern, guint32 flags,
+			   const gchar *ext, GHashTable *table, CamelException *ex)
 {
 	GPtrArray *folders = NULL;
 
-	folders = camel_imapx_server_list (istore->server, pattern, flags, ex);
+	folders = camel_imapx_server_list (server, pattern, flags, ext, ex);
 	if (camel_exception_is_set (ex))
 		return;
 
-	add_folders_to_summary (istore, folders, table, (flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED));
+	add_folders_to_summary (istore, server, folders, table, (flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED));
 
 	g_ptr_array_foreach (folders, free_list, folders);
 	g_ptr_array_free (folders, TRUE);
@@ -1017,9 +1076,14 @@
 static GHashTable *
 fetch_folders_for_namespaces (CamelIMAPXStore *istore, const gchar *pattern, gboolean sync, CamelException *ex)
 {
+	CamelIMAPXServer *server;
 	GHashTable *folders = NULL;
 	GSList *namespaces = NULL, *l;
 
+	server = camel_imapx_store_get_server(istore, ex);
+	if (!server)
+		return NULL;
+
 	folders = g_hash_table_new (folder_hash, folder_eq);
 	namespaces = get_namespaces (istore);
 
@@ -1030,6 +1094,7 @@
 		while (ns) {
 			guint32 flags = 0;
 			gchar *pat = NULL;
+			const gchar *list_ext = NULL;
 
 			if (!pattern) {
 				if (!*ns->path)
@@ -1042,32 +1107,39 @@
 			if (sync)
 				flags |= CAMEL_STORE_FOLDER_INFO_SUBSCRIPTION_LIST;
 
+			if (server->cinfo->capa & IMAPX_CAPABILITY_LIST_EXTENDED)
+				list_ext = "RETURN (SUBSCRIBED)";
+
 			flags |= CAMEL_STORE_FOLDER_INFO_RECURSIVE;
-			fetch_folders_for_pattern (istore, pat, flags, folders, ex);
+			fetch_folders_for_pattern (istore, server, pat, flags, list_ext, folders, ex);
 			if (camel_exception_is_set (ex)) {
 				g_free (pat);
 				goto exception;
 			}
-
-			flags |= CAMEL_STORE_FOLDER_INFO_SUBSCRIBED;
-			fetch_folders_for_pattern (istore, pat, flags, folders, ex);
-			if (camel_exception_is_set (ex)) {
-				g_free (pat);
-				goto exception;
+			if (!list_ext) {
+				/* If the server doesn't support LIST-EXTENDED then we have to
+				   issue LSUB to list the subscribed folders separately */
+				flags |= CAMEL_STORE_FOLDER_INFO_SUBSCRIBED;
+				fetch_folders_for_pattern (istore, server, pat, flags, NULL, folders, ex);
+				if (camel_exception_is_set (ex)) {
+					g_free (pat);
+					goto exception;
+				}
 			}
-
 			g_free (pat);
 
 			if (pattern)
-				return folders;
+				goto out;
 
 			ns = ns->next;
 		}
 	}
-
+ out:
+	camel_object_unref(server);
 	return folders;
 
 exception:
+	camel_object_unref(server);
 	g_hash_table_destroy (folders);
 	return NULL;
 }
diff -Nru evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-store.h evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-store.h
--- evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-store.h	2010-06-20 14:15:36.000000000 +0200
+++ evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-store.h	2010-08-11 20:24:40.000000000 +0200
@@ -47,6 +47,7 @@
 #define IMAPX_SUBSCRIPTIONS		(1 << 5)
 #define IMAPX_CHECK_LSUB		(1 << 6)
 #define IMAPX_USE_IDLE			(1 << 7)
+#define IMAPX_USE_QRESYNC		(1 << 8)
 
 typedef struct {
 	CamelOfflineStore parent_object;
@@ -79,6 +80,7 @@
 
 /* Standard Camel function */
 CamelType camel_imapx_store_get_type (void);
+struct _CamelIMAPXServer *camel_imapx_store_get_server(CamelIMAPXStore *store, CamelException *ex);
 
 #ifdef __cplusplus
 }
diff -Nru evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-store-summary.c evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-store-summary.c
--- evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-store-summary.c	2010-06-20 14:15:36.000000000 +0200
+++ evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-store-summary.c	2010-07-18 19:42:46.000000000 +0200
@@ -36,8 +36,8 @@
 #include "camel-imapx-utils.h"
 #include "camel-imapx-store-summary.h"
 
-#define d(x)
-#define io(x)			/* io debug */
+#define d(x) camel_imapx_debug(debug, x)
+#define io(x) camel_imapx_debug(io, x)
 
 #define CAMEL_IMAPX_STORE_SUMMARY_VERSION_0 (0)
 
@@ -171,44 +171,26 @@
 camel_imapx_store_summary_full_to_path(CamelIMAPXStoreSummary *s, const gchar *full_name, gchar dir_sep)
 {
 	gchar *path, *p;
-	gint c;
-	const gchar *f;
+
+	p = path = g_strdup(full_name);
 
 	if (dir_sep != '/') {
-		p = path = alloca(strlen(full_name)*3+1);
-		f = full_name;
-		while ((c = *f++ & 0xff)) {
-			if (c == dir_sep)
-				*p++ = '/';
-			else if (c == '/' || c == '%')
-				p += sprintf(p, "%%%02X", c);
-			else
-				*p++ = c;
+		while (*p) {
+			if (*p == '/')
+				*p = dir_sep;
+			else if (*p == dir_sep)
+				*p = '/';
+			p++;
 		}
-		*p = 0;
-	} else
-		path = (gchar *)full_name;
-
-	return g_strdup(path);
-}
-
-static guint32 hexnib(guint32 c)
-{
-	if (c >= '0' && c <= '9')
-		return c-'0';
-	else if (c>='A' && c <= 'Z')
-		return c-'A'+10;
-	else
-		return 0;
+	}
+	return path;
 }
 
 gchar *
 camel_imapx_store_summary_path_to_full(CamelIMAPXStoreSummary *s, const gchar *path, gchar dir_sep)
 {
 	gchar *full, *f;
-	guint32 c, v = 0;
 	const gchar *p;
-	gint state=0;
 	gchar *subpath, *last = NULL;
 	CamelStoreInfo *si;
 	CamelIMAPXStoreNamespace *ns;
@@ -234,7 +216,6 @@
 
 	ns = camel_imapx_store_summary_namespace_find_path(s, path);
 
-	f = full = alloca(strlen(path)*2+1);
 	if (si)
 		p = path + strlen(subpath);
 	else if (ns)
@@ -242,32 +223,19 @@
 	else
 		p = path;
 
-	while ((c = camel_utf8_getc((const guchar **)&p))) {
-		switch (state) {
-		case 0:
-			if (c == '%')
-				state = 1;
-			else {
-				if (c == '/')
-					c = dir_sep;
-				camel_utf8_putc((guchar **) &f, c);
-			}
-			break;
-		case 1:
-			state = 2;
-			v = hexnib(c)<<4;
-			break;
-		case 2:
-			state = 0;
-			v |= hexnib(c);
-			camel_utf8_putc((guchar **) &f, v);
-			break;
+	f = full = g_strdup(p);
+	if (dir_sep != '/') {
+		while (*f) {
+			if (*f == '/')
+				*f = dir_sep;
+			else if (*f == dir_sep)
+				*f = '/';
+			f++;
 		}
 	}
-	camel_utf8_putc((guchar **) &f, c);
 
 	/* merge old path part if required */
-	f = g_strdup(full);
+	f = full;
 	if (si) {
 		full = g_strdup_printf("%s%s", camel_imapx_store_info_full_name(s, si), f);
 		g_free(f);
diff -Nru evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-stream.c evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-stream.c
--- evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-stream.c	2010-06-20 14:15:36.000000000 +0200
+++ evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-stream.c	2010-07-18 19:42:46.000000000 +0200
@@ -37,8 +37,8 @@
 #include "camel-imapx-stream.h"
 #include "camel-imapx-exception.h"
 
-#define t(x) 
-#define io(x)
+#define t(x) camel_imapx_debug(token, x)
+#define io(x) camel_imapx_debug(io, x)
 
 static CamelObjectClass *parent_class = NULL;
 
@@ -303,6 +303,7 @@
 			memcpy(p, start, inlen);
 			p += inlen;
 		} while (ret > 0);
+		*p = 0;
 		*data = is->tokenptr;
 		return 0;
 	case IMAPX_TOK_ERROR:
@@ -341,6 +342,7 @@
 			memcpy(p, start, inlen);
 			p += inlen;
 		} while (ret > 0);
+		*p = 0;
 		*data = is->tokenptr;
 		return 0;
 	case IMAPX_TOK_TOKEN:
@@ -402,7 +404,7 @@
 	return ret;
 }
 
-guint32
+guint64
 camel_imapx_stream_number(CamelIMAPXStream *is, CamelException *ex)
 {
 	guchar *token;
@@ -413,7 +415,7 @@
 		return 0;
 	}
 
-	return strtoul((gchar *)token, 0, 10);
+	return strtoull((gchar *)token, 0, 10);
 }
 
 gint
diff -Nru evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-stream.h evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-stream.h
--- evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-stream.h	2010-06-20 14:15:36.000000000 +0200
+++ evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-stream.h	2010-07-18 19:42:46.000000000 +0200
@@ -87,7 +87,8 @@
 gint		 camel_imapx_stream_text		(CamelIMAPXStream *is, guchar **text, CamelException *ex);
 
 /* gets a 'number' */
-guint32		 camel_imapx_stream_number(CamelIMAPXStream *is, CamelException *ex);
+guint64		 camel_imapx_stream_number	(CamelIMAPXStream *is,
+						 CamelException *ex);
 
 /* skips the rest of a line, including literals, etc */
 gint camel_imapx_stream_skip(CamelIMAPXStream *is, CamelException *ex);
diff -Nru evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-summary.c evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-summary.c
--- evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-summary.c	2010-06-20 14:15:36.000000000 +0200
+++ evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-summary.c	2010-08-11 20:24:40.000000000 +0200
@@ -40,10 +40,10 @@
 #include "camel-imapx-summary.h"
 //#include "camel-imap-utils.h"
 
-#define CAMEL_IMAPX_SUMMARY_VERSION (3)
+#define CAMEL_IMAPX_SUMMARY_VERSION (4)
 
-#define EXTRACT_FIRST_DIGIT(val) val=strtoul (part, &part, 10);
-#define EXTRACT_DIGIT(val) if (*part) part++; val=strtoul (part, &part, 10);
+#define EXTRACT_FIRST_DIGIT(val) val=strtoull (part, &part, 10);
+#define EXTRACT_DIGIT(val) if (*part) part++; val=strtoull (part, &part, 10);
 
 static gint summary_header_load (CamelFolderSummary *, FILE *);
 static gint summary_header_save (CamelFolderSummary *, FILE *);
@@ -239,8 +239,15 @@
 		EXTRACT_DIGIT (ims->validity)
 	}
 
+	if (ims->version >= 4) {
+		if (part)
+			EXTRACT_DIGIT (ims->uidnext);
+		if (part)
+			EXTRACT_DIGIT (ims->modseq);
+	}
+
 	if (ims->version > CAMEL_IMAPX_SUMMARY_VERSION) {
-		g_warning("Unkown summary version\n");
+		g_warning("Unknown summary version\n");
 		errno = EINVAL;
 		return -1;
 	}
@@ -252,13 +259,19 @@
 summary_header_load (CamelFolderSummary *s, FILE *in)
 {
 	CamelIMAPXSummary *ims = CAMEL_IMAPX_SUMMARY (s);
+	guint32 validity;
+	gint ret;
 
 	if (camel_imapx_summary_parent->summary_header_load (s, in) == -1)
 		return -1;
 
 	/* Legacy version */
-	if (s->version == 0x30c)
-		return camel_file_util_decode_uint32(in, &ims->validity);
+	if (s->version == 0x30c) {
+		ret = camel_file_util_decode_uint32(in, &validity);
+		if (!ret)
+			ims->validity = validity;
+		return ret;
+	}
 
 	/* Version 1 */
 	if (camel_file_util_decode_fixed_int32(in, (gint32 *) &ims->version) == -1)
@@ -272,11 +285,14 @@
 			return -1;
 	}
 
-	if (camel_file_util_decode_fixed_int32(in, (gint32 *) &ims->validity) == -1)
+	if (camel_file_util_decode_fixed_int32(in, (gint32 *) &validity) == -1)
 		return -1;
+	ims->validity = validity;
 
-	if (ims->version > CAMEL_IMAPX_SUMMARY_VERSION) {
-		g_warning("Unkown summary version\n");
+	/* This is only used for migration; will never be asked to load newer
+	   versions of the store format */
+	if (ims->version > 3) {
+		g_warning("Unknown summary version\n");
 		errno = EINVAL;
 		return -1;
 	}
@@ -293,22 +309,17 @@
 	fir = camel_imapx_summary_parent->summary_header_to_db (s, ex);
 	if (!fir)
 		return NULL;
-	fir->bdata = g_strdup_printf ("%d %u", CAMEL_IMAPX_SUMMARY_VERSION, ims->validity);
-
+	fir->bdata = g_strdup_printf ("%d %llu %u %llu", CAMEL_IMAPX_SUMMARY_VERSION,
+				      (unsigned long long)ims->validity, ims->uidnext,
+				      (unsigned long long)ims->modseq);
 	return fir;
 }
 
 static gint
 summary_header_save (CamelFolderSummary *s, FILE *out)
 {
-	CamelIMAPXSummary *ims = CAMEL_IMAPX_SUMMARY(s);
-
-	if (camel_imapx_summary_parent->summary_header_save (s, out) == -1)
-		return -1;
-
-	camel_file_util_encode_fixed_int32(out, CAMEL_IMAPX_SUMMARY_VERSION);
-
-	return camel_file_util_encode_fixed_int32(out, ims->validity);
+	g_warning("imapx %s called; should never happen!\n", __func__);
+	return -1;
 }
 
 static CamelMessageInfo *
diff -Nru evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-summary.h evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-summary.h
--- evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-summary.h	2010-06-20 14:15:36.000000000 +0200
+++ evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-summary.h	2010-08-11 20:24:40.000000000 +0200
@@ -35,6 +35,8 @@
 				 CAMEL_MESSAGE_DELETED | \
 				 CAMEL_MESSAGE_DRAFT | \
 				 CAMEL_MESSAGE_FLAGGED | \
+				 CAMEL_MESSAGE_JUNK | \
+				 CAMEL_MESSAGE_NOTJUNK | \
 				 CAMEL_MESSAGE_SEEN)
 
 G_BEGIN_DECLS
@@ -58,7 +60,9 @@
 	CamelFolderSummary parent;
 
 	guint32 version;
-	guint32 validity;
+	guint32 uidnext;
+	guint64 validity;
+	guint64 modseq;
 };
 
 struct _CamelIMAPXSummaryClass {
diff -Nru evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-tokens.txt evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-tokens.txt
--- evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-tokens.txt	2010-04-12 22:59:14.000000000 +0200
+++ evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-tokens.txt	2010-07-18 19:42:46.000000000 +0200
@@ -11,18 +11,22 @@
 BYE,		IMAPX_BYE
 CAPABILITY,	IMAPX_CAPABILITY
 COPYUID,	IMAPX_COPYUID
+CLOSED,		IMAPX_CLOSED
 ENVELOPE,	IMAPX_ENVELOPE
 EXISTS,		IMAPX_EXISTS
 EXPUNGE,	IMAPX_EXPUNGE
 FETCH,		IMAPX_FETCH
 FLAGS,		IMAPX_FLAGS
+HIGHESTMODSEQ,	IMAPX_HIGHESTMODSEQ
 INTERNALDATE,	IMAPX_INTERNALDATE
 LIST,		IMAPX_LIST
 LSUB,		IMAPX_LSUB
 MESSAGES,	IMAPX_MESSAGES
+MODSEQ,		IMAPX_MODSEQ
 NAMESPACE,	IMAPX_NAMESPACE
 NEWNAME,	IMAPX_NEWNAME
 NO,		IMAPX_NO
+NOMODSEQ,	IMAPX_NOMODSEQ
 OK,		IMAPX_OK
 PARSE,		IMAPX_PARSE
 PERMANENTFLAGS,	IMAPX_PERMANENTFLAGS
@@ -39,3 +43,4 @@
 UIDVALIDITY,	IMAPX_UIDVALIDITY
 UNSEEN,		IMAPX_UNSEEN
 UIDNEXT,	IMAPX_UIDNEXT
+VANISHED,	IMAPX_VANISHED
diff -Nru evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-utils.c evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-utils.c
--- evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-utils.c	2010-06-20 14:15:36.000000000 +0200
+++ evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-utils.c	2010-08-11 20:24:40.000000000 +0200
@@ -7,6 +7,7 @@
 #include <camel/camel-store.h>
 #include <camel/camel-utf8.h>
 #include <camel/camel-string-utils.h>
+#include <camel/camel-debug.h>
 
 #include "camel-imapx-folder.h"
 #include "camel-imapx-stream.h"
@@ -17,9 +18,32 @@
 #include "libedataserver/e-memory.h"
 
 /* high-level parser state */
-#define p(x)
+#define p(x) camel_imapx_debug(parse, x)
 /* debug */
-#define d(x)
+#define d(x) camel_imapx_debug(debug, x)
+
+gint camel_imapx_debug_flags;
+
+#define debug_set_flag(flag) do { \
+	if ((CAMEL_IMAPX_DEBUG_ALL & CAMEL_IMAPX_DEBUG_ ## flag) &&	\
+	    camel_debug("imapx:" #flag))				\
+		camel_imapx_debug_flags |= CAMEL_IMAPX_DEBUG_ ## flag;	\
+	} while (0)
+
+static void camel_imapx_set_debug_flags(void)
+{
+	if (camel_debug("imapx")) {
+		camel_imapx_debug_flags = CAMEL_IMAPX_DEBUG_ALL;
+		return;
+	}
+
+	debug_set_flag(command);
+	debug_set_flag(debug);
+	debug_set_flag(extra);
+	debug_set_flag(io);
+	debug_set_flag(token);
+	debug_set_flag(parse);
+}
 
 #include "camel-imapx-tokenise.h"
 #define SUBFOLDER_DIR_NAME     "subfolders"
@@ -39,7 +63,6 @@
 
 static void imapx_namespace_clear (CamelIMAPXStoreNamespace **ns);
 static const gchar * rename_label_flag (const gchar *flag, gint len, gboolean server_to_evo);
-static GPtrArray *imapx_parse_uids (CamelIMAPXStream *is, CamelException *ex);
 
 /* flag table */
 static struct {
@@ -52,6 +75,8 @@
 	{ "\\FLAGGED", CAMEL_MESSAGE_FLAGGED },
 	{ "\\SEEN", CAMEL_MESSAGE_SEEN },
 	{ "\\RECENT", CAMEL_IMAPX_MESSAGE_RECENT },
+	{ "JUNK", CAMEL_MESSAGE_JUNK },
+	{ "NOTJUNK", CAMEL_MESSAGE_NOTJUNK },
 	{ "\\*", CAMEL_MESSAGE_USER }
 };
 
@@ -73,7 +98,7 @@
 	if (tok == '(') {
 		do {
 			tok = camel_imapx_stream_token(stream, &token, &len, ex);
-			if (tok == IMAPX_TOK_TOKEN) {
+			if (tok == IMAPX_TOK_TOKEN || tok == IMAPX_TOK_INT) {
 				p = token;
 				// FIXME: ascii_toupper
 				while ((c=*p))
@@ -211,9 +236,10 @@
 }
 
 gboolean
-imapx_update_message_info_flags (CamelMessageInfo *info, guint32 server_flags, CamelFlag *server_user_flags, CamelFolder *folder)
+imapx_update_message_info_flags (CamelMessageInfo *info, guint32 server_flags, CamelFlag *server_user_flags, CamelFolder *folder, gboolean unsolicited)
 {
 	gboolean changed = FALSE;
+	CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *)folder;
 	CamelIMAPXMessageInfo *xinfo = (CamelIMAPXMessageInfo *) info;
 
 	if (server_flags != xinfo->server_flags)
@@ -243,8 +269,11 @@
 					deleted == 1 ? "deleted" : ( deleted == -1 ? "undeleted" : ""),
 					junk == 1 ? "junk" : ( junk == -1 ? "unjunked" : "")));
 
-		if (read)
+		if (read) {
 			folder->summary->unread_count -= read;
+			if (unsolicited)
+				ifolder->unread_on_server -= read;
+		}
 		if (deleted)
 			folder->summary->deleted_count += deleted;
 		if (junk)
@@ -316,9 +345,10 @@
 }
 
 void
-imapx_update_summary_for_removed_message (CamelMessageInfo *info, CamelFolder *folder)
+imapx_update_summary_for_removed_message (CamelMessageInfo *info, CamelFolder *folder, gboolean unsolicited)
 {
 	CamelMessageInfoBase *dinfo = (CamelMessageInfoBase *) info;
+	CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *)folder;
 	gint unread=0, deleted=0, junk=0;
 	guint32 flags;
 
@@ -332,9 +362,11 @@
 	if (flags & CAMEL_MESSAGE_JUNK)
 		junk = 1;
 
-	if (unread)
+	if (unread) {
 		folder->summary->unread_count--;
-
+		if (unsolicited)
+			ifolder->unread_on_server--;
+	}
 	if (deleted)
 		folder->summary->deleted_count--;
 	if (junk)
@@ -389,6 +421,10 @@
 	{ "LITERAL+", IMAPX_CAPABILITY_LITERALPLUS },
 	{ "STARTTLS", IMAPX_CAPABILITY_STARTTLS },
 	{ "IDLE", IMAPX_CAPABILITY_IDLE },
+	{ "CONDSTORE", IMAPX_CAPABILITY_CONDSTORE },
+	{ "QRESYNC", IMAPX_CAPABILITY_QRESYNC },
+	{ "LIST-EXTENDED", IMAPX_CAPABILITY_LIST_EXTENDED },
+	{ "LIST-STATUS", IMAPX_CAPABILITY_LIST_STATUS },
 };
 
 struct _capability_info *
@@ -404,8 +440,13 @@
 	cinfo->auth_types = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify) g_free, NULL);
 
 	/* FIXME: handle auth types */
-	while (!camel_exception_is_set (ex) && (tok = camel_imapx_stream_token(stream, &token, &len, ex)) != '\n') {
+	while ((tok = camel_imapx_stream_token(stream, &token, &len, ex)) != '\n' &&
+	       !camel_exception_is_set (ex)) {
 		switch (tok) {
+			case ']':
+				/* Put it back so that imapx_untagged() isn't unhappy */
+				camel_imapx_stream_ungettoken(stream, tok, token, len);
+				return cinfo;
 			case 43:
 				token = (guchar *) g_strconcat ((gchar *)token, "+", NULL);
 				free_token = TRUE;
@@ -1280,6 +1321,32 @@
 	return section;
 }
 
+static guint64
+imapx_parse_modseq(CamelIMAPXStream *is, CamelException *ex)
+{
+	guint64 ret;
+	gint tok;
+	guint len;
+	guchar *token;
+
+	
+	tok = camel_imapx_stream_token(is, &token, &len, ex);
+	if (tok != '(') {
+		camel_exception_set (ex, 1, "fetch: expecting '('");
+		return 0;
+	}
+	ret = camel_imapx_stream_number(is, ex);
+	if (camel_exception_is_set(ex))
+		return 0;
+
+	tok = camel_imapx_stream_token(is, &token, &len, ex);
+	if (tok != ')') {
+		camel_exception_set (ex, 1, "fetch: expecting '('");
+		return 0;
+	}
+	return ret;
+}
+
 void
 imapx_free_fetch(struct _fetch_info *finfo)
 {
@@ -1412,6 +1479,10 @@
 				finfo->cinfo = imapx_parse_body(is, ex);
 				finfo->got |= FETCH_CINFO;
 				break;
+			case IMAPX_MODSEQ:
+				finfo->modseq = imapx_parse_modseq(is, ex);
+				finfo->got |= FETCH_MODSEQ;
+				break;
 			case IMAPX_BODY:
 				tok = camel_imapx_stream_token(is, &token, &len, ex);
 				camel_imapx_stream_ungettoken(is, tok, token, len);
@@ -1471,7 +1542,12 @@
 	sinfo = g_malloc0 (sizeof(*sinfo));
 
 	/* skip the folder name */
-	camel_imapx_stream_token (is, &token, &len, ex);
+	camel_imapx_stream_astring (is, &token, ex);
+	if (camel_exception_is_set(ex)) {
+		g_free (sinfo);
+		return NULL;
+	}
+	sinfo->name = camel_utf7_utf8 ((gchar *)token);
 
 	tok = camel_imapx_stream_token(is, &token, &len, ex);
 	if (tok != '(') {
@@ -1497,6 +1573,11 @@
 			case IMAPX_UNSEEN:
 				sinfo->unseen = camel_imapx_stream_number (is, ex);
 				break;
+			case IMAPX_HIGHESTMODSEQ:
+				sinfo->highestmodseq = camel_imapx_stream_number (is, ex);
+				break;
+			case IMAPX_NOMODSEQ:
+			break;
 			default:
 				g_free (sinfo);
 				camel_exception_set (ex, 1, "unknown status response");
@@ -1522,7 +1603,7 @@
 		g_ptr_array_add (uids, GUINT_TO_POINTER (i));
 }
 
-static GPtrArray *
+GPtrArray *
 imapx_parse_uids (CamelIMAPXStream *is, CamelException *ex)
 {
 	GPtrArray *uids = g_ptr_array_new ();
@@ -1544,7 +1625,7 @@
 			generate_uids_from_sequence (uids, uid1, uid2);
 			g_strfreev (seq);
 		} else {
-			guint32 uid = strtoul ((gchar *) token, NULL, 10);
+			guint32 uid = strtoul ((gchar *) splits[i], NULL, 10);
 			g_ptr_array_add (uids, GUINT_TO_POINTER (uid));
 		}
 	}
@@ -1604,6 +1685,7 @@
 			case IMAPX_ALERT:
 			case IMAPX_PARSE:
 			case IMAPX_TRYCREATE:
+			case IMAPX_CLOSED:
 				break;
 			case IMAPX_APPENDUID:
 				sinfo->u.appenduid.uidvalidity = camel_imapx_stream_number(is, ex);
@@ -1634,6 +1716,12 @@
 			case IMAPX_UNSEEN:
 				sinfo->u.unseen = camel_imapx_stream_number(is, ex);
 				break;
+			case IMAPX_HIGHESTMODSEQ:
+				sinfo->u.highestmodseq = camel_imapx_stream_number(is, ex);
+				break;
+			case IMAPX_CAPABILITY:
+				sinfo->u.cinfo = imapx_parse_capability(is, ex);
+				break;
 			default:
 				sinfo->condition = IMAPX_UNKNOWN;
 				d(printf("Got unknown response code: %s: ignored\n", token));
@@ -1689,6 +1777,10 @@
 		g_ptr_array_free (sinfo->u.copyuid.uids, FALSE);
 		g_ptr_array_free (sinfo->u.copyuid.copied_uids, FALSE);
 		break;
+	case IMAPX_CAPABILITY:
+		if (sinfo->u.cinfo)
+			imapx_free_capability(sinfo->u.cinfo);
+		break;
 	default:
 		break;
 	}
@@ -1707,6 +1799,7 @@
 	{ "\\NOSELECT", CAMEL_FOLDER_NOSELECT },
 	{ "\\MARKED", 1<< 16},
 	{ "\\UNMARKED", 1<< 17},
+	{ "\\SUBSCRIBED", CAMEL_FOLDER_SUBSCRIBED },
 };
 
 struct _list_info *
@@ -1884,6 +1977,7 @@
 
 		imapx_specials[i] = v;
 	}
+	camel_imapx_set_debug_flags();
 }
 
 guchar imapx_is_mask(const gchar *p)
diff -Nru evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-utils.h evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-utils.h
--- evolution-data-server-2.30.2.1/camel/providers/imapx/camel-imapx-utils.h	2010-06-20 14:15:36.000000000 +0200
+++ evolution-data-server-2.30.3/camel/providers/imapx/camel-imapx-utils.h	2010-08-11 20:24:40.000000000 +0200
@@ -20,19 +20,23 @@
 	IMAPX_BODYSTRUCTURE,
 	IMAPX_BYE,
 	IMAPX_CAPABILITY,
+	IMAPX_CLOSED,
 	IMAPX_COPYUID,
 	IMAPX_ENVELOPE,
 	IMAPX_EXISTS,
 	IMAPX_EXPUNGE,
 	IMAPX_FETCH,
 	IMAPX_FLAGS,
+	IMAPX_HIGHESTMODSEQ,
 	IMAPX_INTERNALDATE,
 	IMAPX_LIST,
 	IMAPX_LSUB,
 	IMAPX_MESSAGES,
+	IMAPX_MODSEQ,
 	IMAPX_NAMESPACE,
 	IMAPX_NEWNAME,
 	IMAPX_NO,
+	IMAPX_NOMODSEQ,
 	IMAPX_OK,
 	IMAPX_PARSE,
 	IMAPX_PERMANENTFLAGS,
@@ -49,6 +53,7 @@
 	IMAPX_UIDVALIDITY,
 	IMAPX_UNSEEN,
 	IMAPX_UIDNEXT,
+	IMAPX_VANISHED,
 } camel_imapx_id_t;
 
 /* str MUST be in upper case, tokenised using gperf function */
@@ -61,12 +66,13 @@
 
 /* ********************************************************************** */
 
+GPtrArray *imapx_parse_uids (struct _CamelIMAPXStream *is, CamelException *ex);
 void imapx_parse_flags(struct _CamelIMAPXStream *stream, guint32 *flagsp, struct _CamelFlag **user_flagsp, CamelException *ex);
 void imapx_write_flags(CamelStream *stream, guint32 flags, struct _CamelFlag *user_flags, CamelException *ex);
-gboolean imapx_update_message_info_flags (CamelMessageInfo *info, guint32 server_flags, CamelFlag *server_user_flags, CamelFolder *folder);
+gboolean imapx_update_message_info_flags (CamelMessageInfo *info, guint32 server_flags, CamelFlag *server_user_flags, CamelFolder *folder, gboolean unsolicited);
 void imapx_set_message_info_flags_for_new_message (CamelMessageInfo *info, guint32 server_flags, CamelFlag *server_user_flags,
 							CamelFolder *folder);
-void imapx_update_summary_for_removed_message (CamelMessageInfo *info, CamelFolder *folder);
+void imapx_update_summary_for_removed_message (CamelMessageInfo *info, CamelFolder *folder, gboolean unsolicited);
 void imapx_update_store_summary (CamelFolder *folder);
 
 /* ********************************************************************** */
@@ -77,8 +83,12 @@
 	IMAPX_CAPABILITY_NAMESPACE		= (1 << 3),
 	IMAPX_CAPABILITY_UIDPLUS		= (1 << 4),
 	IMAPX_CAPABILITY_LITERALPLUS		= (1 << 5),
-	IMAPX_CAPABILITY_STARTTLS                = (1 << 6),
+	IMAPX_CAPABILITY_STARTTLS		= (1 << 6),
 	IMAPX_CAPABILITY_IDLE			= (1 << 7),
+	IMAPX_CAPABILITY_CONDSTORE		= (1 << 8),
+	IMAPX_CAPABILITY_QRESYNC		= (1 << 9),
+	IMAPX_CAPABILITY_LIST_STATUS		= (1 << 10),
+	IMAPX_CAPABILITY_LIST_EXTENDED		= (1 << 11),
 };
 
 struct _capability_info {
@@ -111,6 +121,7 @@
 	guint32 size;		/* RFC822.SIZE */
 	guint32 offset;		/* start offset of a BODY[]<offset.length> request */
 	guint32 flags;		/* FLAGS */
+	guint64 modseq;		/* MODSEQ */
 	struct _CamelFlag *user_flags;
 	gchar *date;		/* INTERNALDATE */
 	gchar *section;		/* section for a BODY[section] request */
@@ -128,6 +139,7 @@
 #define FETCH_DATE (1<<8)
 #define FETCH_SECTION (1<<9)
 #define FETCH_UID (1<<10)
+#define FETCH_MODSEQ (1<<11)
 
 struct _fetch_info *imapx_parse_fetch(struct _CamelIMAPXStream *is, CamelException *ex);
 void imapx_free_fetch(struct _fetch_info *finfo);
@@ -137,7 +149,7 @@
 
 struct _status_info {
 	camel_imapx_id_t result; /* ok/no/bad/preauth only, user_cancel - client response */
-	camel_imapx_id_t condition; /* read-only/read-write/alert/parse/trycreate/newname/permanentflags/uidvalidity/unseen */
+	camel_imapx_id_t condition; /* read-only/read-write/alert/parse/trycreate/newname/permanentflags/uidvalidity/unseen/highestmodseq */
 
 	union {
 		struct {
@@ -145,18 +157,20 @@
 			gchar *newname;
 		} newname;
 		guint32 permanentflags;
-		guint32 uidvalidity;
+		guint64 uidvalidity;
 		guint32 uidnext;
 		guint32 unseen;
+		guint64 highestmodseq;
 		struct {
-			guint32 uidvalidity;
+			guint64 uidvalidity;
 			guint32 uid;
 		} appenduid;
 		struct {
-			guint32 uidvalidity;
+			guint64 uidvalidity;
 			GPtrArray *uids;
 			GPtrArray *copied_uids;
 		} copyuid;
+		struct _capability_info *cinfo;
 	} u;
 
 	gchar *text;
@@ -169,11 +183,13 @@
 /* ********************************************************************** */
 /* parses the response from the status command */
 struct _state_info {
+	gchar *name;
 	guint32 messages;
 	guint32 recent;
 	guint32 uidnext;
-	guint32 uidvalidity;
 	guint32 unseen;
+	guint64 uidvalidity;
+	guint64 highestmodseq;
 };
 
 /* use g_free to free the return value */
@@ -214,6 +230,19 @@
 
 #define imapx_is_atom(s) (imapx_is_mask(s) & IMAPX_TYPE_ATOM_CHAR)
 
+extern gint camel_imapx_debug_flags;
+#define CAMEL_IMAPX_DEBUG_command	(1<<0)
+#define CAMEL_IMAPX_DEBUG_debug		(1<<1)
+#define CAMEL_IMAPX_DEBUG_extra		(1<<2)
+#define CAMEL_IMAPX_DEBUG_io		(1<<3)
+#define CAMEL_IMAPX_DEBUG_token		(1<<4)
+#define CAMEL_IMAPX_DEBUG_parse		(1<<5)
+
+/* Set this to zero to remove all debug output at build time */
+#define CAMEL_IMAPX_DEBUG_ALL		((1<<6)-1)
+
+#define camel_imapx_debug(type, ...) do { if (camel_imapx_debug_flags & CAMEL_IMAPX_DEBUG_ALL & CAMEL_IMAPX_DEBUG_ ## type) { __VA_ARGS__ ; } } while (0)
+
 /* ********************************************************************** */
 
 void imapx_utils_init(void);
diff -Nru evolution-data-server-2.30.2.1/configure evolution-data-server-2.30.3/configure
--- evolution-data-server-2.30.2.1/configure	2010-06-21 17:23:25.000000000 +0200
+++ evolution-data-server-2.30.3/configure	2010-08-11 22:55:10.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for evolution-data-server 2.30.2.1.
+# Generated by GNU Autoconf 2.65 for evolution-data-server 2.30.3.
 #
 # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution-Data-Server>.
 #
@@ -702,8 +702,8 @@
 # Identity of this package.
 PACKAGE_NAME='evolution-data-server'
 PACKAGE_TARNAME='evolution-data-server'
-PACKAGE_VERSION='2.30.2.1'
-PACKAGE_STRING='evolution-data-server 2.30.2.1'
+PACKAGE_VERSION='2.30.3'
+PACKAGE_STRING='evolution-data-server 2.30.3'
 PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution-Data-Server'
 PACKAGE_URL=''
 
@@ -1699,7 +1699,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures evolution-data-server 2.30.2.1 to adapt to many kinds of systems.
+\`configure' configures evolution-data-server 2.30.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1770,7 +1770,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of evolution-data-server 2.30.2.1:";;
+     short | recursive ) echo "Configuration of evolution-data-server 2.30.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1977,7 +1977,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-evolution-data-server configure 2.30.2.1
+evolution-data-server configure 2.30.3
 generated by GNU Autoconf 2.65
 
 Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2348,7 +2348,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by evolution-data-server $as_me 2.30.2.1, which was
+It was created by evolution-data-server $as_me 2.30.3, which was
 generated by GNU Autoconf 2.65.  Invocation command line was
 
   $ $0 $@
@@ -3156,7 +3156,7 @@
 
 # Define the identity of the package.
  PACKAGE='evolution-data-server'
- VERSION='2.30.2.1'
+ VERSION='2.30.3'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3328,7 +3328,7 @@
 
 EDS_MAJOR_VERSION=2
 EDS_MINOR_VERSION=30
-EDS_MICRO_VERSION=2
+EDS_MICRO_VERSION=3
 
 LIBEDATASERVER_CURRENT=13
 LIBEDATASERVER_REVISION=1
@@ -19730,7 +19730,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by evolution-data-server $as_me 2.30.2.1, which was
+This file was extended by evolution-data-server $as_me 2.30.3, which was
 generated by GNU Autoconf 2.65.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -19796,7 +19796,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-evolution-data-server config.status 2.30.2.1
+evolution-data-server config.status 2.30.3
 configured by $0, generated by GNU Autoconf 2.65,
   with options \\"\$ac_cs_config\\"
 
diff -Nru evolution-data-server-2.30.2.1/configure.ac evolution-data-server-2.30.3/configure.ac
--- evolution-data-server-2.30.2.1/configure.ac	2010-06-21 17:23:03.000000000 +0200
+++ evolution-data-server-2.30.3/configure.ac	2010-06-22 21:00:20.000000000 +0200
@@ -1,7 +1,7 @@
 dnl Evolution-Data-Server version
 m4_define([eds_major_version], [2])
 m4_define([eds_minor_version], [30])
-m4_define([eds_micro_version], [2])
+m4_define([eds_micro_version], [3])
 
 m4_define([eds_version],
 	[eds_major_version.eds_minor_version.eds_micro_version])
@@ -19,7 +19,7 @@
 
 dnl Autoconf / Automake Initialization
 AC_PREREQ(2.58)
-AC_INIT([evolution-data-server],[eds_version].1,[http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution-Data-Server])
+AC_INIT([evolution-data-server],[eds_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution-Data-Server])
 AM_INIT_AUTOMAKE([gnu 1.9 tar-ustar -Wall -Werror foreign])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_SRCDIR(README)
diff -Nru evolution-data-server-2.30.2.1/debian/changelog evolution-data-server-2.30.3/debian/changelog
--- evolution-data-server-2.30.2.1/debian/changelog	2010-07-10 14:30:15.000000000 +0200
+++ evolution-data-server-2.30.3/debian/changelog	2010-09-21 21:00:56.000000000 +0200
@@ -1,3 +1,34 @@
+evolution-data-server (2.30.3-2) unstable; urgency=low
+
+  [ Josselin Mouette ]
+  * 01_imapx_lockup.patch: stolen upstream. Avoid evolution lockups when 
+    logging out with IDLE enabled.
+
+  [ Yves-Alexis Perez ]
+  * debian/patches:
+    - 101-Bug-629714-endless-loop-in-imapx_parse_status,
+      102-Bug-630135-No-UI-feedback-when-imapx-connection-fail,
+      103-Bug-630150-imapx-attempts-to-connect-to-server-when-,
+      104-Bug-630152-imapx_parser_thread-registers-wrong-opera,
+      105-Bug-629916-imapx-fails-to-handle-errors-in-imapx_com and
+      106-Bug-630149-imapx_sync-never-returns-error added, fix various issues
+      with IMAP+ backend leading to endless loops.
+
+ -- Yves-Alexis Perez <corsac@debian.org>  Tue, 21 Sep 2010 21:00:52 +0200
+
+evolution-data-server (2.30.3-1) unstable; urgency=low
+
+  * New upstream bugfix release.
+  * debian/patches:
+    - 01_make-nss-db-init-more-robust dropped, included upstream
+    - 02_remove-courier-imap-workaround-breaking-rename as well. 
+  * debian/control:
+    - update standards version to 3.9.1.
+  * debian/*.shlibs:
+    - bump shlibs to 2.30.3.
+
+ -- Yves-Alexis Perez <corsac@debian.org>  Sat, 14 Aug 2010 13:47:40 +0200
+
 evolution-data-server (2.30.2.1-1) unstable; urgency=low
 
   * New upstream bugfix release.
diff -Nru evolution-data-server-2.30.2.1/debian/control evolution-data-server-2.30.3/debian/control
--- evolution-data-server-2.30.2.1/debian/control	2010-07-03 16:15:09.000000000 +0200
+++ evolution-data-server-2.30.3/debian/control	2010-08-12 08:40:31.000000000 +0200
@@ -12,7 +12,7 @@
            Pedro Fragoso <ember@ubuntu.com>,
            Josselin Mouette <joss@debian.org>,
            David Weinehall <tao@debian.org>
-Standards-Version: 3.9.0
+Standards-Version: 3.9.1
 Dm-Upload-Allowed: yes
 Homepage: http://www.gnome.org/projects/evolution/
 Vcs-Svn: svn://svn.debian.org/svn/pkg-evolution/unstable/evolution-data-server
diff -Nru evolution-data-server-2.30.2.1/debian/libcamel1.2-14.shlibs evolution-data-server-2.30.3/debian/libcamel1.2-14.shlibs
--- evolution-data-server-2.30.2.1/debian/libcamel1.2-14.shlibs	2010-06-21 00:24:36.000000000 +0200
+++ evolution-data-server-2.30.3/debian/libcamel1.2-14.shlibs	2010-08-12 08:41:29.000000000 +0200
@@ -1,2 +1,2 @@
-libcamel-1.2 14 libcamel1.2-14 (>= 2.30.2), libcamel1.2-14 (<< 2.31)
-libcamel-provider-1.2 14 libcamel1.2-14 (>= 2.30.2), libcamel1.2-14 (<< 2.31)
+libcamel-1.2 14 libcamel1.2-14 (>= 2.30.3), libcamel1.2-14 (<< 2.31)
+libcamel-provider-1.2 14 libcamel1.2-14 (>= 2.30.3), libcamel1.2-14 (<< 2.31)
diff -Nru evolution-data-server-2.30.2.1/debian/patches/01_imapx_lockup.patch evolution-data-server-2.30.3/debian/patches/01_imapx_lockup.patch
--- evolution-data-server-2.30.2.1/debian/patches/01_imapx_lockup.patch	1970-01-01 01:00:00.000000000 +0100
+++ evolution-data-server-2.30.3/debian/patches/01_imapx_lockup.patch	2010-09-18 12:34:45.000000000 +0200
@@ -0,0 +1,21 @@
+From 5e04a3462d5266b5a651562ab32fd572b348fc7a Mon Sep 17 00:00:00 2001
+From: David Woodhouse <David.Woodhouse@intel.com>
+Date: Tue, 14 Sep 2010 21:57:18 +0000
+Subject: Bug 629714 - endless loop in imapx_parse_status()
+
+---
+diff --git a/camel/providers/imapx/camel-imapx-utils.c b/camel/providers/imapx/camel-imapx-utils.c
+index f77ed3a..359891e 100644
+--- a/camel/providers/imapx/camel-imapx-utils.c
++++ b/camel/providers/imapx/camel-imapx-utils.c
+@@ -1731,7 +1731,7 @@ imapx_parse_status(CamelIMAPXStream *is, CamelException *ex)
+ 		/* ignore anything we dont know about */
+ 		do {
+ 			tok = camel_imapx_stream_token(is, &token, &len, ex);
+-			if (tok == '\n') {
++			if (tok == '\n' || tok < 0) {
+ 				camel_exception_set (ex, 1, "server response truncated");
+ 				imapx_free_status(sinfo);
+ 				return NULL;
+--
+cgit v0.8.3.1
diff -Nru evolution-data-server-2.30.2.1/debian/patches/01_make-nss-db-init-more-robust.patch evolution-data-server-2.30.3/debian/patches/01_make-nss-db-init-more-robust.patch
--- evolution-data-server-2.30.2.1/debian/patches/01_make-nss-db-init-more-robust.patch	2010-07-03 16:15:09.000000000 +0200
+++ evolution-data-server-2.30.3/debian/patches/01_make-nss-db-init-more-robust.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,74 +0,0 @@
-commit 1ca0f0d2db265fcded9c74954d3651e1ba2b40b1
-Author: David Woodhouse <David.Woodhouse@intel.com>
-Date:   Fri Jul 2 10:58:11 2010 +0100
-
-    Make NSS database initialisation more robust, handle errors better
-    
-    Since commit 9116943e we only attempt to open the new SQL database, but
-    some users are reporting issues. Be more careful about reporting errors
-    when that happens, and also fall back to the old DBM database if the SQL
-    database fails to initialise.
-    (cherry picked from commit fe84f63ac7b0eb51356451e5aafe02e27a03d4e4)
-
-diff --git a/camel/camel.c b/camel/camel.c
-index de3885f..f53bb7a 100644
---- a/camel/camel.c
-+++ b/camel/camel.c
-@@ -32,6 +32,7 @@
- #include <prthread.h>
- #include "nss.h"      /* Don't use <> here or it will include the system nss.h instead */
- #include <ssl.h>
-+#include <errno.h>
- #endif /* HAVE_NSS */
- 
- #include <glib.h>
-@@ -104,7 +105,7 @@ camel_init (const gchar *configdir, gboolean nss_init)
- 	if (nss_init) {
- 		gchar *nss_configdir = NULL;
- 		gchar *nss_sql_configdir = NULL;
--		SECStatus status;
-+		SECStatus status = SECFailure;
- 		PRUint16 indx;
- 
- 		if (nss_initlock == NULL) {
-@@ -138,7 +139,9 @@ camel_init (const gchar *configdir, gboolean nss_init)
- #else
- 			gchar *user_nss_dir = g_build_filename ( g_get_home_dir (),
- 								 ".pki/nssdb", NULL );
--			g_mkdir_with_parents (user_nss_dir, 0700);
-+			if (g_mkdir_with_parents (user_nss_dir, 0700))
-+				g_warning("Failed to create SQL database directory %s: %s\n",
-+					  user_nss_dir, strerror(errno));
- 
- 			nss_sql_configdir = g_strconcat ("sql:", user_nss_dir, NULL);
- 			g_free(user_nss_dir);
-@@ -160,15 +163,14 @@ camel_init (const gchar *configdir, gboolean nss_init)
- 			0);			/* flags */
- 
- 		if (status == SECFailure) {
--			g_free (nss_configdir);
--			g_free (nss_sql_configdir);
--			g_warning ("Failed to initialize NSS");
--			PR_Unlock (nss_initlock);
--			return -1;
-+			g_warning ("Failed to initialize NSS SQL database in %s: NSS error %d",
-+				   nss_sql_configdir, PORT_GetError());
-+			/* Fall back to opening the old DBM database */
- 		}
--#else
-+#endif
- 		/* Support old versions of libnss, pre-sqlite support. */
--		status = NSS_InitReadWrite (nss_configdir);
-+		if (status == SECFailure)
-+			status = NSS_InitReadWrite (nss_configdir);
- 		if (status == SECFailure) {
- 			/* Fall back to using volatile dbs? */
- 			status = NSS_NoDB_Init (nss_configdir);
-@@ -180,7 +182,6 @@ camel_init (const gchar *configdir, gboolean nss_init)
- 				return -1;
- 			}
- 		}
--#endif
- 
- 		nss_initialized = TRUE;
- skip_nss_init:
diff -Nru evolution-data-server-2.30.2.1/debian/patches/02_remove-courier-imap-workaround-breaking-rename.patch evolution-data-server-2.30.3/debian/patches/02_remove-courier-imap-workaround-breaking-rename.patch
--- evolution-data-server-2.30.2.1/debian/patches/02_remove-courier-imap-workaround-breaking-rename.patch	2010-07-03 16:15:09.000000000 +0200
+++ evolution-data-server-2.30.3/debian/patches/02_remove-courier-imap-workaround-breaking-rename.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,33 +0,0 @@
-commit f9cef2566ba5e2fc0732256eb726017a8820ca77
-Author: David Woodhouse <David.Woodhouse@intel.com>
-Date:   Thu Jun 24 15:41:30 2010 +0100
-
-    Remove courier-imap rename workaround
-    
-    This is breaking things on non-buggy servers, because after renaming the
-    folder in question we also attempt to rename all its subfolders... and
-    quite reasonably get a failure.
-    
-    Testing against current versions of Courier (4.4.0) seems to suggest
-    that it's not actually necessary, either -- perhaps the bug has been
-    fixed in the 9 years since this hack was first added to the imap back
-    end in commit bfce883e.
-    (cherry picked from commit 4083bbc36154ea91b203d7b672df5584978dfb10)
-
-diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c
-index 72ec38a..7556773 100644
---- a/camel/providers/imapx/camel-imapx-store.c
-+++ b/camel/providers/imapx/camel-imapx-store.c
-@@ -650,12 +650,6 @@ rename_folder_info (CamelIMAPXStore *istore, const gchar *old_name, const gchar
- 				npath = g_strdup(new_name);
- 			nfull = camel_imapx_store_summary_path_to_full(istore->summary, npath, istore->dir_sep);
- 
--			/* workaround for broken server (courier uses '.') that doesn't rename
--			   subordinate folders as required by rfc 2060 */
--			if (istore->dir_sep == '.') {
--				camel_imapx_server_rename_folder (istore->server, path, nfull, ex);
--			}
--
- 			camel_store_info_set_string((CamelStoreSummary *)istore->summary, si, CAMEL_STORE_INFO_PATH, npath);
- 			camel_store_info_set_string((CamelStoreSummary *)istore->summary, si, CAMEL_IMAPX_STORE_INFO_FULL_NAME, nfull);
- 
diff -Nru evolution-data-server-2.30.2.1/debian/patches/102-Bug-630135-No-UI-feedback-when-imapx-connection-fail.patch evolution-data-server-2.30.3/debian/patches/102-Bug-630135-No-UI-feedback-when-imapx-connection-fail.patch
--- evolution-data-server-2.30.2.1/debian/patches/102-Bug-630135-No-UI-feedback-when-imapx-connection-fail.patch	1970-01-01 01:00:00.000000000 +0100
+++ evolution-data-server-2.30.3/debian/patches/102-Bug-630135-No-UI-feedback-when-imapx-connection-fail.patch	2010-09-21 00:10:00.000000000 +0200
@@ -0,0 +1,30 @@
+From 7dfbd0660bd8311ea7e06bf76e578afdc15840cd Mon Sep 17 00:00:00 2001
+From: David Woodhouse <David.Woodhouse@intel.com>
+Date: Mon, 20 Sep 2010 11:25:10 +0100
+Subject: [PATCH 2/6] Bug 630135 - No UI feedback when imapx connection fails
+
+Don't call camel_operation_cancel(NULL). That has undesired effects.
+
+Only call camel_operation_cancel(server->op) if it's non-NULL -- i.e. if the
+parser thread had actually started up and set it.
+---
+ camel/providers/imapx/camel-imapx-server.c |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
+index a11a979..61121da 100644
+--- a/camel/providers/imapx/camel-imapx-server.c
++++ b/camel/providers/imapx/camel-imapx-server.c
+@@ -4647,7 +4647,8 @@ imapx_server_finalise(CamelIMAPXServer *is, CamelIMAPXServerClass *isclass)
+ 	QUEUE_UNLOCK(is);
+ 
+ 	is->parser_quit = TRUE;
+-	camel_operation_cancel (is->op);
++	if (is->op)
++		camel_operation_cancel (is->op);
+ 
+ 	if (is->parser_thread)
+ 		g_thread_join (is->parser_thread);
+-- 
+1.7.1
+
diff -Nru evolution-data-server-2.30.2.1/debian/patches/103-Bug-630150-imapx-attempts-to-connect-to-server-when-.patch evolution-data-server-2.30.3/debian/patches/103-Bug-630150-imapx-attempts-to-connect-to-server-when-.patch
--- evolution-data-server-2.30.2.1/debian/patches/103-Bug-630150-imapx-attempts-to-connect-to-server-when-.patch	1970-01-01 01:00:00.000000000 +0100
+++ evolution-data-server-2.30.3/debian/patches/103-Bug-630150-imapx-attempts-to-connect-to-server-when-.patch	2010-09-21 00:10:00.000000000 +0200
@@ -0,0 +1,28 @@
+From ebb8a861406825a27ef3f8f09039455bdbe7ca9e Mon Sep 17 00:00:00 2001
+From: David Woodhouse <David.Woodhouse@intel.com>
+Date: Mon, 20 Sep 2010 13:30:13 +0100
+Subject: [PATCH 3/6] Bug 630150 - imapx attempts to connect to server when already cancelled
+
+---
+ camel/providers/imapx/camel-imapx-store.c |    5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c
+index 79567ea..1fd4148 100644
+--- a/camel/providers/imapx/camel-imapx-store.c
++++ b/camel/providers/imapx/camel-imapx-store.c
+@@ -211,6 +211,11 @@ camel_imapx_store_get_server(CamelIMAPXStore *store, CamelException *ex)
+ {
+ 	CamelIMAPXServer *server = NULL;
+ 
++	if (camel_operation_cancel_check(NULL)) {
++		camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
++				     _("Cancelled"));
++		return NULL;
++	}
+ 	CAMEL_SERVICE_REC_LOCK (store, connect_lock);
+ 
+ 	if (store->server && camel_imapx_server_connect(store->server, ex)) {
+-- 
+1.7.1
+
diff -Nru evolution-data-server-2.30.2.1/debian/patches/104-Bug-630152-imapx_parser_thread-registers-wrong-opera.patch evolution-data-server-2.30.3/debian/patches/104-Bug-630152-imapx_parser_thread-registers-wrong-opera.patch
--- evolution-data-server-2.30.2.1/debian/patches/104-Bug-630152-imapx_parser_thread-registers-wrong-opera.patch	1970-01-01 01:00:00.000000000 +0100
+++ evolution-data-server-2.30.3/debian/patches/104-Bug-630152-imapx_parser_thread-registers-wrong-opera.patch	2010-09-21 00:10:00.000000000 +0200
@@ -0,0 +1,25 @@
+From 1cccc30897f4bb8003841636cbddc639170a62fb Mon Sep 17 00:00:00 2001
+From: David Woodhouse <David.Woodhouse@intel.com>
+Date: Mon, 20 Sep 2010 13:47:48 +0100
+Subject: [PATCH 4/6] Bug 630152 - imapx_parser_thread registers wrong operation
+
+---
+ camel/providers/imapx/camel-imapx-server.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
+index 61121da..b0397a7 100644
+--- a/camel/providers/imapx/camel-imapx-server.c
++++ b/camel/providers/imapx/camel-imapx-server.c
+@@ -4494,7 +4494,7 @@ imapx_parser_thread (gpointer d)
+ 	CamelOperation *op;
+ 
+ 	op = camel_operation_new (NULL, NULL);
+-	op = camel_operation_register (op);
++	camel_operation_register (op);
+ 	is->op = op;
+ 
+ 	while (!camel_exception_is_set (&ex) && is->stream) {
+-- 
+1.7.1
+
diff -Nru evolution-data-server-2.30.2.1/debian/patches/105-Bug-629916-imapx-fails-to-handle-errors-in-imapx_com.patch evolution-data-server-2.30.3/debian/patches/105-Bug-629916-imapx-fails-to-handle-errors-in-imapx_com.patch
--- evolution-data-server-2.30.2.1/debian/patches/105-Bug-629916-imapx-fails-to-handle-errors-in-imapx_com.patch	1970-01-01 01:00:00.000000000 +0100
+++ evolution-data-server-2.30.3/debian/patches/105-Bug-629916-imapx-fails-to-handle-errors-in-imapx_com.patch	2010-09-21 00:10:00.000000000 +0200
@@ -0,0 +1,67 @@
+From 6bab108176cdbeb1ee259ab01160db4c5fbbba5d Mon Sep 17 00:00:00 2001
+From: David Woodhouse <David.Woodhouse@intel.com>
+Date: Mon, 20 Sep 2010 15:18:03 +0100
+Subject: [PATCH 5/6] Bug 629916 - imapx fails to handle errors in imapx_command_idle_stop()
+
+---
+ camel/providers/imapx/camel-imapx-server.c |   22 ++++++++++++++++++----
+ 1 files changed, 18 insertions(+), 4 deletions(-)
+
+diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
+index b0397a7..5d6b1e2 100644
+--- a/camel/providers/imapx/camel-imapx-server.c
++++ b/camel/providers/imapx/camel-imapx-server.c
+@@ -942,7 +942,9 @@ imapx_command_start_next(CamelIMAPXServer *is, CamelException *ex)
+ 		if (imapx_in_idle (is) && !camel_dlist_empty (&is->queue)) {
+ 			/* if imapx_stop_idle() returns FALSE, it was only
+ 			   pending and we can go ahead and send a new command
+-			   immediately. If it returns TRUE, we must wait. */
++			   immediately. If it returns TRUE, either it sent the
++			   DONE to exit IDLE mode, or there was an error.
++			   Either way, we do nothing more right now. */
+ 			if (imapx_stop_idle (is, ex)) {
+ 				c(printf ("waiting for idle to stop \n"));
+ 				return;
+@@ -1725,7 +1727,10 @@ imapx_continuation(CamelIMAPXServer *imap, CamelException *ex, gboolean litplus)
+ 			/* IDLE got cancelled after we sent the command, while
+ 			   we were waiting for this continuation. Send DONE
+ 			   immediately. */
+-			imapx_command_idle_stop(imap, ex);
++			if (!imapx_command_idle_stop (imap, ex)) {
++				IDLE_UNLOCK(imap->idle);
++				return -1;
++			}
+ 			imap->idle->state = IMAPX_IDLE_OFF;
+ 		} else {
+ 			c(printf("idle starts in wrong state %d\n",
+@@ -2052,6 +2057,11 @@ imapx_command_idle_stop (CamelIMAPXServer *is, CamelException *ex)
+ {
+ 	if (!is->stream || camel_stream_printf((CamelStream *)is->stream, "%s", "DONE\r\n") == -1) {
+ 		camel_exception_set (ex, 1, "Unable to issue DONE");
++		c(printf("Failed to issue DONE to terminate IDLE\n"));
++		is->state = IMAPX_SHUTDOWN;
++		if (is->op)
++			camel_operation_cancel(is->op);
++		is->parser_quit = TRUE;
+ 		return FALSE;
+ 	}
+ 
+@@ -2218,9 +2228,13 @@ imapx_stop_idle (CamelIMAPXServer *is, CamelException *ex)
+ 		break;
+ 
+ 	case IMAPX_IDLE_STARTED:
+-		imapx_command_idle_stop (is, ex);
+-		idle->state = IMAPX_IDLE_OFF;
++		/* We set 'stopped' even if sending DONE fails, to ensure that
++		   our caller doesn't try to submit its own command. */
+ 		stopped = TRUE;
++		if (!imapx_command_idle_stop (is, ex))
++			break;
++
++		idle->state = IMAPX_IDLE_OFF;
+ 		c(printf("Stopping idle after %ld seconds\n",
+ 			 (long)(now - idle->started)));
+ 	case IMAPX_IDLE_PENDING:
+-- 
+1.7.1
+
diff -Nru evolution-data-server-2.30.2.1/debian/patches/106-Bug-630149-imapx_sync-never-returns-error.patch evolution-data-server-2.30.3/debian/patches/106-Bug-630149-imapx_sync-never-returns-error.patch
--- evolution-data-server-2.30.2.1/debian/patches/106-Bug-630149-imapx_sync-never-returns-error.patch	1970-01-01 01:00:00.000000000 +0100
+++ evolution-data-server-2.30.3/debian/patches/106-Bug-630149-imapx_sync-never-returns-error.patch	2010-09-21 00:10:00.000000000 +0200
@@ -0,0 +1,42 @@
+From 237352d97330812bbbb0f061c3a01e35374da19c Mon Sep 17 00:00:00 2001
+From: David Woodhouse <David.Woodhouse@intel.com>
+Date: Mon, 20 Sep 2010 13:29:20 +0100
+Subject: [PATCH 6/6] Bug 630149 - imapx_sync() never returns error
+
+---
+ camel/providers/imapx/camel-imapx-folder.c |   11 ++++++-----
+ 1 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/camel/providers/imapx/camel-imapx-folder.c b/camel/providers/imapx/camel-imapx-folder.c
+index 44f8410..87b49d0 100644
+--- a/camel/providers/imapx/camel-imapx-folder.c
++++ b/camel/providers/imapx/camel-imapx-folder.c
+@@ -172,19 +172,20 @@ imapx_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
+ 		ex = &eex;
+ 
+ 	server = camel_imapx_store_get_server(is, ex);
+-	if (server)
+-		camel_imapx_server_sync_changes (server, folder, ex);
++	if (!server)
++		return;
++
++	camel_imapx_server_sync_changes (server, folder, ex);
+ 
+ 	/* Sync twice - make sure deleted flags are written out,
+ 	   then sync again incase expunge changed anything */
+ 	camel_exception_clear(ex);
+ 
+-	if (server && expunge) {
++	if (expunge) {
+ 		camel_imapx_server_expunge(server, folder, ex);
+ 		camel_exception_clear(ex);
+ 	}
+-	if (server)
+-		camel_object_unref(server);
++	camel_object_unref(server);
+ }
+ 
+ static CamelMimeMessage *
+-- 
+1.7.1
+
diff -Nru evolution-data-server-2.30.2.1/debian/patches/series evolution-data-server-2.30.3/debian/patches/series
--- evolution-data-server-2.30.2.1/debian/patches/series	2010-07-03 16:15:09.000000000 +0200
+++ evolution-data-server-2.30.3/debian/patches/series	2010-09-21 00:02:06.000000000 +0200
@@ -1,5 +1,9 @@
-01_make-nss-db-init-more-robust.patch
-02_remove-courier-imap-workaround-breaking-rename.patch
+01_imapx_lockup.patch
 25_mute-debug-messages.patch
 45_libcamel_providers_version.patch
 65_evolution-color.patch
+102-Bug-630135-No-UI-feedback-when-imapx-connection-fail.patch
+103-Bug-630150-imapx-attempts-to-connect-to-server-when-.patch
+104-Bug-630152-imapx_parser_thread-registers-wrong-opera.patch
+105-Bug-629916-imapx-fails-to-handle-errors-in-imapx_com.patch
+106-Bug-630149-imapx_sync-never-returns-error.patch
diff -Nru evolution-data-server-2.30.2.1/docs/reference/addressbook/libebook/html/ch01.html evolution-data-server-2.30.3/docs/reference/addressbook/libebook/html/ch01.html
--- evolution-data-server-2.30.2.1/docs/reference/addressbook/libebook/html/ch01.html	2010-06-21 17:40:32.000000000 +0200
+++ evolution-data-server-2.30.3/docs/reference/addressbook/libebook/html/ch01.html	2010-08-11 23:04:31.000000000 +0200
@@ -21,7 +21,7 @@
 </tr></table>
 <div class="chapter" title="Evolution-Data-Server Manual: Address Book Client (libebook)">
 <div class="titlepage"><div><div><h2 class="title">
-<a name="id2832241"></a>Evolution-Data-Server Manual: Address Book Client (libebook)</h2></div></div></div>
+<a name="id2815994"></a>Evolution-Data-Server Manual: Address Book Client (libebook)</h2></div></div></div>
 <div class="toc"><dl>
 <dt>
 <span class="refentrytitle"><a href="EBook.html">EBook</a></span><span class="refpurpose"> — The primary Evolution addressbook client object.</span>
diff -Nru evolution-data-server-2.30.2.1/docs/reference/addressbook/libebook/html/EDestination.html evolution-data-server-2.30.3/docs/reference/addressbook/libebook/html/EDestination.html
--- evolution-data-server-2.30.2.1/docs/reference/addressbook/libebook/html/EDestination.html	2010-06-21 17:40:32.000000000 +0200
+++ evolution-data-server-2.30.3/docs/reference/addressbook/libebook/html/EDestination.html	2010-08-11 23:04:31.000000000 +0200
@@ -287,8 +287,9 @@
 <a name="e-destination-get-address"></a><h3>e_destination_get_address ()</h3>
 <pre class="programlisting">const <span class="returnvalue">gchar</span> *       e_destination_get_address           (<em class="parameter"><code>const <a class="link" href="EDestination.html" title="EDestination"><span class="type">EDestination</span></a> *dest</code></em>);</pre>
 <p>
-Gets the formatted name and e-mail address, or in the case of
-lists, the formatted list of e-mail addresses, from <em class="parameter"><code>dest</code></em>.
+Gets the encoded name and email address, or in the case of lists, the
+encoded list of email addresses, from <em class="parameter"><code>dest</code></em>.  The returned string is
+suitable for use in an email header, but not for displaying to users.
 </p>
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
@@ -300,7 +301,8 @@
 </tr>
 <tr>
 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
-<td> A formatted destination string, or <code class="literal">NULL</code> if the destination was empty.
+<td> an encoded destination string suitable for use in an
+         email header, or <code class="literal">NULL</code> if the destination was empty
 </td>
 </tr>
 </tbody>
diff -Nru evolution-data-server-2.30.2.1/docs/reference/libedataserver/html/ch01.html evolution-data-server-2.30.3/docs/reference/libedataserver/html/ch01.html
--- evolution-data-server-2.30.2.1/docs/reference/libedataserver/html/ch01.html	2010-06-21 17:40:33.000000000 +0200
+++ evolution-data-server-2.30.3/docs/reference/libedataserver/html/ch01.html	2010-08-11 23:04:34.000000000 +0200
@@ -21,7 +21,7 @@
 </tr></table>
 <div class="chapter" title="Evolution-Data-Server Manual: Utilities (libedataserver)">
 <div class="titlepage"><div><div><h2 class="title">
-<a name="id2610980"></a>Evolution-Data-Server Manual: Utilities (libedataserver)</h2></div></div></div>
+<a name="id2806223"></a>Evolution-Data-Server Manual: Utilities (libedataserver)</h2></div></div></div>
 <div class="toc"><dl>
 <dt>
 <span class="refentrytitle"><a href="EAccount.html">EAccount</a></span><span class="refpurpose"></span>
diff -Nru evolution-data-server-2.30.2.1/docs/reference/libedataserver/html/libedataserver-Version-Information.html evolution-data-server-2.30.3/docs/reference/libedataserver/html/libedataserver-Version-Information.html
--- evolution-data-server-2.30.2.1/docs/reference/libedataserver/html/libedataserver-Version-Information.html	2010-06-21 17:40:33.000000000 +0200
+++ evolution-data-server-2.30.3/docs/reference/libedataserver/html/libedataserver-Version-Information.html	2010-08-11 23:04:34.000000000 +0200
@@ -174,7 +174,7 @@
 <hr>
 <div class="refsect2" title="EDS_MICRO_VERSION">
 <a name="EDS-MICRO-VERSION:CAPS"></a><h3>EDS_MICRO_VERSION</h3>
-<pre class="programlisting">#define EDS_MICRO_VERSION 2
+<pre class="programlisting">#define EDS_MICRO_VERSION 3
 </pre>
 <p>
 The micro version number of the Evolution-Data-Server library.  Like
diff -Nru evolution-data-server-2.30.2.1/docs/reference/libedataserverui/html/ch01.html evolution-data-server-2.30.3/docs/reference/libedataserverui/html/ch01.html
--- evolution-data-server-2.30.2.1/docs/reference/libedataserverui/html/ch01.html	2010-06-21 17:40:33.000000000 +0200
+++ evolution-data-server-2.30.3/docs/reference/libedataserverui/html/ch01.html	2010-08-11 23:04:35.000000000 +0200
@@ -21,7 +21,7 @@
 </tr></table>
 <div class="chapter" title="Evolution-Data-Server Manual: Graphical Utilities (libedataserverui)">
 <div class="titlepage"><div><div><h2 class="title">
-<a name="id2577732"></a>Evolution-Data-Server Manual: Graphical Utilities (libedataserverui)</h2></div></div></div>
+<a name="id2635759"></a>Evolution-Data-Server Manual: Graphical Utilities (libedataserverui)</h2></div></div></div>
 <div class="toc"><dl>
 <dt>
 <span class="refentrytitle"><a href="libedataserverui-e-book-auth-util.html">e-book-auth-util</a></span><span class="refpurpose"></span>
diff -Nru evolution-data-server-2.30.2.1/libedataserver/eds-version.h evolution-data-server-2.30.3/libedataserver/eds-version.h
--- evolution-data-server-2.30.2.1/libedataserver/eds-version.h	2010-06-21 17:23:35.000000000 +0200
+++ evolution-data-server-2.30.3/libedataserver/eds-version.h	2010-08-11 22:55:38.000000000 +0200
@@ -50,7 +50,7 @@
  * time, rather than from the library linked against at application run
  * time.
  **/
-#define EDS_MICRO_VERSION 2
+#define EDS_MICRO_VERSION 3
 
 /**
  * EDS_CHECK_VERSION:
diff -Nru evolution-data-server-2.30.2.1/NEWS evolution-data-server-2.30.3/NEWS
--- evolution-data-server-2.30.2.1/NEWS	2010-06-21 17:23:03.000000000 +0200
+++ evolution-data-server-2.30.3/NEWS	2010-08-11 22:54:33.000000000 +0200
@@ -1,8 +1,20 @@
-Evolution-Data-Server 2.30.2.1 2010-06-21
------------------------------------------
+Evolution-Data-Server 2.30.3 2010-08-11
+---------------------------------------
+
+Bug Fixes:
+	Bug 602287 - Avoid racing with camel_operation_mute() (Matthew Barnes)
+	Bug 622008 - Don't trust is->select_folder in
+	             imapx_job_scan_changes_done() (David Woodhouse)
+	Bug 623795 - URI at the end of text isn't clickable (Milan Crha)
+	Bug 623936 - 75 second delay when creating new DAV entries in Zimbra
+	             (Milan Crha)
+
+Other Changes:
+	* Tons of IMAPX improvements backported from 2.31 (David Woodhouse)
+	* Use text/vcard content type on WebDAV PUT request (Milan Crha)
 
-	This update reverts an API break in e_destination_get_address().
-	More details at https://bugzilla.gnome.org/show_bug.cgi?id=619347
+Translations:
+	Christian Kirbach (de)
 
 Evolution-Data-Server 2.30.2 2010-06-20
 ---------------------------------------
diff -Nru evolution-data-server-2.30.2.1/po/de.po evolution-data-server-2.30.3/po/de.po
diff -Nru evolution-data-server-2.30.2.1/servers/groupwise/build-timestamp.h evolution-data-server-2.30.3/servers/groupwise/build-timestamp.h
--- evolution-data-server-2.30.2.1/servers/groupwise/build-timestamp.h	2010-06-21 17:14:10.000000000 +0200
+++ evolution-data-server-2.30.3/servers/groupwise/build-timestamp.h	2010-08-11 22:55:52.000000000 +0200
@@ -1 +1 @@
-const char *build_timestamp = "Evolution-Data-Server-2.30-2010-06-21";
+const char *build_timestamp = "Evolution-Data-Server-2.30-2010-08-11";
diff -Nru gtkhtml3.14-3.30.2/aclocal.m4 gtkhtml3.14-3.30.3/aclocal.m4
--- gtkhtml3.14-3.30.2/aclocal.m4	2010-06-20 14:13:03.000000000 +0200
+++ gtkhtml3.14-3.30.3/aclocal.m4	2010-08-11 21:02:14.000000000 +0200
@@ -452,8 +452,9 @@
 fi])
 
 
-# nls.m4 serial 3 (gettext-0.15)
-dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
+# nls.m4 serial 5 (gettext-0.18)
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
+dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -471,17 +472,17 @@
 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
-AC_PREREQ(2.50)
+AC_PREREQ([2.50])
 
 AC_DEFUN([AM_NLS],
 [
   AC_MSG_CHECKING([whether NLS is requested])
   dnl Default is enabled NLS
-  AC_ARG_ENABLE(nls,
+  AC_ARG_ENABLE([nls],
     [  --disable-nls           do not use Native Language Support],
     USE_NLS=$enableval, USE_NLS=yes)
-  AC_MSG_RESULT($USE_NLS)
-  AC_SUBST(USE_NLS)
+  AC_MSG_RESULT([$USE_NLS])
+  AC_SUBST([USE_NLS])
 ])
 
 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
diff -Nru gtkhtml3.14-3.30.2/components/editor/gtkhtml-editor-actions.c gtkhtml3.14-3.30.3/components/editor/gtkhtml-editor-actions.c
--- gtkhtml3.14-3.30.2/components/editor/gtkhtml-editor-actions.c	2010-06-20 14:14:19.000000000 +0200
+++ gtkhtml3.14-3.30.3/components/editor/gtkhtml-editor-actions.c	2010-07-12 12:40:01.000000000 +0200
@@ -614,6 +614,10 @@
 	file = gtkhtml_editor_run_open_dialog (
 		editor, _("Insert HTML File"), NULL, NULL);
 
+	/* User cancelled? */
+	if (file == NULL)
+		return;
+
 	/* XXX Need a way to cancel this. */
 	g_file_load_contents_async (
 		file, NULL, (GAsyncReadyCallback)
@@ -679,6 +683,10 @@
 	file = gtkhtml_editor_run_open_dialog (
 		editor, _("Insert Text File"), NULL, NULL);
 
+	/* User cancelled? */
+	if (file == NULL)
+		return;
+
 	/* XXX Need a way to cancel this. */
 	g_file_load_contents_async (
 		file, NULL, (GAsyncReadyCallback)
diff -Nru gtkhtml3.14-3.30.2/components/editor/gtkhtml-editor.pc gtkhtml3.14-3.30.3/components/editor/gtkhtml-editor.pc
--- gtkhtml3.14-3.30.2/components/editor/gtkhtml-editor.pc	2010-06-20 14:13:15.000000000 +0200
+++ gtkhtml3.14-3.30.3/components/editor/gtkhtml-editor.pc	2010-08-11 21:02:35.000000000 +0200
@@ -8,6 +8,6 @@
 Name: gtkhtml-editor
 Description: HTML editor widget
 Requires: libgtkhtml-3.14
-Version: 3.30.2
+Version: 3.30.3
 Libs: -L${libdir} -lgtkhtml-editor
 Cflags: -I${includedir}/libgtkhtml-3.14/editor
diff -Nru gtkhtml3.14-3.30.2/configure gtkhtml3.14-3.30.3/configure
--- gtkhtml3.14-3.30.2/configure	2010-06-20 14:13:04.000000000 +0200
+++ gtkhtml3.14-3.30.3/configure	2010-08-11 21:02:16.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for gtkhtml 3.30.2.
+# Generated by GNU Autoconf 2.65 for gtkhtml 3.30.3.
 #
 # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=GtkHtml>.
 #
@@ -702,8 +702,8 @@
 # Identity of this package.
 PACKAGE_NAME='gtkhtml'
 PACKAGE_TARNAME='gtkhtml'
-PACKAGE_VERSION='3.30.2'
-PACKAGE_STRING='gtkhtml 3.30.2'
+PACKAGE_VERSION='3.30.3'
+PACKAGE_STRING='gtkhtml 3.30.3'
 PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=GtkHtml'
 PACKAGE_URL=''
 
@@ -1532,7 +1532,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures gtkhtml 3.30.2 to adapt to many kinds of systems.
+\`configure' configures gtkhtml 3.30.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1602,7 +1602,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of gtkhtml 3.30.2:";;
+     short | recursive ) echo "Configuration of gtkhtml 3.30.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1731,7 +1731,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-gtkhtml configure 3.30.2
+gtkhtml configure 3.30.3
 generated by GNU Autoconf 2.65
 
 Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2277,7 +2277,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by gtkhtml $as_me 3.30.2, which was
+It was created by gtkhtml $as_me 3.30.3, which was
 generated by GNU Autoconf 2.65.  Invocation command line was
 
   $ $0 $@
@@ -3085,7 +3085,7 @@
 
 # Define the identity of the package.
  PACKAGE='gtkhtml'
- VERSION='3.30.2'
+ VERSION='3.30.3'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -18754,7 +18754,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by gtkhtml $as_me 3.30.2, which was
+This file was extended by gtkhtml $as_me 3.30.3, which was
 generated by GNU Autoconf 2.65.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -18820,7 +18820,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-gtkhtml config.status 3.30.2
+gtkhtml config.status 3.30.3
 configured by $0, generated by GNU Autoconf 2.65,
   with options \\"\$ac_cs_config\\"
 
diff -Nru gtkhtml3.14-3.30.2/configure.ac gtkhtml3.14-3.30.3/configure.ac
--- gtkhtml3.14-3.30.2/configure.ac	2010-04-26 06:59:29.000000000 +0200
+++ gtkhtml3.14-3.30.3/configure.ac	2010-06-20 18:38:47.000000000 +0200
@@ -1,6 +1,6 @@
 dnl Initialization
 AC_PREREQ(2.58)
-AC_INIT([gtkhtml], [3.30.2], [http://bugzilla.gnome.org/enter_bug.cgi?product=GtkHtml])
+AC_INIT([gtkhtml], [3.30.3], [http://bugzilla.gnome.org/enter_bug.cgi?product=GtkHtml])
 AM_INIT_AUTOMAKE([gnu 1.9])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADERS(config.h)
diff -Nru gtkhtml3.14-3.30.2/debian/changelog gtkhtml3.14-3.30.3/debian/changelog
--- gtkhtml3.14-3.30.2/debian/changelog	2010-06-24 10:16:05.000000000 +0200
+++ gtkhtml3.14-3.30.3/debian/changelog	2010-08-14 13:47:29.000000000 +0200
@@ -1,3 +1,11 @@
+gtkhtml3.14 (3.30.3-1) unstable; urgency=low
+
+  * New upstream bugfix release, don't bump shlibs.
+  * debian/control:
+    - update standards version to 3.9.1.
+
+ -- Yves-Alexis Perez <corsac@debian.org>  Sat, 14 Aug 2010 13:47:26 +0200
+
 gtkhtml3.14 (3.30.2-1) unstable; urgency=low
 
   * New upstream release.
diff -Nru gtkhtml3.14-3.30.2/debian/control gtkhtml3.14-3.30.3/debian/control
--- gtkhtml3.14-3.30.2/debian/control	2010-06-21 07:35:23.000000000 +0200
+++ gtkhtml3.14-3.30.3/debian/control	2010-08-12 08:25:01.000000000 +0200
@@ -7,7 +7,7 @@
            Oystein Gisnas <oystein@gisnas.net>,
            Pedro Fragoso <ember@ubuntu.com>,
            Yves-Alexis Perez <corsac@debian.org>
-Standards-Version: 3.8.4
+Standards-Version: 3.9.1
 Dm-Upload-Allowed: yes
 Homepage: http://www.gnome.org/projects/evolution/
 Vcs-Svn: svn://svn.debian.org/svn/pkg-evolution/unstable/gtkhtml3.14
diff -Nru gtkhtml3.14-3.30.2/NEWS gtkhtml3.14-3.30.3/NEWS
--- gtkhtml3.14-3.30.2/NEWS	2010-06-20 18:21:15.000000000 +0200
+++ gtkhtml3.14-3.30.3/NEWS	2010-08-11 21:01:26.000000000 +0200
@@ -1,3 +1,15 @@
+GtkHTML-3.30.3 2010-08-11
+-------------------------
+
+Bug Fixes:
+	Bug 624149 - Check for NULL after gtkhtml_editor_run_open_dialog()
+	             (Matthew Barnes)
+
+Translations:
+	Marek Cernocky (cs)
+	Andika Triwidada (id)
+	Anita Reitere (lv)
+
 GtkHTML-3.30.2 2010-06-20
 -------------------------
 
diff -Nru gtkhtml3.14-3.30.2/po/cs.po gtkhtml3.14-3.30.3/po/cs.po
diff -Nru gtkhtml3.14-3.30.2/po/id.po gtkhtml3.14-3.30.3/po/id.po
diff -Nru gtkhtml3.14-3.30.2/po/lv.po gtkhtml3.14-3.30.3/po/lv.po

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: