#include <pwd.h>
#include <errno.h>
#include <sys/types.h>
-#include <sys/time.h>
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
#include <sys/wait.h>
#include <ctype.h>
#include <string.h>
#include <limits.h>
#include "citadel.h"
#include "server.h"
-#include <time.h>
#include "sysdep_decls.h"
#include "citserver.h"
#include "support.h"
#include "config.h"
-#include "dynloader.h"
+#include "serv_extensions.h"
#include "room_ops.h"
#include "user_ops.h"
#include "policy.h"
IMAP->flags[seq] &= (~bits_to_twiddle);
}
+ if (bits_to_twiddle & IMAP_SEEN) {
+ CtdlSetSeen(IMAP->msgids[seq],
+ ((IMAP->flags[seq] & IMAP_SEEN) ? 1 : 0) );
+ }
+
cprintf("* %d FETCH (", seq+1);
imap_fetch_flags(seq);
cprintf(")\r\n");
bits_to_twiddle |= IMAP_DELETED;
}
}
+
+ if (!strcasecmp(flag, "\\Seen")) {
+ bits_to_twiddle |= IMAP_SEEN;
+ }
}
if (IMAP->num_msgs > 0) {