diff -ur dovecot-1.0.rc19-o/src/master/mail-process.c dovecot-1.0.rc19/src/master/mail-process.c --- dovecot-1.0.rc19-o/src/master/mail-process.c 2007-01-12 16:38:21.000000000 -0700 +++ dovecot-1.0.rc19/src/master/mail-process.c 2007-01-31 23:23:33.000000000 -0700 @@ -247,6 +247,8 @@ env_put("POP3_NO_FLAG_UPDATES=1"); if (set->pop3_reuse_xuidl) env_put("POP3_REUSE_XUIDL=1"); + if (set->pop3_ignore_deleted) + env_put("POP3_IGNORE_DELETED=1"); if (set->pop3_enable_last) env_put("POP3_ENABLE_LAST=1"); if (set->pop3_lock_session) Only in dovecot-1.0.rc19/src/master: mail-process.c.orig diff -ur dovecot-1.0.rc19-o/src/master/master-settings.c dovecot-1.0.rc19/src/master/master-settings.c --- dovecot-1.0.rc19-o/src/master/master-settings.c 2007-01-18 09:50:24.000000000 -0700 +++ dovecot-1.0.rc19/src/master/master-settings.c 2007-01-31 23:23:33.000000000 -0700 @@ -258,6 +258,7 @@ MEMBER(pop3_enable_last) FALSE, MEMBER(pop3_reuse_xuidl) FALSE, MEMBER(pop3_lock_session) FALSE, + MEMBER(pop3_ignore_deleted) FALSE, MEMBER(pop3_uidl_format) "", MEMBER(pop3_client_workarounds) "", MEMBER(pop3_logout_format) "top=%t/%p, retr=%r/%b, del=%d/%m, size=%s", Only in dovecot-1.0.rc19/src/master: master-settings.c.orig Only in dovecot-1.0.rc19/src/master: master-settings.c.rej diff -ur dovecot-1.0.rc19-o/src/master/master-settings-defs.c dovecot-1.0.rc19/src/master/master-settings-defs.c --- dovecot-1.0.rc19-o/src/master/master-settings-defs.c 2006-12-28 09:27:46.000000000 -0700 +++ dovecot-1.0.rc19/src/master/master-settings-defs.c 2007-01-31 23:25:32.000000000 -0700 @@ -107,6 +107,7 @@ DEF(SET_BOOL, pop3_enable_last), DEF(SET_BOOL, pop3_reuse_xuidl), DEF(SET_BOOL, pop3_lock_session), + DEF(SET_BOOL, pop3_ignore_deleted), DEF(SET_STR, pop3_uidl_format), DEF(SET_STR, pop3_client_workarounds), DEF(SET_STR, pop3_logout_format), Only in dovecot-1.0.rc19/src/master: master-settings-defs.c~ diff -ur dovecot-1.0.rc19-o/src/master/master-settings.h dovecot-1.0.rc19/src/master/master-settings.h --- dovecot-1.0.rc19-o/src/master/master-settings.h 2007-01-18 09:50:24.000000000 -0700 +++ dovecot-1.0.rc19/src/master/master-settings.h 2007-01-31 23:23:34.000000000 -0700 @@ -115,6 +115,7 @@ bool pop3_enable_last; bool pop3_reuse_xuidl; bool pop3_lock_session; + bool pop3_ignore_deleted; const char *pop3_uidl_format; const char *pop3_client_workarounds; const char *pop3_logout_format; Only in dovecot-1.0.rc19/src/master: master-settings.h.orig diff -ur dovecot-1.0.rc19-o/src/pop3/client.c dovecot-1.0.rc19/src/pop3/client.c --- dovecot-1.0.rc19-o/src/pop3/client.c 2006-08-10 16:26:41.000000000 -0600 +++ dovecot-1.0.rc19/src/pop3/client.c 2007-01-31 23:23:34.000000000 -0700 @@ -64,7 +64,12 @@ message_sizes_buf = buffer_create_dynamic(default_pool, 512); memset(&search_arg, 0, sizeof(search_arg)); - search_arg.type = SEARCH_ALL; + if(ignore_deleted_messages) { + search_arg.type = SEARCH_DELETED; + search_arg.not = 1; + } else { + search_arg.type = SEARCH_ALL; + } for (i = 0; i < 2; i++) { if (sync_mailbox(client->mailbox, &status) < 0) { diff -ur dovecot-1.0.rc19-o/src/pop3/common.h dovecot-1.0.rc19/src/pop3/common.h --- dovecot-1.0.rc19-o/src/pop3/common.h 2006-04-27 06:29:14.000000000 -0600 +++ dovecot-1.0.rc19/src/pop3/common.h 2007-01-31 23:23:34.000000000 -0700 @@ -18,7 +18,7 @@ extern struct ioloop *ioloop; extern enum client_workarounds client_workarounds; -extern bool enable_last_command, no_flag_updates, reuse_xuidl, lock_session; +extern bool enable_last_command, no_flag_updates, reuse_xuidl, lock_session, ignore_deleted_messages; extern const char *uidl_format, *logout_format; extern enum uidl_keys uidl_keymask; diff -ur dovecot-1.0.rc19-o/src/pop3/main.c dovecot-1.0.rc19/src/pop3/main.c --- dovecot-1.0.rc19-o/src/pop3/main.c 2006-12-19 22:08:46.000000000 -0700 +++ dovecot-1.0.rc19/src/pop3/main.c 2007-01-31 23:23:34.000000000 -0700 @@ -46,6 +46,7 @@ bool no_flag_updates = FALSE; bool reuse_xuidl = FALSE; bool lock_session = FALSE; +bool ignore_deleted_messages = FALSE; const char *uidl_format, *logout_format; enum uidl_keys uidl_keymask; @@ -218,6 +219,7 @@ no_flag_updates = getenv("POP3_NO_FLAG_UPDATES") != NULL; reuse_xuidl = getenv("POP3_REUSE_XUIDL") != NULL; lock_session = getenv("POP3_LOCK_SESSION") != NULL; + ignore_deleted_messages = getenv("POP3_IGNORE_DELETED") != NULL; uidl_format = getenv("POP3_UIDL_FORMAT"); if (uidl_format == NULL || *uidl_format == '\0')