diff options
-rw-r--r-- | driver.c | 21 | ||||
-rw-r--r-- | etrn.c | 1 | ||||
-rw-r--r-- | fetchmail.h | 1 |
3 files changed, 18 insertions, 5 deletions
@@ -586,9 +586,24 @@ int num; /* index of message */ break; } - /* maybe this is a special message that holds mailbox annotations? */ - if (protocol->retain_hdr && protocol->retain_hdr(num, line)) - return(PS_RETAINED); + /* + * The University of Washington IMAP server (the reference + * implementation of IMAP4 written by Mark Crispin) relies + * on being able to keep base-UID information in a special + * message at the head of the mailbox. This message should + * neither be deleted nor forwarded. + */ +#ifdef POP2_ENABLE + /* + * We disable this check under POP2 because there's no way to + * prevent deletion of the message. So at least we ought to + * forward it to the user so he or she will have some clue + * that things have gone awry. + */ + if (protocol != pop2) +#endif /* POP2_ENABLE */ + if (num == 1 && !strncasecmp(line, "X-IMAP:", 7)) + return(PS_RETAINED); /* * This code prevents fetchmail from becoming an accessory after @@ -120,7 +120,6 @@ const static struct method etrn = NULL, /* no way to fetch body */ NULL, /* no message trailer */ NULL, /* how to delete a message */ - NULL, /* no retained-header check */ "QUIT", /* the ETRN exit command */ }; diff --git a/fetchmail.h b/fetchmail.h index f9de3d20..da9c050e 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -169,7 +169,6 @@ struct method int (*fetch_body)(); /* fetch a given message */ int (*trail)(); /* eat trailer of a message */ int (*delete)(); /* delete method */ - flag (*retain_hdr)(); /* if this returns TRUE, retain message */ char *exit_cmd; /* exit command */ }; |