--- mailwatch-mailbox-mbox.c.old 2008-04-12 12:26:34.000000000 +0200 +++ mailwatch-mailbox-mbox.c 2008-04-12 14:59:56.000000000 +0200 @@ -105,6 +105,7 @@ if ( st.st_ctime > mbox->ctime ) { gboolean in_header = FALSE; gboolean cur_new = FALSE; + gboolean from_found = FALSE; gchar *p; GIOChannel *ioc; gsize nl; @@ -150,9 +151,16 @@ p[nl] = 0; if ( !in_header ) { - if ( !strncmp( p, "From ", 5 ) ) { + if ( from_found ) { + if ( !strncmp( p, "Return-Path: ", 13 ) ) { in_header = TRUE; - cur_new = TRUE; + } + } else { + from_found = FALSE; + if ( !strncmp( p, "From ", 5 ) ) { + from_found = TRUE; + cur_new = TRUE; + } } } else {