Commit Graph

43 Commits

Author SHA1 Message Date
Oswald Buddenhagen
52c063fd45 add support for UTF-7 mailbox names
this finally makes us compliant with IMAP4rev1. how fitting that the
meanwhile released IMAP4rev2 demoted UTF-7 to legacy status ...

based on a patch by Georgy Kibardin <georgy@kibardin.name>.
2022-06-19 16:12:55 +02:00
Oswald Buddenhagen
4d75c45507 add --ext-exit option
this is only a partial solution for reporting changes, but it's
adequate if the goal is merely triggering a bulk action, like
re-indexing the local store.

inspired by patches posted by Yuri D'Elia <wavexx@thregr.org>.
2022-06-19 16:12:06 +02:00
Oswald Buddenhagen
70bad66129 create placeholders for messages over MaxSize
this is vastly more useful than just omitting the messages with no
indication at all.
2020-08-04 17:16:03 +02:00
Oswald Buddenhagen
c8f402e43f deprecate master/slave terminology
the underlying metaphor refers to an inhumane practice, so using it
casually is rightfully offensive to many people. it isn't even a
particularly apt metaphor, as it suggests a strict hierarchy that is
counter to mbsync's highly symmetrical mode of operation.

the far/near terminology has been chosen as the replacement, as it is a
natural fit for the push/pull terminology. on the downside, due to these
not being nouns, a few uses are a bit awkward, and several others had to
be amended to include 'side'. also, it's conceptually quite close to
remote/local, which matches the typical use case, but is maybe a bit too
suggestive of actually non-existing limitations.

the new f/n suffixes of the -C/-R/-X options clash with pre-existing
options, so direct concatenation of short options is even less practical
than before (some suffixes of -D already clashed), but doing that leads
to unreadable command lines anyway.

as with previous deprecations, all pre-existing command line and config
options keep working, but yield a warning. the state files are silently
upgraded.
2020-08-04 17:16:03 +02:00
Oswald Buddenhagen
1004756659 kill TODO item about killing INBOX
while it's correct that mbsync doesn't strictly need to support both
Inbox and Path in a single Channel due to being able to Group Channels,
this "simplification" would have some undesirable effects:
- the concept is part of IMAP and provides a certain level of
  "zero-conf" (in particular via NAMESPACE). having to set up two Stores
  and associated Channels for one Account to reproduce this
  functionality would add quite some redundancy to common
  configurations.
- implementing MapInbox and move detection across Channels would add
  significant complexity.

one reason why one would want this change in the first place is to get
rid of the ambiguity of INBOX appearing right under Path. this could be
avoided by either using a different magic prefix that cannot appear in
actual mailbox names, or requiring a prefix for boxes inside path as
well. neither approach seems worth the effort, given that nesting
"INBOX" under Path causes problems for some other IMAP clients anyway.
2020-08-04 14:49:57 +02:00
Oswald Buddenhagen
04fc586e75 handle case-insensitivity of IMAP's INBOX
this is relevant only when listing an IMAP Store's contents, as that's
the only place where we aren't imposing the spelling ourselves.

we need to be careful not to treat our own canonical (prefix-stripped
and always slash-delimited) box names like that; codify that in
comments.

this reveals that commit 6f2160f1 may be deemed to have been incorrect -
the TODO item was ambiguous, and could quite possibly have meant this
fix. unsurprisingly, 380ccdd4 re-introduced it with more explicit
wording.
2020-07-08 11:14:02 +02:00
Oswald Buddenhagen
380ccdd43a update TODO 2017-10-01 14:37:36 +02:00
Oswald Buddenhagen
2bba9b903c wrap message trashing into simple transactions
trashing many messages at once inevitably overtaxes m$ exchange, and the
connection breaks. without any progress tracking, it would restart from
scratch each time, which would lead to a) it never finishing and b) many
copies of the messages in the trash.

full transactions as we do for "proper" syncing would be over the top,
as it's not *that* bad if some messages get duplicated in the trash. so
we record only the messages for which trashing completed, thus allowing
some overlap between the attempts.
2016-11-06 09:26:16 +01:00
Oswald Buddenhagen
bcd43e2c66 Merge branch 'isync_1_2_branch'
Conflicts:
	configure.ac
	src/drv_imap.c
2015-05-09 19:31:55 +02:00
Oswald Buddenhagen
d0494fef43 remove obsolete TODO item
amends 74c78c70+b85153f8.
2015-05-01 19:23:46 +02:00
Oswald Buddenhagen
1eb88d4fea add socket timeout handling 2015-04-26 20:58:22 +02:00
Oswald Buddenhagen
5f265ad7da unify .isyncuidmap.db handling with that of .uidvalidity
that is, open the database on demand when locking and close it again
when unlocking.
2015-01-17 17:51:20 +01:00
Oswald Buddenhagen
d9a983add6 add support for propagating folder deletions 2015-01-17 17:51:20 +01:00
Oswald Buddenhagen
eb1005151c add SASL support
patch initially by Jack Stone <jwjstone@fastmail.fm>,
cleaned up by Jan Synacek <jsynacek@redhat.com>,
... and then almost completely rewritten by me. ^^
2014-10-20 10:10:55 +02:00
Oswald Buddenhagen
f9386d0b83 remove apparently obsolete item about Mutt's confusion
seems to work just fine ...
2013-12-15 14:06:14 +01:00
Oswald Buddenhagen
760bfa2cc6 pre-release doc updates 2013-12-15 13:46:25 +01:00
Oswald Buddenhagen
35851f133b add option to control amount of fsync()ing 2012-09-15 15:28:15 +02:00
Oswald Buddenhagen
0a8f19294c pre-release doc updates 2012-09-01 21:15:53 +02:00
Oswald Buddenhagen
6f2160f136 remove todo about case insensitive INBOX
this is *our* magic string, not IMAP's.
ok, admittedly, we *also* send it to IMAP, but that's just convenience.
actually making it case insensitive would improve interoperability with
thunderbird (which interprets INBOX even if qualified), but would break
existing setups (including mine).
2012-09-01 21:15:53 +02:00
Oswald Buddenhagen
9bbb02b8fd Revert "fix UIDNEXT handling"
in fact, UIDNEXT (and UIDVALIDITY) null is *not* allowed (see RFC3501
section 9). them popping up nonetheless was a dovecot bug (which would
also confuse dovecot itself).
having it in as a workaround was no good either, as quite some other
code in mbsync assumes that UIDs are not null.

This reverts commit e1fa867 and most of 39006d7.

-REFMAIL: 4CA62BA1.4020104@lemma.co.uk
2012-09-01 21:15:07 +02:00
Oswald Buddenhagen
d2bed4990d unify error reporting
- introduce sys_error() and use it instead of perror() and
  error(strerror()) in all expected error conditions
- perror() is used only for "something's really wrong with the system"
  kind of errors
- file names, etc. are quoted if they are not validated yet, so e.g. an
  empty string becomes immediately obvious
- improve and unify language
- add missing newlines
2012-09-01 21:15:07 +02:00
Oswald Buddenhagen
39006d7f24 document some breakage 2010-11-14 17:23:59 +01:00
Oswald Buddenhagen
022d137b8c more to do 2010-02-06 11:58:36 +01:00
Oswald Buddenhagen
850addecd5 wrap message storing into transactions. nice side effect: drivers don't
need to deal with line end conversion any move.
2006-02-03 21:33:43 +00:00
Oswald Buddenhagen
c37f908d61 update 2004-09-08 16:37:36 +00:00
Oswald Buddenhagen
130664b622 The Big Rewrite. too many change to list them all.
as opposed to earlier threats, BerkDB was not entirely dropped; i
suppose the isync 0.7 -> 0.8 change had a reason, so i added an
alternative UID storage scheme.
note that BDB 4.0 is not sufficient, as the db->open function changed in
an incompatible way ...

i updated the debian packaging except for a changelog entry.
note that i removed the upgrade blurb, as upstream now has a smooth
upgrade path down to at least isync 0.4.
2004-03-27 16:07:20 +00:00
Oswald Buddenhagen
8c5a1d94de more to do 2004-01-17 11:47:21 +00:00
Oswald Buddenhagen
24c57a244e more to do 2004-01-09 20:10:19 +00:00
Oswald Buddenhagen
4e5bfd4629 update 2004-01-09 18:52:45 +00:00
Oswald Buddenhagen
4fba9c8b74 item morphed 2003-12-02 02:52:47 +00:00
Oswald Buddenhagen
e68fc4b463 more to do ... 2003-02-27 18:41:54 +00:00
Oswald Buddenhagen
4146c05c87 - ssh tunnels are supported for ages ... 2002-12-28 04:12:53 +00:00
Oswald Buddenhagen
a4f2725bad - update isyncmaxuid properly 2002-12-28 04:12:07 +00:00
Michael Elkins
44d360d184 check for dbm_open() in libc and libdb 2002-01-28 19:34:22 +00:00
Michael Elkins
c121ec912f updated year in copyright notice
the uid for each message in the maildir is now stored in a dbm database
rather than the filename.  this change was necessary because isync became
confused if you copied a message to another folder, in which case the uid
was invalid.

as a result of the above change, isync now acquires a mutex on the mailbox
to protect the dbm database from concurrent access.

main() was reworked to continue gracefully when an error is encountered, and
to always call maildir_close() so that the lock can be disabled, and the
database closed.
2002-01-16 19:47:28 +00:00
Michael Elkins
f0c7fdf008 added memory debugging code
fixed memory leak in free_list()

free memory associated with global settings on exit
2001-11-19 19:41:14 +00:00
Michael Elkins
c4050700c0 added code to clean the tmp directory in a maildir to comply with
maildir(5)
2001-10-03 16:48:17 +00:00
Michael Elkins
e015398ff2 added `Delete' configuration option to force -d option
sync_mailbox() didn't consider MaxSize == 0 to mean "unlimited".

load_config() needs to print a newline in its error messages since
next_arg() kills the newline of the line that was read out of the config
file.
2001-10-03 05:42:22 +00:00
Michael Elkins
1efcad03f8 update TODO list with action items 2001-10-03 00:03:14 +00:00
Michael Elkins
8af21c5604 handle untagged responses in imap_fetch_message() so that it doesn't bomb
out if new mail arrives while in the process of downloading

noted in BUGS section of man page that if new mail arrives after the initial
message list has been retrieved from the IMAP server, that new mail will not
be fetched until the next invocation of isync.
2001-06-18 21:38:44 +00:00
Michael Elkins
7173d07192 added support for tilde (~) expansion in the Mailbox' and CertificateFile'
configuration directives

added `Maildir' configuration command to specify the default location of the
user's mailboxes.  If a relative path is used in a `Mailbox' command, this
path is used as a prefix.
2001-01-16 19:45:08 +00:00
Michael Elkins
ba7650c9b7 added generic IMAP list parser and rewrote imap_exec() to handle
arbitrary data instead of hardcoded
2000-12-21 10:24:53 +00:00
Michael Elkins
f47d0d7c11 initial import 2000-12-20 21:41:21 +00:00