You can subscribe to this list here.
| 2004 |
Jan
(123) |
Feb
(24) |
Mar
(11) |
Apr
(7) |
May
(6) |
Jun
(6) |
Jul
(1) |
Aug
(1) |
Sep
(35) |
Oct
(24) |
Nov
(3) |
Dec
(5) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(2) |
Feb
(6) |
Mar
(13) |
Apr
(17) |
May
(3) |
Jun
(11) |
Jul
(12) |
Aug
(4) |
Sep
(4) |
Oct
(4) |
Nov
|
Dec
(28) |
| 2006 |
Jan
(35) |
Feb
(21) |
Mar
(23) |
Apr
|
May
(16) |
Jun
(2) |
Jul
(8) |
Aug
(27) |
Sep
(2) |
Oct
(12) |
Nov
(22) |
Dec
(6) |
| 2007 |
Jan
(7) |
Feb
(4) |
Mar
|
Apr
(5) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
(6) |
Oct
|
Nov
|
Dec
(1) |
| 2008 |
Jan
|
Feb
(11) |
Mar
(2) |
Apr
(14) |
May
|
Jun
|
Jul
(2) |
Aug
(11) |
Sep
(2) |
Oct
(5) |
Nov
|
Dec
|
| 2009 |
Jan
(1) |
Feb
(5) |
Mar
(2) |
Apr
|
May
(3) |
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
(2) |
Feb
(32) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(14) |
Nov
(4) |
Dec
(1) |
| 2011 |
Jan
(8) |
Feb
|
Mar
(41) |
Apr
(42) |
May
|
Jun
(1) |
Jul
(4) |
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2012 |
Jan
|
Feb
(4) |
Mar
(5) |
Apr
(10) |
May
(2) |
Jun
(2) |
Jul
(15) |
Aug
(8) |
Sep
(101) |
Oct
(35) |
Nov
(17) |
Dec
(6) |
| 2013 |
Jan
(19) |
Feb
(18) |
Mar
(18) |
Apr
(67) |
May
(17) |
Jun
(4) |
Jul
(21) |
Aug
(10) |
Sep
(33) |
Oct
(33) |
Nov
(97) |
Dec
(81) |
| 2014 |
Jan
(39) |
Feb
(30) |
Mar
(10) |
Apr
(34) |
May
(7) |
Jun
(27) |
Jul
(33) |
Aug
(24) |
Sep
(9) |
Oct
(52) |
Nov
(23) |
Dec
(24) |
| 2015 |
Jan
(55) |
Feb
(51) |
Mar
(39) |
Apr
(74) |
May
(63) |
Jun
(33) |
Jul
(19) |
Aug
(21) |
Sep
(28) |
Oct
(11) |
Nov
(25) |
Dec
(26) |
| 2016 |
Jan
(39) |
Feb
(19) |
Mar
(36) |
Apr
(8) |
May
(3) |
Jun
(18) |
Jul
(20) |
Aug
(30) |
Sep
(12) |
Oct
(33) |
Nov
(145) |
Dec
(52) |
| 2017 |
Jan
(22) |
Feb
(43) |
Mar
(44) |
Apr
(71) |
May
(14) |
Jun
(10) |
Jul
(7) |
Aug
(30) |
Sep
(10) |
Oct
(39) |
Nov
(7) |
Dec
|
| 2018 |
Jan
(17) |
Feb
(21) |
Mar
(10) |
Apr
(19) |
May
(8) |
Jun
(9) |
Jul
(12) |
Aug
(3) |
Sep
(17) |
Oct
(9) |
Nov
(14) |
Dec
|
| 2019 |
Jan
(10) |
Feb
(6) |
Mar
(17) |
Apr
(2) |
May
(15) |
Jun
(15) |
Jul
(43) |
Aug
(12) |
Sep
(21) |
Oct
(7) |
Nov
(35) |
Dec
(5) |
| 2020 |
Jan
(110) |
Feb
(19) |
Mar
(12) |
Apr
(7) |
May
(22) |
Jun
(20) |
Jul
(48) |
Aug
(112) |
Sep
(12) |
Oct
(5) |
Nov
(19) |
Dec
(4) |
| 2021 |
Jan
(22) |
Feb
(54) |
Mar
(39) |
Apr
(5) |
May
(5) |
Jun
(36) |
Jul
(23) |
Aug
(31) |
Sep
(29) |
Oct
(2) |
Nov
(63) |
Dec
(50) |
| 2022 |
Jan
(23) |
Feb
(15) |
Mar
(3) |
Apr
(15) |
May
(21) |
Jun
(262) |
Jul
(59) |
Aug
(24) |
Sep
(18) |
Oct
(8) |
Nov
(23) |
Dec
(24) |
| 2023 |
Jan
(13) |
Feb
(3) |
Mar
(24) |
Apr
(3) |
May
(6) |
Jun
(13) |
Jul
(9) |
Aug
(32) |
Sep
(4) |
Oct
(2) |
Nov
(11) |
Dec
|
| 2024 |
Jan
(23) |
Feb
(15) |
Mar
(16) |
Apr
(17) |
May
(2) |
Jun
(5) |
Jul
(34) |
Aug
(48) |
Sep
(24) |
Oct
(12) |
Nov
(43) |
Dec
(34) |
| 2025 |
Jan
(7) |
Feb
(1) |
Mar
(30) |
Apr
(4) |
May
|
Jun
(5) |
Jul
(25) |
Aug
(1) |
Sep
(7) |
Oct
(7) |
Nov
(19) |
Dec
(7) |
|
From: ossi <os...@us...> - 2024-07-31 19:33:43
|
commit 7bca6967a7b22cc2afe72856f340097651afe70e
Author: Oswald Buddenhagen <os...@us...>
Date: Sat Sep 3 22:46:41 2022 +0200
update some email addresses
noa's and jeremy's new address are confirmed.
michael e.'s address is kinda confirmed, except that it's silent.
AUTHORS | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/AUTHORS b/AUTHORS
index f13f596..024f512 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -13,7 +13,7 @@ Lead Developers
Oswald Buddenhagen <os...@us...>
- Current maintainer
-Michael Elkins <me...@mu...>
+Michael Elkins <me...@si...>
- Original author
Contributors
@@ -22,10 +22,10 @@ Contributors
(Some of these people also contributed bugfixes and optimizations.)
(In chronological order.)
-Jeremy Katz <ka...@li...>
+Jeremy Katz <ka...@fe...>
- UseNamespace & UseSSL* options
-Daniel Resare <no...@me...>
+Noa (ex. Daniel) Resare <no...@re...>
- Numerous SSL handling improvements
Eivind Eklund <ei...@Fr...>
|
|
From: ossi <os...@us...> - 2024-07-31 19:33:42
|
commit 5f81162f5e93efa8a35bbad5aa0f5d279da3a9e7
Author: Husain Alshehhi <hu...@al...>
AuthorDate: Sat Jan 14 01:06:23 2023 +0000
Commit: Oswald Buddenhagen <os...@us...>
CommitDate: Wed Jul 31 21:23:58 2024 +0200
add tag files to .gitignore
The auto-generated makefile targets CTAGS, GTAGS and TAGS generate files
locally that should not be checked-in into the source code. This change
adds these files to the .gitignore file. The list of files match those
in distclean-tags target.
.gitignore | 12 ++++++++++++
AUTHORS | 1 +
2 files changed, 13 insertions(+)
diff --git a/.gitignore b/.gitignore
index 74de561..6b9c837 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,3 +33,15 @@
Makefile
Makefile.in
+
+GPATH
+GRTAGS
+GSYMS
+GTAGS
+ID
+TAGS
+cscope.files
+cscope.in.out
+cscope.out
+cscope.po.out
+tags
diff --git a/AUTHORS b/AUTHORS
index 01af903..f13f596 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -82,6 +82,7 @@ Gergely Risko <ge...@ri...>
Sung Pae "guns" <se...@su...>
Helmut Grohne <he...@su...>
Hugo Haas <hu...@la...>
+Husain Alshehhi <hu...@al...>
Jaroslav Suchanek <jar...@gm...>
Jeremie Courreges-Anglas <jc...@op...>
Klemens Nanni <kn...@op...>
|
|
From: ossi <os...@us...> - 2024-07-31 19:33:40
|
commit ee832951e2bc2030abe49b1436760a597bd55382
Author: Oswald Buddenhagen <os...@us...>
Date: Mon Jul 24 12:04:13 2023 +0200
revamp automatic enumeration of power-of-two enumerators
i found a neat trick to do it with the C pre-processor after all.
this makes the enum definitions themselves arguably somewhat less
legible, but on the upside the build system becomes simpler, and IDEs
can build/update their code models without having to (re-)build the
project first.
somewhat as a side effect, this gives bit enums proper names, so we
don't need to refer to them by cryptic prefixes anymore.
amends 6a78e2c5f.
src/.gitignore | 1 -
src/Makefile.am | 26 +--------
src/bit_enum_gen.pl | 70 -----------------------
src/common.h | 131 ++++++++++++++++++++++++++++++--------------
src/config.c | 2 +-
src/driver.h | 83 ++++++++++++++--------------
src/drv_imap.c | 2 +-
src/drv_proxy.c | 2 +-
src/sync.c | 37 ++++++-------
src/sync.h | 57 ++++++++++---------
src/sync_p.h | 43 ++++++++-------
src/sync_state.c | 2 +-
12 files changed, 207 insertions(+), 249 deletions(-)
diff --git a/src/.gitignore b/src/.gitignore
index 3139876..dea9ee7 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -1,4 +1,3 @@
-/*_enum.h
/drv_proxy.inc
/mbsync
/mdconvert
diff --git a/src/Makefile.am b/src/Makefile.am
index 69cf29d..42d14f4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -20,28 +20,6 @@ drv_proxy.$(OBJEXT): drv_proxy.inc
drv_proxy.inc: $(srcdir)/driver.h $(srcdir)/drv_proxy.c $(srcdir)/drv_proxy_gen.pl
perl $(srcdir)/drv_proxy_gen.pl $(srcdir)/driver.h $(srcdir)/drv_proxy.c drv_proxy.inc
-ENUM_GEN = $(srcdir)/bit_enum_gen.pl
-
-$(mbsync_OBJECTS): common_enum.h
-common_enum.h: common.h $(ENUM_GEN)
- perl $(ENUM_GEN) < $< > $@
-
-$(mbsync_OBJECTS): driver_enum.h
-driver_enum.h: driver.h $(ENUM_GEN)
- perl $(ENUM_GEN) < $< > $@
-
-$(mbsync_OBJECTS): sync_enum.h
-sync_enum.h: sync.h $(ENUM_GEN)
- perl $(ENUM_GEN) < $< > $@
-
-sync.$(OBJEXT): sync_c_enum.h
-sync_c_enum.h: sync.c $(ENUM_GEN)
- perl $(ENUM_GEN) < $< > $@
-
-sync.$(OBJEXT) sync_state.$(OBJEXT): sync_p_enum.h
-sync_p_enum.h: sync_p.h $(ENUM_GEN)
- perl $(ENUM_GEN) < $< > $@
-
mdconvert_SOURCES = mdconvert.c
mdconvert_LDADD = $(DB_LIBS)
if with_mdconvert
@@ -69,6 +47,6 @@ EXTRA_PROGRAMS = tst_timers
exampledir = $(docdir)/examples
example_DATA = mbsyncrc.sample
-EXTRA_DIST = bit_enum_gen.pl drv_proxy_gen.pl run-tests.pl $(example_DATA) $(man_MANS)
+EXTRA_DIST = drv_proxy_gen.pl run-tests.pl $(example_DATA) $(man_MANS)
-CLEANFILES = *_enum.h drv_proxy.inc
+CLEANFILES = drv_proxy.inc
diff --git a/src/bit_enum_gen.pl b/src/bit_enum_gen.pl
deleted file mode 100755
index 2b1ee21..0000000
--- a/src/bit_enum_gen.pl
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/perl
-#
-# SPDX-FileCopyrightText: 2022 Oswald Buddenhagen <os...@us...>
-# SPDX-License-Identifier: GPL-2.0-or-later
-#
-# mbsync - mailbox synchronizer
-#
-
-use strict;
-use warnings;
-
-my $in_enum = 0;
-my $conts;
-while (<>) {
- s,\s*(?://.*)?$,,;
- if ($in_enum) {
- if (/^\)$/) {
- $conts =~ s/\s//g;
- $conts =~ s/,$//;
- my @vals = split(/,/, $conts);
- my ($pfx, $pfx1);
- for my $e (@vals) {
- if (!defined($pfx)) {
- $pfx1 = $pfx = ($e =~ /^([A-Z]+_)/) ? $1 : "";
- } elsif (length($pfx)) {
- $pfx = "" if ((($e =~ /^([A-Z]+_)/) ? $1 : "") ne $pfx);
- }
- }
- my $bit = 1;
- my $bitn = 0;
- my (@names, @nameos);
- my $nameo = 0;
- for my $e (@vals) {
- my $bits = ($e =~ s/\((\d+)\)$//) ? $1 : 1;
- my $n = substr($e, length($pfx));
- if ($bits != 1) {
- die("Unsupported field size $bits\n") if ($bits != 2);
- print "#define $e(b) ($bit << (b))\n";
- push @names, "F-".$n, "N-".$n;
- my $nl = length($n) + 3;
- push @nameos, $nameo, $nameo + $nl;
- $nameo += $nl * 2;
- } else {
- print "#define $e $bit\n";
- push @names, $n;
- push @nameos, $nameo;
- $nameo += length($n) + 1;
- }
- $bit <<= $bits;
- $bitn += $bits;
- }
- if (length($pfx)) {
- print "#define ${pfx}_NUM_BITS $bitn\n";
- }
- if (length($pfx1)) {
- print "#define ${pfx1}_STRINGS \"".join("\\0", @names)."\"\n";
- print "#define ${pfx1}_OFFSETS ".join(", ", @nameos)."\n";
- }
- print "\n";
- $in_enum = 0;
- } else {
- $conts .= $_;
- }
- } else {
- if (/^BIT_ENUM\($/) {
- $conts = "";
- $in_enum = 1;
- }
- }
-}
diff --git a/src/common.h b/src/common.h
index 9c44bce..38521b6 100644
--- a/src/common.h
+++ b/src/common.h
@@ -21,8 +21,6 @@
#include <string.h>
#include <time.h>
-#include "common_enum.h"
-
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned int uint;
@@ -43,10 +41,55 @@ typedef unsigned long ulong;
#define shifted_bit(in, from, to) \
((int)(((uint)(in) / (from > to ? from / to : 1) * (to > from ? to / from : 1)) & to))
-#define BIT_ENUM(...)
+#define BIT_ENUM_VAL(name) \
+ name, \
+ name##_dummy = 2 * name - 1,
+
+#define DEFINE_BIT_ENUM(list) \
+ enum list { \
+ list##_dummy, \
+ list(BIT_ENUM_VAL) \
+ };
+
+#define PFX_BIT_ENUM_VAL(pfx, name) \
+ pfx##_##name, \
+ pfx##_##name##_dummy = 2 * pfx##_##name - 1,
+
+#define PFX_BIT_ENUM_NUM(pfx, name) \
+ pfx##_##name##_bit,
+
+#define DEFINE_PFX_BIT_ENUM(list) \
+ enum list { \
+ list##_dummy, \
+ list(PFX_BIT_ENUM_VAL) \
+ }; \
+ enum { \
+ list(PFX_BIT_ENUM_NUM) \
+ list##_num_bits \
+ };
+
+#define BIT_ENUM_STR(pfx, name) \
+ stringify(name) "\0"
+
+#define BIT_ENUM_STR_OFF(pfx, name) \
+ name##_str_off, \
+ name##_str_off_dummy = name##_str_off + sizeof(stringify(name)) - 1,
+
+#define GET_BIT_ENUM_STR_OFF(pfx, name) \
+ name##_str_off,
-#define static_assert_bits(pfx, type, field) \
- static_assert( pfx##__NUM_BITS <= sizeof(((type){ 0 }).field) * 8, \
+#define PFX_BIT_ENUM_STR(pfx, name) \
+ stringify(pfx) "_" stringify(name) "\0"
+
+#define PFX_BIT_ENUM_STR_OFF(pfx, name) \
+ pfx##_##name##_str_off, \
+ pfx##_##name##_str_end = pfx##_##name##_str_off + sizeof(stringify(pfx) "_" stringify(name)) - 1,
+
+#define GET_PFX_BIT_ENUM_STR_OFF(pfx, name) \
+ pfx##_##name##_str_off,
+
+#define static_assert_bits(list, type, field) \
+ static_assert( list##_num_bits <= sizeof(((type){ 0 }).field) * 8, \
stringify(type) "::" stringify(field) " is too small" )
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
@@ -100,30 +143,32 @@ enum {
VERBOSE,
};
-BIT_ENUM(
- DEBUG_MAILDIR,
- DEBUG_NET,
- DEBUG_NET_ALL,
- DEBUG_SYNC,
- DEBUG_MAIN,
- DEBUG_DRV,
- DEBUG_DRV_ALL,
-
- DEBUG_CRASH,
-
- PROGRESS,
-
- DRYRUN,
-
- EXT_EXIT,
-
- ZERODELAY,
- KEEPJOURNAL,
- FORCEJOURNAL,
- FORCEASYNC(2),
- FAKEEXPUNGE,
- FAKEDUMBSTORE,
-)
+#define options_enum(fn) \
+ fn(DEBUG_MAILDIR) \
+ fn(DEBUG_NET) \
+ fn(DEBUG_NET_ALL) \
+ fn(DEBUG_SYNC) \
+ fn(DEBUG_MAIN) \
+ fn(DEBUG_DRV) \
+ fn(DEBUG_DRV_ALL) \
+ \
+ fn(DEBUG_CRASH) \
+ \
+ fn(PROGRESS) \
+ \
+ fn(DRYRUN) \
+ \
+ fn(EXT_EXIT) \
+ \
+ fn(ZERODELAY) \
+ fn(KEEPJOURNAL) \
+ fn(FORCEJOURNAL) \
+ fn(FORCEASYNC_F) \
+ fn(FORCEASYNC_N) \
+ fn(FAKEEXPUNGE) \
+ fn(FAKEDUMBSTORE)
+DEFINE_BIT_ENUM(options_enum)
+#define FORCEASYNC(b) (FORCEASYNC_F << (b))
#define DEBUG_ANY (DEBUG_MAILDIR | DEBUG_NET | DEBUG_SYNC | DEBUG_MAIN | DEBUG_DRV)
#define DEBUG_ALL (DEBUG_ANY | DEBUG_CRASH)
@@ -209,34 +254,38 @@ time_t timegm( struct tm *tm );
void fmt_bits( uint bits, uint num_bits, const char *bit_str, const int *bit_off, char *buf );
-#define BIT_FORMATTER_RET(name, pfx) \
- struct name##_str { char str[sizeof(pfx##__STRINGS)]; };
+#define BIT_FORMATTER_RET(name, list, fn) \
+ enum { list(fn##_OFF) name##_str_len }; \
+ struct name##_str { char str[name##_str_len]; };
#define BIT_FORMATTER_PROTO(name, storage) \
storage struct name##_str ATTR_OPTIMIZE /* force RVO */ \
fmt_##name( uint bits )
-#define BIT_FORMATTER_IMPL(name, pfx, storage) \
+#define BIT_FORMATTER_IMPL(name, list, fn, storage) \
BIT_FORMATTER_PROTO(name, storage) \
{ \
- static const char strings[] = pfx##__STRINGS; \
- static const int offsets[] = { pfx##__OFFSETS }; \
+ static const char strings[] = list(fn); \
+ static const int offsets[] = { list(GET_##fn##_OFF) }; \
\
struct name##_str buf; \
fmt_bits( bits, as(offsets), strings, offsets, buf.str ); \
return buf; \
}
-#define BIT_FORMATTER_FUNCTION(name, pfx) \
- BIT_FORMATTER_RET(name, pfx) \
- BIT_FORMATTER_IMPL(name, pfx, static)
+// Note that this one uses enum labels without prefix ...
+#define BIT_FORMATTER_FUNCTION(name, list) \
+ BIT_FORMATTER_RET(name, list, BIT_ENUM_STR) \
+ BIT_FORMATTER_IMPL(name, list, BIT_ENUM_STR, static)
-#define DECL_BIT_FORMATTER_FUNCTION(name, pfx) \
- BIT_FORMATTER_RET(name, pfx) \
+// ... while these ones use enum labels with prefix - this
+// is not fundamental, but simply because of the use cases.
+#define DECL_BIT_FORMATTER_FUNCTION(name, list) \
+ BIT_FORMATTER_RET(name, list, PFX_BIT_ENUM_STR) \
BIT_FORMATTER_PROTO(name, );
-#define DEF_BIT_FORMATTER_FUNCTION(name, pfx) \
- BIT_FORMATTER_IMPL(name, pfx, )
+#define DEF_BIT_FORMATTER_FUNCTION(name, list) \
+ BIT_FORMATTER_IMPL(name, list, PFX_BIT_ENUM_STR, )
void *nfmalloc( size_t sz );
void *nfzalloc( size_t sz );
diff --git a/src/config.c b/src/config.c
index 456bd47..4ff389e 100644
--- a/src/config.c
+++ b/src/config.c
@@ -22,7 +22,7 @@ char FieldDelimiter = ';';
char FieldDelimiter = ':';
#endif
-DEF_BIT_FORMATTER_FUNCTION(ops, OP)
+DEF_BIT_FORMATTER_FUNCTION(ops, sync_op_enum)
char *
expand_strdup( const char *s, const conffile_t *cfile )
diff --git a/src/driver.h b/src/driver.h
index f7c5b95..fde8908 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -9,7 +9,6 @@
#define DRIVER_H
#include "config.h"
-#include "driver_enum.h"
typedef struct driver driver_t;
@@ -36,32 +35,32 @@ extern store_conf_t *stores;
/* For message->flags */
// Keep the MESSAGE_FLAGS in sync (grep that)!
/* The order is according to alphabetical maildir flag sort */
-BIT_ENUM(
- F_DRAFT, // Draft
- F_FLAGGED, // Flagged
- F_FORWARDED, // Passed
- F_ANSWERED, // Replied
- F_SEEN, // Seen
- F_DELETED, // Trashed
-)
-
-extern const char MsgFlags[F__NUM_BITS];
-typedef struct { char str[F__NUM_BITS + 1]; } flag_str_t;
+#define msg_flags_enum(fn) \
+ fn(F, DRAFT) /* Draft */ \
+ fn(F, FLAGGED) /* Flagged */ \
+ fn(F, FORWARDED) /* Passed */ \
+ fn(F, ANSWERED) /* Replied */ \
+ fn(F, SEEN) /* Seen */ \
+ fn(F, DELETED) /* Trashed */
+DEFINE_PFX_BIT_ENUM(msg_flags_enum)
+
+extern const char MsgFlags[msg_flags_enum_num_bits];
+typedef struct { char str[msg_flags_enum_num_bits + 1]; } flag_str_t;
flag_str_t ATTR_OPTIMIZE /* force RVO */ fmt_flags( uchar flags );
flag_str_t ATTR_OPTIMIZE /* force RVO */ fmt_lone_flags( uchar flags );
/* For message->status */
-BIT_ENUM(
- M_RECENT, // unsyncable flag; maildir_*() depend on this being bit 0
- M_DEAD, // expunged
- M_EXPUNGE, // for driver_t->close_box()
- M_FLAGS, // flags are valid
- // The following are only for IMAP FETCH response parsing
- M_DATE,
- M_SIZE,
- M_BODY,
- M_HEADER,
-)
+#define msg_sts_enum(fn) \
+ fn(M, RECENT) /* unsyncable flag; maildir_*() depend on this being bit 0 */ \
+ fn(M, DEAD) /* expunged */ \
+ fn(M, EXPUNGE) /* for driver_t->close_box() */ \
+ fn(M, FLAGS) /* flags are valid */ \
+ /* The following are only for IMAP FETCH response parsing */ \
+ fn(M, DATE) \
+ fn(M, SIZE) \
+ fn(M, BODY) \
+ fn(M, HEADER)
+DEFINE_PFX_BIT_ENUM(msg_sts_enum)
#define TUIDL 12
@@ -79,29 +78,29 @@ typedef struct message {
MESSAGE(struct message)
} message_t;
-static_assert_bits(F, message_t, flags);
-static_assert_bits(M, message_t, status);
+static_assert_bits(msg_flags_enum, message_t, flags);
+static_assert_bits(msg_sts_enum, message_t, status);
// For driver_t->prepare_load_box(), which may amend the passed flags.
// The drivers don't use the first three, but may set them if loading the
// particular range is required to handle some other flag; note that these
// ranges may overlap.
-BIT_ENUM(
- OPEN_PAIRED, // Paired messages *in* this store.
- OPEN_OLD, // Messages that should be already propagated *from* this store.
- OPEN_NEW, // Messages (possibly) not yet propagated *from* this store.
- OPEN_FIND,
- OPEN_FLAGS, // Note that fetch_msg() gets the flags regardless.
- OPEN_OLD_SIZE,
- OPEN_NEW_SIZE,
- OPEN_PAIRED_IDS,
- OPEN_APPEND,
- OPEN_SETFLAGS,
- OPEN_EXPUNGE,
- // Expunge only deleted messages we know about. Relies on OPEN_{OLD,NEW,FLAGS}
- // being set externally. The driver may unset it if it can't handle it.
- OPEN_UID_EXPUNGE,
-)
+#define open_flags_enum(fn) \
+ fn(OPEN, PAIRED) /* Paired messages *in* this store. */ \
+ fn(OPEN, OLD) /* Messages that should be already propagated *from* this store. */ \
+ fn(OPEN, NEW) /* Messages (possibly) not yet propagated *from* this store. */ \
+ fn(OPEN, FIND) \
+ fn(OPEN, FLAGS) /* Note that fetch_msg() gets the flags regardless. */ \
+ fn(OPEN, OLD_SIZE) \
+ fn(OPEN, NEW_SIZE) \
+ fn(OPEN, PAIRED_IDS) \
+ fn(OPEN, APPEND) \
+ fn(OPEN, SETFLAGS) \
+ fn(OPEN, EXPUNGE) \
+ /* Expunge only deleted messages we know about. Relies on OPEN_{OLD,NEW,FLAGS} */ \
+ /* being set externally. The driver may unset it if it can't handle it. */ \
+ fn(OPEN, UID_EXPUNGE)
+DEFINE_PFX_BIT_ENUM(open_flags_enum)
#define UIDVAL_BAD ((uint)-1)
@@ -122,7 +121,7 @@ typedef struct {
uchar flags;
} msg_data_t;
-static_assert_bits(F, msg_data_t, flags);
+static_assert_bits(msg_flags_enum, msg_data_t, flags);
#define DRV_OK 0
/* Message went missing, or mailbox is full, etc. */
diff --git a/src/drv_imap.c b/src/drv_imap.c
index 5b67535..cbf5804 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -3110,7 +3110,7 @@ imap_load_box( store_t *gctx, uint minuid, uint maxuid, uint finduid, uint pairu
if (i != j)
bl += sprintf( buf + bl, ":%u", excs.data[i] );
}
- imap_submit_load( ctx, buf, shifted_bit( ctx->opts, OPEN_PAIRED_IDS, WantMsgids ), sts );
+ imap_submit_load( ctx, buf, shifted_bit( ctx->opts, (int)OPEN_PAIRED_IDS, WantMsgids ), sts );
}
if (maxuid == UINT_MAX)
maxuid = ctx->uidnext - 1;
diff --git a/src/drv_proxy.c b/src/drv_proxy.c
index ffe2e06..193f511 100644
--- a/src/drv_proxy.c
+++ b/src/drv_proxy.c
@@ -8,7 +8,7 @@
#include "driver.h"
-BIT_FORMATTER_FUNCTION(opts, OPEN)
+BIT_FORMATTER_FUNCTION(opts, open_flags_enum)
typedef struct gen_cmd gen_cmd_t;
diff --git a/src/sync.c b/src/sync.c
index 7f95e85..600b7af 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -6,7 +6,6 @@
*/
#include "sync_p.h"
-#include "sync_c_enum.h"
channel_conf_t global_conf;
channel_conf_t *channels;
@@ -45,24 +44,24 @@ static int check_cancel( sync_vars_t *svars );
cleanup: close(F) & close(N)
*/
-BIT_ENUM(
- ST_PRESENT,
- ST_CONFIRMED,
- ST_SELECTED,
- ST_FIND_OLD,
- ST_LOADED,
- ST_SENT_FLAGS,
- ST_SENDING_NEW,
- ST_SENT_NEW,
- ST_FIND_NEW,
- ST_FOUND_NEW,
- ST_SENT_TRASH,
- ST_TRASH_BAD,
- ST_CLOSING,
- ST_CLOSED,
- ST_SENT_CANCEL,
- ST_CANCELED,
-)
+#define sync_sts_enum(fn) \
+ fn(ST, PRESENT) \
+ fn(ST, CONFIRMED) \
+ fn(ST, SELECTED) \
+ fn(ST, FIND_OLD) \
+ fn(ST, LOADED) \
+ fn(ST, SENT_FLAGS) \
+ fn(ST, SENDING_NEW) \
+ fn(ST, SENT_NEW) \
+ fn(ST, FIND_NEW) \
+ fn(ST, FOUND_NEW) \
+ fn(ST, SENT_TRASH) \
+ fn(ST, TRASH_BAD) \
+ fn(ST, CLOSING) \
+ fn(ST, CLOSED) \
+ fn(ST, SENT_CANCEL) \
+ fn(ST, CANCELED)
+DEFINE_PFX_BIT_ENUM(sync_sts_enum)
static uchar
sanitize_flags( uchar tflags, sync_vars_t *svars, int t )
diff --git a/src/sync.h b/src/sync.h
index ced07e7..78f952a 100644
--- a/src/sync.h
+++ b/src/sync.h
@@ -9,44 +9,43 @@
#define SYNC_H
#include "driver.h"
-#include "sync_enum.h"
#define F 0 // far side
#define N 1 // near side
-BIT_ENUM(
- OP_NEW,
- OP_OLD,
- OP_UPGRADE,
- OP_GONE,
- OP_FLAGS,
- OP_EXPUNGE,
- OP_EXPUNGE_SOLO,
- OP_CREATE,
- OP_REMOVE,
-
- XOP_PUSH,
- XOP_PULL,
- XOP_HAVE_TYPE, // Aka mode; have at least one of dir and type (see below)
- // The following must all have the same bit shift from the corresponding OP_* flags.
- XOP_HAVE_EXPUNGE,
- XOP_HAVE_EXPUNGE_SOLO,
- XOP_HAVE_CREATE,
- XOP_HAVE_REMOVE,
- // ... until here.
- XOP_TYPE_NOOP,
- // ... and here again from scratch.
- XOP_EXPUNGE_NOOP,
- XOP_EXPUNGE_SOLO_NOOP,
- XOP_CREATE_NOOP,
- XOP_REMOVE_NOOP,
-)
+#define sync_op_enum(fn) \
+ fn(OP, NEW) \
+ fn(OP, OLD) \
+ fn(OP, UPGRADE) \
+ fn(OP, GONE) \
+ fn(OP, FLAGS) \
+ fn(OP, EXPUNGE) \
+ fn(OP, EXPUNGE_SOLO) \
+ fn(OP, CREATE) \
+ fn(OP, REMOVE) \
+ \
+ fn(XOP, PUSH) \
+ fn(XOP, PULL) \
+ fn(XOP, HAVE_TYPE) /* Aka mode; have at least one of dir and type (see below) */ \
+ /* The following must all have the same bit shift from the corresponding OP_* flags. */ \
+ fn(XOP, HAVE_EXPUNGE) \
+ fn(XOP, HAVE_EXPUNGE_SOLO) \
+ fn(XOP, HAVE_CREATE) \
+ fn(XOP, HAVE_REMOVE) \
+ /* ... until here. */ \
+ fn(XOP, TYPE_NOOP) \
+ /* ... and here again from scratch. */ \
+ fn(XOP, EXPUNGE_NOOP) \
+ fn(XOP, EXPUNGE_SOLO_NOOP) \
+ fn(XOP, CREATE_NOOP) \
+ fn(XOP, REMOVE_NOOP)
+DEFINE_PFX_BIT_ENUM(sync_op_enum)
#define OP_DFLT_TYPE (OP_NEW | OP_UPGRADE | OP_GONE | OP_FLAGS)
#define OP_MASK_TYPE (OP_DFLT_TYPE | OP_OLD) // Asserted in the target side ops
#define XOP_MASK_DIR (XOP_PUSH | XOP_PULL)
-DECL_BIT_FORMATTER_FUNCTION(ops, OP)
+DECL_BIT_FORMATTER_FUNCTION(ops, sync_op_enum)
typedef struct channel_conf {
struct channel_conf *next;
diff --git a/src/sync_p.h b/src/sync_p.h
index 1c9e7e4..4a13fc1 100644
--- a/src/sync_p.h
+++ b/src/sync_p.h
@@ -7,23 +7,28 @@
#define DEBUG_FLAG DEBUG_SYNC
#include "sync.h"
-#include "sync_p_enum.h"
-
-BIT_ENUM(
- S_DEAD, // ephemeral: the entry was killed and should be ignored
- S_EXPIRE, // the entry is being expired (expire-side message removal scheduled)
- S_EXPIRED, // the entry is expired (expire-side message removal confirmed)
- S_NEXPIRE, // temporary: new expiration state
- S_PENDING, // the entry is new and awaits propagation (possibly a retry)
- S_DUMMY(2), // f/n message is only a placeholder
- S_SKIPPED, // pre-1.4 legacy: the entry was not propagated (message is too big)
- S_GONE(2), // ephemeral: f/n message has been expunged
- S_DEL(2), // ephemeral: f/n message would be subject to non-selective expunge
- S_DELETE, // ephemeral: flags propagation is a deletion
- S_UPGRADE, // ephemeral: upgrading placeholder, do not apply MaxSize
- S_PURGE, // ephemeral: placeholder is being nuked
- S_PURGED, // ephemeral: placeholder was nuked
-)
+
+#define srec_sts_enum(fn) \
+ fn(S, DEAD) /* ephemeral: the entry was killed and should be ignored */ \
+ fn(S, EXPIRE) /* the entry is being expired (expire-side message removal scheduled) */ \
+ fn(S, EXPIRED) /* the entry is expired (expire-side message removal confirmed) */ \
+ fn(S, NEXPIRE) /* temporary: new expiration state */ \
+ fn(S, PENDING) /* the entry is new and awaits propagation (possibly a retry) */ \
+ fn(S, DUMMY_F) /* f/n message is only a placeholder */ \
+ fn(S, DUMMY_N) \
+ fn(S, SKIPPED) /* pre-1.4 legacy: the entry was not propagated (message is too big) */ \
+ fn(S, GONE_F) /* ephemeral: f/n message has been expunged */ \
+ fn(S, GONE_N) \
+ fn(S, DEL_F) /* ephemeral: f/n message would be subject to non-selective expunge */ \
+ fn(S, DEL_N) \
+ fn(S, DELETE) /* ephemeral: flags propagation is a deletion */ \
+ fn(S, UPGRADE) /* ephemeral: upgrading placeholder, do not apply MaxSize */ \
+ fn(S, PURGE) /* ephemeral: placeholder is being nuked */ \
+ fn(S, PURGED) /* ephemeral: placeholder was nuked */
+DEFINE_PFX_BIT_ENUM(srec_sts_enum)
+#define S_DUMMY(b) (S_DUMMY_F << (b))
+#define S_GONE(b) (S_GONE_F << (b))
+#define S_DEL(b) (S_DEL_F << (b))
// This is the persistent status of the sync record, with regard to the journal.
#define S_LOGGED (S_EXPIRE | S_EXPIRED | S_PENDING | S_DUMMY(F) | S_DUMMY(N) | S_SKIPPED)
@@ -38,8 +43,8 @@ typedef struct sync_rec {
char tuid[TUIDL];
} sync_rec_t;
-static_assert_bits(F, sync_rec_t, flags);
-static_assert_bits(S, sync_rec_t, status);
+static_assert_bits(msg_flags_enum, sync_rec_t, flags);
+static_assert_bits(srec_sts_enum, sync_rec_t, status);
typedef struct {
int t[2];
diff --git a/src/sync_state.c b/src/sync_state.c
index 5567f10..d499f85 100644
--- a/src/sync_state.c
+++ b/src/sync_state.c
@@ -17,7 +17,7 @@
const char *str_fn[] = { "far side", "near side" }, *str_hl[] = { "push", "pull" };
-BIT_FORMATTER_FUNCTION(sts, S)
+BIT_FORMATTER_FUNCTION(sts, srec_sts_enum)
static char *
clean_strdup( const char *s )
|
|
From: ossi <os...@us...> - 2024-07-31 19:33:38
|
commit 31c504d43263a891b7a9d37517f9e26fb650d20b
Author: Oswald Buddenhagen <os...@us...>
Date: Mon Jul 24 11:34:10 2023 +0200
remove redundant argument from BIT_FORMATTER_PROTO()
it doesn't need to know the enum prefix.
amends 17db5de0c & 950ebe833.
src/common.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/common.h b/src/common.h
index 940e74d..9c44bce 100644
--- a/src/common.h
+++ b/src/common.h
@@ -212,12 +212,12 @@ void fmt_bits( uint bits, uint num_bits, const char *bit_str, const int *bit_off
#define BIT_FORMATTER_RET(name, pfx) \
struct name##_str { char str[sizeof(pfx##__STRINGS)]; };
-#define BIT_FORMATTER_PROTO(name, pfx, storage) \
+#define BIT_FORMATTER_PROTO(name, storage) \
storage struct name##_str ATTR_OPTIMIZE /* force RVO */ \
fmt_##name( uint bits )
#define BIT_FORMATTER_IMPL(name, pfx, storage) \
- BIT_FORMATTER_PROTO(name, pfx, storage) \
+ BIT_FORMATTER_PROTO(name, storage) \
{ \
static const char strings[] = pfx##__STRINGS; \
static const int offsets[] = { pfx##__OFFSETS }; \
@@ -233,7 +233,7 @@ void fmt_bits( uint bits, uint num_bits, const char *bit_str, const int *bit_off
#define DECL_BIT_FORMATTER_FUNCTION(name, pfx) \
BIT_FORMATTER_RET(name, pfx) \
- BIT_FORMATTER_PROTO(name, pfx, );
+ BIT_FORMATTER_PROTO(name, );
#define DEF_BIT_FORMATTER_FUNCTION(name, pfx) \
BIT_FORMATTER_IMPL(name, pfx, )
|
|
From: ossi <os...@us...> - 2024-07-31 19:33:37
|
commit 43271d8fad03c2cefd387a8cd80d578c2aa6fd34
Author: Oswald Buddenhagen <os...@us...>
Date: Tue Jul 30 08:25:20 2024 +0200
eliminate commit_cmds driver callback
no driver implements it, and this isn't likely to change any time soon.
src/driver.h | 3 ---
src/drv_imap.c | 9 ---------
src/drv_maildir.c | 7 -------
src/drv_proxy.c | 38 +++++++-------------------------------
src/drv_proxy_gen.pl | 1 -
src/sync.c | 1 -
6 files changed, 7 insertions(+), 52 deletions(-)
diff --git a/src/driver.h b/src/driver.h
index d3068bc..f7c5b95 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -295,9 +295,6 @@ struct driver {
void (*cancel_cmds)( store_t *ctx,
void (*cb)( void *aux ), void *aux );
- /* Commit any pending set_msg_flags() commands. */
- void (*commit_cmds)( store_t *ctx );
-
/* Get approximate amount of memory occupied by the driver. */
uint (*get_memory_usage)( store_t *ctx );
diff --git a/src/drv_imap.c b/src/drv_imap.c
index 681117e..5b67535 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -3653,14 +3653,6 @@ imap_cancel_cmds( store_t *gctx,
}
}
-/******************* imap_commit_cmds *******************/
-
-static void
-imap_commit_cmds( store_t *gctx )
-{
- (void)gctx;
-}
-
/******************* imap_get_memory_usage *******************/
static uint
@@ -4039,7 +4031,6 @@ struct driver imap_driver = {
imap_trash_msg,
imap_close_box,
imap_cancel_cmds,
- imap_commit_cmds,
imap_get_memory_usage,
imap_get_fail_state,
};
diff --git a/src/drv_maildir.c b/src/drv_maildir.c
index cdffc32..847bc06 100644
--- a/src/drv_maildir.c
+++ b/src/drv_maildir.c
@@ -1853,12 +1853,6 @@ maildir_cancel_cmds( store_t *gctx ATTR_UNUSED,
cb( aux );
}
-static void
-maildir_commit_cmds( store_t *gctx )
-{
- (void) gctx;
-}
-
static uint
maildir_get_memory_usage( store_t *gctx ATTR_UNUSED )
{
@@ -1983,7 +1977,6 @@ struct driver maildir_driver = {
maildir_trash_msg,
maildir_close_box,
maildir_cancel_cmds,
- maildir_commit_cmds,
maildir_get_memory_usage,
maildir_get_fail_state,
};
diff --git a/src/drv_proxy.c b/src/drv_proxy.c
index 37dbc34..ffe2e06 100644
--- a/src/drv_proxy.c
+++ b/src/drv_proxy.c
@@ -21,7 +21,6 @@ typedef union proxy_store {
driver_t *real_driver;
store_t *real_store;
gen_cmd_t *pending_cmds, **pending_cmds_append;
- gen_cmd_t *check_cmds, **check_cmds_append;
wakeup_t wakeup;
uint fake_nextuid;
char is_fake; // Was "created" by dry-run
@@ -91,42 +90,25 @@ proxy_wakeup( void *aux )
}
static void
-proxy_invoke( gen_cmd_t *cmd, int checked, const char *name )
+proxy_invoke( gen_cmd_t *cmd, const char *name )
{
proxy_store_t *ctx = cmd->ctx;
if (ctx->force_async) {
- debug( "%s[% 2d] Queue %s%s\n", ctx->label, cmd->tag, name, checked ? " (checked)" : "" );
+ debug( "%s[% 2d] Queue %s\n", ctx->label, cmd->tag, name );
cmd->next = NULL;
- if (checked) {
- *ctx->check_cmds_append = cmd;
- ctx->check_cmds_append = &cmd->next;
- } else {
- *ctx->pending_cmds_append = cmd;
- ctx->pending_cmds_append = &cmd->next;
- conf_wakeup( &ctx->wakeup, 0 );
- }
+ *ctx->pending_cmds_append = cmd;
+ ctx->pending_cmds_append = &cmd->next;
+ conf_wakeup( &ctx->wakeup, 0 );
} else {
cmd->queued_cb( cmd );
proxy_cmd_done( cmd );
}
}
-static void
-proxy_flush_checked_cmds( proxy_store_t *ctx )
-{
- if (ctx->check_cmds) {
- *ctx->pending_cmds_append = ctx->check_cmds;
- ctx->pending_cmds_append = ctx->check_cmds_append;
- ctx->check_cmds_append = &ctx->check_cmds;
- ctx->check_cmds = NULL;
- conf_wakeup( &ctx->wakeup, 0 );
- }
-}
-
static void
proxy_cancel_queued_cmds( proxy_store_t *ctx )
{
- if (ctx->pending_cmds || ctx->check_cmds) {
+ if (ctx->pending_cmds) {
// This would involve directly invoking the result callbacks with
// DRV_CANCEL, for which we'd need another set of dispatch functions.
// The autotest doesn't need that, so save the effort.
@@ -253,7 +235,7 @@ static @type@proxy_@name@( store_t *gctx@decl_args@, void (*cb)( @decl_cb_args@v
cmd->callback = cb;
cmd->callback_aux = aux;
@assign_state@
- proxy_invoke( &cmd->gen, @checked@, "@name@" );
+ proxy_invoke( &cmd->gen, "@name@" );
}
//# END
@@ -382,7 +364,6 @@ static @type@proxy_@name@( store_t *gctx@decl_args@, void (*cb)( @decl_cb_args@v
//# DEFINE store_msg_fake_cb_args , cmd->to_trash ? 0 : ctx->fake_nextuid++
//# DEFINE store_msg_counted 1
-//# DEFINE set_msg_flags_checked 1
//# DEFINE set_msg_flags_print_fmt_args , uid=%u, add=%s, del=%s
//# DEFINE set_msg_flags_print_pass_args , cmd->uid, fmt_flags( cmd->add ).str, fmt_flags( cmd->del ).str
//# DEFINE set_msg_flags_driable 1
@@ -397,10 +378,6 @@ static @type@proxy_@name@( store_t *gctx@decl_args@, void (*cb)( @decl_cb_args@v
//# DEFINE close_box_fake_cb_args , 0
//# DEFINE close_box_counted 1
-//# DEFINE commit_cmds_print_args
- proxy_flush_checked_cmds( ctx );
-//# END
-
//# DEFINE cancel_cmds_print_cb_args
proxy_cancel_queued_cmds( ctx );
//# END
@@ -465,7 +442,6 @@ proxy_alloc_store( store_t *real_ctx, const char *label, int force_async )
ctx->label = label;
ctx->force_async = force_async;
ctx->pending_cmds_append = &ctx->pending_cmds;
- ctx->check_cmds_append = &ctx->check_cmds;
ctx->real_driver = real_ctx->driver;
ctx->real_store = real_ctx;
ctx->real_driver->set_callbacks( ctx->real_store,
diff --git a/src/drv_proxy_gen.pl b/src/drv_proxy_gen.pl
index 6b9c868..dd1021f 100755
--- a/src/drv_proxy_gen.pl
+++ b/src/drv_proxy_gen.pl
@@ -158,7 +158,6 @@ for (@ptypes) {
my $r_pass_args = make_args($r_cmd_args);
$replace{'assign_state'} = $r_pass_args =~ s/([^,]+), /cmd->$1 = $1\;\n/gr;
- $replace{'checked'} = '0';
$template = "CALLBACK";
} else {
$pass_args = make_args($cmd_args);
diff --git a/src/sync.c b/src/sync.c
index c66370c..7f95e85 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -1373,7 +1373,6 @@ box_loaded( int sts, message_t *msgs, int total_msgs, int recent_msgs, void *aux
}
}
for (t = 0; t < 2; t++) {
- svars->drv[t]->commit_cmds( svars->ctx[t] );
svars->state[t] |= ST_SENT_FLAGS;
msgs_flags_set( svars, t );
if (check_cancel( svars ))
|
|
From: ossi <os...@us...> - 2024-07-31 19:33:35
|
commit 8b8313997c357238d85eb70e8fdee005c746eedf
Author: Oswald Buddenhagen <os...@us...>
Date: Tue Jul 30 07:50:49 2024 +0200
Revert "actually implement imap_commit_cmds()"
the CHECK command doesn't do what i thought; the formulation in the
specs was ambiguous - it really checks for new mail, rather than
committing, and each operation is supposed to be atomic. inefficient,
but safe. IMAP4rev2 eliminates the command altogether, subsuming its
function under NOOP.
consequently, the commit callback doesn't make sense for imap.
in principle, we could use it to coalesce multiple STOREs to counter the
inefficiency, but that won't happen any time soon, and the
implementation would look rather differently anyway.
as a "side effect", this fixes an assertion failure in imap_close_box()
when all flag sets failed (e.g., b/c the box was read-only), as their
callbacks would be short-cut in front of the completion of the CHECK
command, which was not sequenced before the close_box() call.
This reverts commit cfaa4848dd7c72e628fcc81a4c4532c9be226144.
src/drv_imap.c | 55 +++++++-------------------------------------------
1 file changed, 7 insertions(+), 48 deletions(-)
diff --git a/src/drv_imap.c b/src/drv_imap.c
index 170e7fc..681117e 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -163,8 +163,7 @@ union imap_store {
// Command queue
imap_cmd_t *pending, **pending_append;
imap_cmd_t *in_progress, **in_progress_append;
- imap_cmd_t *wait_check, **wait_check_append;
- int nexttag, num_in_progress, num_wait_check;
+ int nexttag, num_in_progress;
uint buffer_mem; // Memory currently occupied by buffers in the queue
// Used during sequential operations like connect
@@ -204,7 +203,6 @@ union imap_store {
uint data_len; \
uint uid; /* to identify fetch responses */ \
char high_prio; /* if command is queued, put it at the front of the queue. */ \
- char wait_check; /* Don't report success until subsequent CHECK success. */ \
char to_trash; /* we are storing to trash, not current. */ \
char create; /* create the mailbox if we get an error which suggests so. */ \
char failok; /* Don't complain about NO (@1) / BAD (@2) response. */ \
@@ -352,8 +350,6 @@ new_imap_cmd( uint size )
static void
done_imap_cmd( imap_store_t *ctx, imap_cmd_t *cmd, int response )
{
- if (cmd->param.wait_check)
- ctx->num_wait_check--;
if (cmd->param.data) {
free( cmd->param.data );
cmd->param.data = NULL;
@@ -482,18 +478,6 @@ flush_imap_cmds( imap_store_t *ctx )
}
}
-static void
-finalize_checked_imap_cmds( imap_store_t *ctx, int resp )
-{
- imap_cmd_t *cmd;
-
- while ((cmd = ctx->wait_check)) {
- if (!(ctx->wait_check = cmd->next))
- ctx->wait_check_append = &ctx->wait_check;
- done_imap_cmd( ctx, cmd, resp );
- }
-}
-
static void
cancel_pending_imap_cmds( imap_store_t *ctx )
{
@@ -527,8 +511,6 @@ submit_imap_cmd( imap_store_t *ctx, imap_cmd_t *cmd )
assert( cmd );
assert( cmd->param.done );
- if (cmd->param.wait_check)
- ctx->num_wait_check++;
if ((ctx->pending && !cmd->param.high_prio) || !cmd_sendable( ctx, cmd )) {
if (ctx->pending && cmd->param.high_prio) {
cmd->next = ctx->pending;
@@ -1943,13 +1925,7 @@ imap_socket_read( void *aux )
imap_ref( ctx );
if (resp == RESP_CANCEL)
imap_invoke_bad_callback( ctx );
- if (resp == RESP_OK && cmdp->param.wait_check) {
- cmdp->next = NULL;
- *ctx->wait_check_append = cmdp;
- ctx->wait_check_append = &cmdp->next;
- } else {
- done_imap_cmd( ctx, cmdp, resp );
- }
+ done_imap_cmd( ctx, cmdp, resp );
if (imap_deref( ctx ))
return;
if (ctx->canceling && !ctx->in_progress) {
@@ -1972,7 +1948,6 @@ get_cmd_result_p2( imap_store_t *ctx, imap_cmd_t *cmd, int response )
if (response != RESP_OK) {
done_imap_cmd( ctx, ocmd, response );
} else {
- assert( !ocmd->param.wait_check );
ctx->uidnext = 1;
if (ocmd->param.to_trash)
ctx->trashnc = TrashKnown;
@@ -1993,7 +1968,6 @@ imap_cancel_store( store_t *gctx )
sasl_dispose( &ctx->sasl );
#endif
socket_close( &ctx->conn );
- finalize_checked_imap_cmds( ctx, RESP_CANCEL );
cancel_sent_imap_cmds( ctx );
cancel_pending_imap_cmds( ctx );
free( ctx->ns_prefix );
@@ -2053,7 +2027,7 @@ imap_free_store( store_t *gctx )
{
imap_store_t *ctx = (imap_store_t *)gctx;
- assert( !ctx->pending && !ctx->in_progress && !ctx->wait_check );
+ assert( !ctx->pending && !ctx->in_progress );
if (ctx->state == SST_BAD) {
imap_cancel_store( gctx );
@@ -2164,7 +2138,6 @@ imap_alloc_store( store_conf_t *conf, const char *label )
imap_socket_read, (void (*)(void *))flush_imap_cmds, ctx );
ctx->in_progress_append = &ctx->in_progress;
ctx->pending_append = &ctx->pending;
- ctx->wait_check_append = &ctx->wait_check;
gotsrv:
ctx->conf = cfg;
@@ -2878,7 +2851,7 @@ imap_select_box( store_t *gctx, const char *name )
{
imap_store_t *ctx = (imap_store_t *)gctx;
- assert( !ctx->pending && !ctx->in_progress && !ctx->wait_check );
+ assert( !ctx->pending && !ctx->in_progress );
reset_imap_messages( &ctx->msgs );
@@ -3278,9 +3251,7 @@ imap_flags_helper( imap_store_t *ctx, uint uid, char what, int flags,
char buf[256];
buf[imap_make_flags( flags, buf )] = 0;
- imap_cmd_t *cmd = imap_refcounted_new_cmd( &sts->gen );
- cmd->param.wait_check = 1;
- imap_exec( ctx, cmd, imap_set_flags_p2,
+ imap_exec( ctx, imap_refcounted_new_cmd( &sts->gen ), imap_set_flags_p2,
"UID STORE %u %cFLAGS.SILENT %s", uid, what, buf );
}
@@ -3352,7 +3323,7 @@ imap_close_box( store_t *gctx,
{
imap_store_t *ctx = (imap_store_t *)gctx;
- assert( !ctx->num_wait_check );
+ assert( !ctx->pending && !ctx->in_progress );
if (ctx->opts & OPEN_UID_EXPUNGE) {
INIT_REFCOUNTED_STATE(imap_expunge_state_t, sts, cb, aux)
@@ -3672,7 +3643,6 @@ imap_cancel_cmds( store_t *gctx,
{
imap_store_t *ctx = (imap_store_t *)gctx;
- finalize_checked_imap_cmds( ctx, RESP_CANCEL );
cancel_pending_imap_cmds( ctx );
if (ctx->in_progress) {
ctx->canceling = 1;
@@ -3685,21 +3655,10 @@ imap_cancel_cmds( store_t *gctx,
/******************* imap_commit_cmds *******************/
-static void imap_commit_cmds_p2( imap_store_t *, imap_cmd_t *, int );
-
static void
imap_commit_cmds( store_t *gctx )
{
- imap_store_t *ctx = (imap_store_t *)gctx;
-
- if (ctx->num_wait_check)
- imap_exec( ctx, NULL, imap_commit_cmds_p2, "CHECK" );
-}
-
-static void
-imap_commit_cmds_p2( imap_store_t *ctx, imap_cmd_t *cmd ATTR_UNUSED, int response )
-{
- finalize_checked_imap_cmds( ctx, response );
+ (void)gctx;
}
/******************* imap_get_memory_usage *******************/
|
|
From: ossi <os...@us...> - 2024-07-31 19:33:33
|
commit 84194a7a9fdd179ca15e4b069a3cffbeaec03bab
Author: Oswald Buddenhagen <os...@us...>
Date: Tue Jan 10 11:37:26 2023 +0100
don't try to create already existing boxes
if the SELECT command fails even though the box was LISTed, then the
error cause is obviously not that box is absent, and so we should not
attempt to CREATE it.
src/sync.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/sync.c b/src/sync.c
index bff3684..c66370c 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -377,10 +377,13 @@ sync_boxes( store_t *ctx[], const char * const names[], int present[], channel_c
sync_ref( svars );
for (t = 0; ; t++) {
info( "Opening %s box %s...\n", str_fn[t], svars->orig_name[t] );
- if (present[t] == BOX_ABSENT)
+ if (present[t] == BOX_ABSENT) {
box_confirmed2( svars, t );
- else
+ } else {
+ if (present[t] == BOX_PRESENT)
+ svars->state[t] |= ST_PRESENT;
svars->drv[t]->open_box( ctx[t], box_confirmed, AUX );
+ }
if (t || check_cancel( svars ))
break;
}
@@ -399,6 +402,12 @@ box_confirmed( int sts, uint uidvalidity, void *aux )
if (sts == DRV_OK) {
svars->state[t] |= ST_PRESENT;
svars->newuidval[t] = uidvalidity;
+ } else if (svars->state[t] & ST_PRESENT) {
+ error( "Error: channel %s: %s box %s cannot be opened.\n",
+ svars->chan->name, str_fn[t], svars->orig_name[t] );
+ svars->ret |= SYNC_FAIL;
+ cancel_sync( svars );
+ return;
}
box_confirmed2( svars, t );
}
|
|
From: ossi <os...@us...> - 2024-07-31 19:33:31
|
commit ceb0fa9803b27057c7a8413cf50a51f428f5d792
Author: Oswald Buddenhagen <os...@us...>
Date: Thu Jul 4 09:09:17 2024 +0200
don't try to qsort() NULL array
while this actually works due to the array size being zero, it's
undefined behavior which makes gcc eliminate a subsequent null check in
the calling function.
src/main_sync.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main_sync.c b/src/main_sync.c
index 226e324..fff944c 100644
--- a/src/main_sync.c
+++ b/src/main_sync.c
@@ -186,7 +186,8 @@ filter_boxes( string_list_t *boxes, const char *prefix, string_list_t *patterns
boxarr[num] = NULL;
}
}
- qsort( boxarr, num, sizeof(*boxarr), cmp_box_names );
+ if (boxarr)
+ qsort( boxarr, num, sizeof(*boxarr), cmp_box_names );
return boxarr;
}
|
|
From: ossi <os...@us...> - 2024-07-31 19:33:30
|
commit 12e30ce560c2b79f2de9ab7f44626063c0e7e2ff
Author: Oswald Buddenhagen <os...@us...>
Date: Mon Jul 29 12:05:43 2024 +0200
cap readsz at buffer size
otherwise we may get negative comparison sizes, which the unsigned
arithmetic we use cannot represent. this would prevent buffer content
downshifting, resulting in prepare_read() erroring out.
amends 859b7dd.
REFMAIL: 87h...@wa...
REFMAIL: ec0...@ap...
REFMAIL: 87e...@b3...
REFMAIL: CYA...@fe...
src/socket.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/socket.c b/src/socket.c
index 52cd7c2..afd3f18 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -908,8 +908,11 @@ socket_fill( conn_t *sock )
// IIR filter for tracking average size of bulk reads.
// We use this to optimize the free space at the end of the
// buffer, hence the factor of 1.5.
- if (n >= MIN_BULK_READ)
+ if (n >= MIN_BULK_READ) {
sock->readsz = (sock->readsz * 3 + n * 3 / 2) / 4;
+ if (sock->readsz > sizeof(sock->buf))
+ sock->readsz = sizeof(sock->buf);
+ }
socket_filled( sock, (uint)n );
}
|
|
From: Oswald B. <osw...@gm...> - 2024-07-31 17:20:47
|
On Mon, Oct 31, 2022 at 03:43:28PM +0000, Edd Barrett wrote: >On Fri, Oct 28, 2022 at 05:04:10PM +0200, Oswald Buddenhagen wrote: >> i need the full log. in fact, of two consecutive runs, as this is an >> inter-run problem. you can limit it on the command line to the affected >> mailbox, and send me the log in private. > so, after not even two years after i received the logs (:'-D), i finally analyzed them. posting for posterity. > Socket error on imap.gmail.com (142.251.5.109:993): timeout. > for unclear reasons, mbsync was pushing out the entire 25 meg message within a second, while of course it takes a while to actually upload it and get a response from the server. i suppose the problem was buffer bloat on the network. just raising Timeout to something generally considered unreasonable would be a suitable workaround. > Warning: lost track of 104 pulled message(s) > Warning: lost track of 1 pushed message(s) > > Searching the internet, lots of other people have enountered this, and > as far as I can see, the general advice is "don't worry about it". > > Problem is, the message doesn't go away when you re-run mbsync. > that's because the sync never finished due to the timeout, and so the journal was replayed each time and the (non-)problem reported again. anyway, these messages are gone since commit 254d2be9. |
|
From: Alan S. <ala...@po...> - 2024-07-29 06:10:29
|
On 2024-07-26 16:47, Oswald Buddenhagen via isync-devel <isy...@li...> writes: > On Fri, Jul 26, 2024 at 09:12:54AM +0200, Alan Schmitt wrote: >>Running using --verbose made me realize there is a significant >>difference in the number of messages in the local and remote sides: >> >>Opening far side box INBOX... >>Opening near side box INBOX... >>Loading far side box... >>Loading near side box... >>near side: 38764 messages, 0 recent >>far side: 41361 messages, 0 recent >> >>Should I be worried about this? >> > at first sight, this seems to be the usual harmless-ish case that > requires resetting MaxPulledUID in .mbsyncstate to zero. Ah, good to know, thanks. > as you're using master, it would be interesting to know whether any of > the messages got lost after the last big slew of commits (gee, that's > been two years ...). > or if you're using davmail. because if so, then <insert something snarky > here>. I’m not using davmail and I did not notice any lost message recently. Best, Alan |
|
From: Oswald B. <osw...@gm...> - 2024-07-26 14:48:04
|
On Fri, Jul 26, 2024 at 09:12:54AM +0200, Alan Schmitt wrote: >Running using --verbose made me realize there is a significant >difference in the number of messages in the local and remote sides: > >Opening far side box INBOX... >Opening near side box INBOX... >Loading far side box... >Loading near side box... >near side: 38764 messages, 0 recent >far side: 41361 messages, 0 recent > >Should I be worried about this? > at first sight, this seems to be the usual harmless-ish case that requires resetting MaxPulledUID in .mbsyncstate to zero. as you're using master, it would be interesting to know whether any of the messages got lost after the last big slew of commits (gee, that's been two years ...). or if you're using davmail. because if so, then <insert something snarky here>. |
|
From: Alan S. <ala...@po...> - 2024-07-26 07:46:35
|
Hello again, On 2024-07-26 09:12, Alan Schmitt <ala...@po...> writes: > I recently noticed I kept having a "Notice: conflicting changes" when > running mbsync, for the same messages. I tried running with the > --debug-sync option and this is what is shown: > > pair (116224,78284) > Notice: conflicting changes in (116224,78284) > pulling delete > pair (116225,78285) > Notice: conflicting changes in (116225,78285) > pulling delete > > How can I find out which messages are problematic and how to solve the > conflict? Using --verbose (which is less verbose than debug), I was able to find the problematic mailbox, and the second number gave me the uid in the file name so that I could identify the mail. It seems it’s a mail that is trashed locally (with the "T" flag) and absent remotely. I deleted the local mail and all was fine afterwards. I think I deleted the mail using another MUA, and the change was not propagated correctly as I also read the mail locally. > Running using --verbose made me realize there is a significant > difference in the number of messages in the local and remote sides: I’m still curious about this however. Alan |
|
From: Alan S. <ala...@po...> - 2024-07-26 07:37:58
|
Hello, I recently noticed I kept having a "Notice: conflicting changes" when running mbsync, for the same messages. I tried running with the --debug-sync option and this is what is shown: pair (116224,78284) Notice: conflicting changes in (116224,78284) pulling delete pair (116225,78285) Notice: conflicting changes in (116225,78285) pulling delete How can I find out which messages are problematic and how to solve the conflict? Running using --verbose made me realize there is a significant difference in the number of messages in the local and remote sides: Opening far side box INBOX... Opening near side box INBOX... Loading far side box... Loading near side box... near side: 38764 messages, 0 recent far side: 41361 messages, 0 recent Should I be worried about this? I’m using isync 1.5.0 built from the git repo on 2024-05-24. Best, Alan |
|
From: Oswald B. <osw...@gm...> - 2024-07-16 19:06:28
|
On Tue, Jul 16, 2024 at 04:55:22PM +0000, Johan Parin wrote: >So are you saying this is an Exchange problem or a DavMail problem? > davmail. that's why i'm strongly suggesting that you try "native" exchange imap (it's not really native; it's also just a translation layer, but at least it's directly from ms, and it *did* improve (from abysmal to just bad)). >I'm guessing I'm not the only user being forced to communicate with >Exchange so this must be a very common problem then.. > indeed, i'm getting reports about it being more or less broken at a disproportional rate. |
|
From: Johan P. <joh...@er...> - 2024-07-16 16:55:36
|
Oswald Buddenhagen via isync-devel <isy...@li...> writes: > On Tue, Jul 16, 2024 at 01:44:50PM +0000, Johan Parin wrote: >>That pulled around 2.5K messages. Now I can see on Outlook web my Inbox >>has 19077 items. With notmuch I get after 'notmuch new': >> >> $ notmuch count folder:work/INBOX >> 19074 >> >>I guess that is close enough. >> > well, that probably means that three messages were hidden from view > during that sync ... > >>So now I hope it can stay synced. >> > .. which means that this has a very low chance of being the case. > So are you saying this is an Exchange problem or a DavMail problem? I'm guessing I'm not the only user being forced to communicate with Exchange so this must be a very common problem then.. /Johan |
|
From: Johan P. <joh...@er...> - 2024-07-16 15:17:03
|
OK, I now did the following changes: Sync Pull Expunge None And set the MaxPulledUID for my INBOX to 0. Then mbsynx work:INBOX That pulled around 2.5K messages. Now I can see on Outlook web my Inbox has 19077 items. With notmuch I get after 'notmuch new': $ notmuch count folder:work/INBOX 19074 I guess that is close enough. So now I hope it can stay synced. Again I will be satisifed with a model where I never delete anything anywhere. I hope that if I set Expunge to None mbsync will never delete anything? The only destructive operation I do is sometimes I archive parts of my Inbox. I do this on the server - create a folder, say arch/2023 then move all the messages in Inbox from 2023 to that folder. This folder creation and move of messages I want mirrored locally. This worked with my previous configuration. Hope this will work as well with this new config with Sync-Pull and Expunge-None. I did have Create-Both although I guess Create-Near would suffice. Thanks for the help. /Johan |
|
From: Oswald B. <osw...@gm...> - 2024-07-16 14:53:52
|
On Tue, Jul 16, 2024 at 01:44:50PM +0000, Johan Parin wrote: >That pulled around 2.5K messages. Now I can see on Outlook web my Inbox >has 19077 items. With notmuch I get after 'notmuch new': > > $ notmuch count folder:work/INBOX > 19074 > >I guess that is close enough. > well, that probably means that three messages were hidden from view during that sync ... >So now I hope it can stay synced. > .. which means that this has a very low chance of being the case. >Again I will be satisifed with a model >where I never delete anything anywhere. I hope that if I set Expunge to >None mbsync will never delete anything? > it will still mark the messages as deleted, only physical deletion is left to something else. if you don't want to pull deletions, then you need to omit them from the "Sync" set. but then ... >The only destructive operation I do is sometimes I archive parts of my >Inbox. [...] > .. this won't work. there is no way to get it working as long as the imap server is incapable of reliably telling which messages are actually in the mailbox. you can observe the network traffic with -Dn, but in all likelihood this will just tell you that indeed the imap server is omitting some messages from the FETCH results, without due cause. |
|
From: Oswald B. <osw...@gm...> - 2024-07-16 08:16:40
|
On Tue, Jul 16, 2024 at 05:10:11AM +0000, Johan Parin wrote: >So what I'm doing is I have copied the settings from Evolution >(including tenantID) from Linux users in the company (as Linux & >Evolution is a supported configuration in our IT policy), so I pretend >I'm using Evolution. > yes, that's par for the course, afaik. >How about > > Sync Pull > yes > Expunge None > 'Expunge Near' would probably fit your setup better, but check the manual. >Any manipulataion of the .mbsyncstate files? > depending on what actually went wrong, that might be in order. did you check whether the mails are still on the server? if so, then resetting MaxPulledUID to zero would cause the messages to magically re-appear (for the time being ...). >Remove .mbsynctstate? > not recommended in this case. |
|
From: Johan P. <joh...@er...> - 2024-07-16 05:10:26
|
Oswald Buddenhagen via isync-devel <isy...@li...> writes: > On Sun, Jul 14, 2024 at 03:09:58PM +0000, Johan Parin via isync-devel wrote: >>I have a setup at work where the company is using MS Exchange + >>OAUTH2. I use DavMail to deal with OAUTH2 and then mbsync to connect to >>DavMail. As MUA I use notmuch. >> >>This was working OK for a while I think but then I started noticing >>messages missing locally. [...] >> > there is nothing obviously wrong with your config, except that davmail > is known to be a total pita. even though exchange imap is also a PoS, > you still should have better luck with it if the server is configured > to allow it; how-tos regarding oauth2 can be found in the list archive > (a patch with a high-quality writeup and required scripts that can be > included upstream would be appreciated). > I will search the archive for this. But previously in my research most tools would require you to actually acquire some tenant / client ID and I do not have authoritiy to do that. So what I'm doing is I have copied the settings from Evolution (including tenantID) from Linux users in the company (as Linux & Evolution is a supported configuration in our IT policy), so I pretend I'm using Evolution. I realize DavMail isn't the ideal setup and I want to get rid of it. But right now I just want to get to a working setup, loosing a lot of mail is not acceptable so if this continues I may be forced to (dread) switch to Outlook. Again, what would work is if mbsync would just mirror locally whatever is on the server and never propagate anything up, never delete anything. Would there be a setup to help me do that? If I want to do a total mirror now of everything on the server how could I do that? How about Sync Pull Expunge None Any manipulataion of the .mbsyncstate files? Remove .mbsynctstate? Again I just want to reach a state where I have a mirror locally of what's on the server and that messages are then never deleted locally. /Johan |
|
From: Oswald B. <osw...@gm...> - 2024-07-14 17:22:44
|
On Sun, Jul 14, 2024 at 03:09:58PM +0000, Johan Parin via isync-devel wrote: >I have a setup at work where the company is using MS Exchange + >OAUTH2. I use DavMail to deal with OAUTH2 and then mbsync to connect to >DavMail. As MUA I use notmuch. > >This was working OK for a while I think but then I started noticing >messages missing locally. [...] > there is nothing obviously wrong with your config, except that davmail is known to be a total pita. even though exchange imap is also a PoS, you still should have better luck with it if the server is configured to allow it; how-tos regarding oauth2 can be found in the list archive (a patch with a high-quality writeup and required scripts that can be included upstream would be appreciated). if you want to debug it (primarily for the purpose of making a good bug report for davmail, i guess), add -D to mbsync's options and try to catch it in the act of losing a mail. |
|
From: Johan P. <joh...@er...> - 2024-07-14 15:24:49
|
Hi, I have a setup at work where the company is using MS Exchange + OAUTH2. I use DavMail to deal with OAUTH2 and then mbsync to connect to DavMail. As MUA I use notmuch. This was working OK for a while I think but then I started noticing messages missing locally. Also I have seen messages being synced and then later being deleted. This semms to have become worse and worse and there are lots of messages missing. I would very much like help in debugging this, I'm attaching my mbsyncrc. In my setup it is actually not necessary to sync upstream. It would be OK to just sync everything from the server down to my local storage and nothing back - if that would help. As it is now the only thing being synced back is the Sent folder, but that's not necessary. I'm on MacOs Sonoma 14.5. I installed mbsync via homebrew and it is 1.4.4. /Johan |
|
From: Oswald B. <osw...@gm...> - 2024-07-10 12:48:04
|
On Wed, Jul 10, 2024 at 11:34:59AM +0000, Thomas Bergheim wrote: >Everything works great, except for this bug. > isync just thinks it already synced everything it should have. the log merely reflects a static state, so it doesn't help with figuring out how this happened. you can work around the state by hacking MaxPulledUID in the mbsyncstate files; there are numerous related threads here. >And it happens often enough that I am wondering if there is any long >term solution to this problem? > it might be fixed in master, but that is buggy in other ways. |
|
From: Thomas B. <kni...@gl...> - 2024-07-10 11:53:05
|
Hello, Everything works great, except for this bug. And it happens often enough that I am wondering if there is any long term solution to this problem? I am thinking of creating a script which will compare near and far and send me an email or something if they start diverging, because at that point I stop getting email and it will usually take a long while for me to notice. Config at https://github.com/bergheim/dotfiles/blob/master/.mbsyncrc Output of mbsync -VD glvortex-inbox:Drafts: Reading configuration file /home/tsb/.mbsyncrc Channel glvortex-inbox Opening far side store glvortex-remote... F: [ 1] Enter connect_store Resolving 127.0.0.1... ok Connecting to 127.0.0.1 (127.0.0.1:1143)... F: [ 1] Leave connect_store Opening near side store glvortex-local... N: [ 2] Enter connect_store N: [ 2] Callback enter connect_store, sts=0 N: [ 2] Callback leave connect_store N: [ 2] Leave connect_store F: * OK [CAPABILITY ID IDLE IMAP4rev1 MOVE STARTTLS UIDPLUS UNSELECT] Proton Mail Bridge 03.12.00 - gluon session ID 69 F: >>> 1 STARTTLS F: 1 OK Begin TLS negotiation now Connection is now encrypted F: >>> 2 CAPABILITY F: * CAPABILITY ID IDLE IMAP4rev1 STARTTLS F: 2 OK CAPABILITY Logging in... F: >>> 3 LOGIN <user> <pass> F: 3 OK [CAPABILITY ID IDLE IMAP4rev1 MOVE STARTTLS UIDPLUS UNSELECT] Logged in F: [ 1] Callback enter connect_store, sts=0 F: Enter select_box, name=Drafts F: Leave select_box, ret=0 N: Enter select_box, name=Drafts N: Leave select_box, ret=0 N: Called get_box_path, ret=/home/tsb/.mail/glvortex/Drafts reading sync state /home/tsb/.mail/glvortex/Drafts/.mbsyncstate ... entry (1,1,17,) entry (640,3,17,) entry (648,4,17,) entry (674,13,17,) entry (675,9,17,) entry (676,10,17,) entry (677,14,17,) entry (0,17,0,) entry (0,18,0,) entry (0,19,0,) entry (0,20,0,) entry (0,21,0,) entry (681,23,17,) entry (0,22,0,) Opening far side box Drafts... F: [ 3] Enter open_box F: >>> 4 SELECT "Drafts" F: [ 3] Leave open_box Opening near side box Drafts... N: [ 4] Enter open_box N: [ 4] Callback enter open_box, sts=0, uidvalidity=1715859821 N: [ 4] Callback leave open_box N: [ 4] Leave open_box F: [ 1] Callback leave connect_store F: * FLAGS ($Forwarded Forwarded \Deleted \Flagged \Seen) F: * 8 EXISTS F: * 0 RECENT F: * OK [PERMANENTFLAGS ($Forwarded Forwarded \Deleted \Flagged \Seen)] Flags permitted F: * OK [UIDNEXT 684] Predicted next UID F: * OK [UIDVALIDITY 36072216] UIDs valid F: 4 OK [READ-WRITE] SELECT F: [ 3] Callback enter open_box, sts=0, uidvalidity=36072216 F: Enter prepare_load_box, opts=0xe7 F: Leave prepare_load_box, ret=0xe7 N: Enter prepare_load_box, opts=0xe7 N: Leave prepare_load_box, ret=0xe7 Loading far side box... F: [ 5] Enter load_box, [1,inf] (find >= 0, paired <= 4294967295, new > 683) F: >>> 5 UID FETCH 1:683 (UID FLAGS) F: [ 5] Leave load_box Loading near side box... N: [ 6] Enter load_box, [1,inf] (find >= 0, paired <= 4294967295, new > 23) N: [ 6] Callback enter load_box, sts=0, total=14, recent=0 uid=1 flags=DS size=0 tuid=? uid=3 flags=DS size=0 tuid=? uid=4 flags=DS size=0 tuid=? uid=9 flags=DS size=0 tuid=? uid=10 flags=DS size=0 tuid=? uid=13 flags=DS size=0 tuid=? uid=14 flags=DS size=0 tuid=? uid=17 flags=DS size=0 tuid=? uid=18 flags=DS size=0 tuid=? uid=19 flags=DS size=0 tuid=? uid=20 flags=DS size=0 tuid=? uid=21 flags=DS size=0 tuid=? uid=22 flags=DS size=0 tuid=? uid=23 flags=DS size=0 tuid=? near side: 14 messages, 0 recent matching messages on near side against sync records N: [ 6] Callback leave load_box N: [ 6] Leave load_box F: [ 3] Callback leave open_box F: * 1 FETCH (UID 1 FLAGS (\Draft \Seen)) F: * 2 FETCH (UID 640 FLAGS (\Draft \Seen)) F: * 6 FETCH (UID 676 FLAGS (\Draft \Seen)) F: * 3 FETCH (UID 648 FLAGS (\Draft \Seen)) F: * 8 FETCH (UID 681 FLAGS (\Draft \Seen)) F: * 5 FETCH (UID 675 FLAGS (\Draft \Seen)) F: * 7 FETCH (UID 677 FLAGS (\Draft \Seen)) F: * 4 FETCH (UID 674 FLAGS (\Draft \Seen)) F: 5 OK command completed in 788 microsec. F: [ 5] Callback enter load_box, sts=0, total=8, recent=0 uid=1 flags=DS size=0 tuid=? uid=640 flags=DS size=0 tuid=? uid=648 flags=DS size=0 tuid=? uid=674 flags=DS size=0 tuid=? uid=675 flags=DS size=0 tuid=? uid=676 flags=DS size=0 tuid=? uid=677 flags=DS size=0 tuid=? uid=681 flags=DS size=0 tuid=? far side: 8 messages, 0 recent matching messages on far side against sync records Synchronizing... F: Called get_supported_flags, ret=0xff N: Called get_supported_flags, ret=0xff synchronizing old entries pair (1,1) pair (640,3) pair (648,4) pair (674,13) pair (675,9) pair (676,10) pair (677,14) pair (0,17) no far side pair (0,18) no far side pair (0,19) no far side pair (0,20) no far side pair (0,21) no far side pair (681,23) pair (0,22) no far side synchronizing new messages on near side synchronizing new messages on far side synchronizing flags F: Enter commit_cmds F: Leave commit_cmds N: Enter commit_cmds N: Leave commit_cmds propagating new messages expunging far side F: [ 7] Enter close_box F: >>> 6 CLOSE F: [ 7] Leave close_box expunging near side N: [ 8] Enter close_box N: [ 8] Callback enter close_box, sts=0 N: [ 8] Callback leave close_box N: [ 8] Leave close_box F: [ 5] Callback leave load_box F: 6 OK CLOSE F: [ 7] Callback enter close_box, sts=0 purging obsolete entries F: [ 9] Enter cancel_cmds F: [ 9] Callback enter cancel_cmds F: Enter free_store F: Leave free_store F: [ 9] Callback leave cancel_cmds F: [ 9] Leave cancel_cmds N: [ 10] Enter cancel_cmds N: [ 10] Callback enter cancel_cmds N: Enter free_store N: Leave free_store N: [ 10] Callback leave cancel_cmds N: [ 10] Leave cancel_cmds F: >>> 7 LOGOUT F: [ 7] Callback leave close_box F: * BYE F: 7 OK LOGOUT Thanks! |
|
From: Paymon <dar...@gm...> - 2024-07-09 14:19:42
|
On Tue, Jul 09, 2024 at 12:14:42PM GMT, Oswald Buddenhagen via isync-devel wrote: > yes, it was added with specifically that use case in mind. good stuff; thanks. and for the next wondering wanderer; also see ExpireUnread. - Paymon |