Dear Oswald,

On Fri, Nov 20, 2015 at 09:17:32AM +0100, Oswald Buddenhagen wrote:
> On Sat, Nov 14, 2015 at 03:06:50PM -0600, Luis Mochan wrote:
> > I noticed that if I edit very recently sent messages from my laptop
> > (mbsync's slave), my edits disappear shortly afterwards. I guess that
> > the sequence is that mbsync copies the orignal file to my server, then
> > I edit the message in the slave and finally mbsync copies the original
> > message back to the slave, overwriting the edited message.  Is this
> > what happens?
> > 
> if you edit the message and change its UID (which effectively means
> giving it a new file name) as required by IMAP, mbsync will propagate a
> deletion and a re-upload. but that wouldn't overwrite the local file.

Let me describe an example I just ran. I sent a message from the slave
and it appeared in Maildir/cur

  mochan@yapaque:~/Maildir/cur$ ls -lt
  total 1175640
  -rw-r--r-- 1 mochan mochan      836 Nov 20 09:54 
1448034847.8535_917.yapaque:2,S
  ...

I edited the file to add Xlabels using mutt and a helper script. Then
the file above was  marked for deletion in mutt and a new file
appeared under Maildir/new

  mochan@yapaque:~/Maildir/new$ ls -lt 
  total 13248
  -rw-r--r-- 1 mochan mochan     852 Nov 20 09:54 1448034885.8535_919.yapaque

I didn't expunge the message.

After mbsync ran, both files got a new name although the times
reported by ls didn't change

  mochan@yapaque:~/Maildir/cur$ ls -lt
  total 1175640
  -rw-r--r-- 1 mochan mochan      836 Nov 20 09:54 
1448034847.8535_917.yapaque,U=5976:2,S
  ...

  and

  mochan@yapaque:~/Maildir/new$ ls -lt
  total 13248
  -rw-r--r-- 1 mochan mochan     852 Nov 20 09:54 
1448034885.8535_919.yapaque,U=5977
  ...

and the message in cur was no longer marked for deletion. My edits
were preserved in the Maildir/new file, but I was confused by the
reappearance of the unedited, undeleted file in Maildir/cur (in mutt I
was filtering out the already edited messages, so when the message
reappeared, I thought I had lost the editions). I guess that the
U=xxxx part of the name is assigned by the master and the behavior is
normal; my only problem is I loose the mark for deletion when I edit
the file before mbsync acts.
> 
> if you edit it correctly without renaming, mbsync shouldn't even notice
> that you changed it, so it won't upload it a second time, and even less
> download it again.
> 
> so in short, i have no clue what is happening.
> 
> > I'm using the isync package from debian/stretch.
> >
> i need an actual version number. the debugging options depend on it.

  mochan@yapaque:~/Maildir/cur$ mbsync -v
  isync 1.1.2

> 
> the usual procedure is to enable mbsync's verbose/debug output and see
> what it thinks it does.
> 

I ran mbsync with the -V flag. I got a very large output, but I
include below what I think is the relevant part for the example above.

Thanks and best regards,
Luis

---------------------

Sync started at 2015-11-20 09:55:48 (1 mailbox)
+ mbsync -V em:INBOX 
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE 
STARTTLS LOGINDISABLED] Dovecot ready.
>>> 1 STARTTLS
1 OK Begin TLS negotiation now.
>>> 2 CAPABILITY
* CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE 
AUTH=PLAIN
2 OK Pre-login capabilities listed, post-login capabilities have more.
>>> 3 LOGIN <user> <pass>
3 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT 
SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND 
URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED 
I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH 
LIST-STATUS BINARY MOVE SPECIAL-USE] Logged in
>>> 4 NAMESPACE
* NAMESPACE (("" "/")) NIL NIL
4 OK Namespace completed.
>>> 5 SELECT "INBOX"
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft unknown-1 unknown-0 Old 
$Forwarded)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft unknown-1 
unknown-0 Old $Forwarded \*)] Flags permitted.
* 4351 EXISTS
* 0 RECENT
* OK [UNSEEN 4148] First unseen.
* OK [UIDVALIDITY 1384393581] UIDs valid
* OK [UIDNEXT 93688] Predicted next UID
* OK [HIGHESTMODSEQ 123894] Highest
5 OK [READ-WRITE] Select completed (0.000 secs).
>>> 6 UID FETCH 1:93687 (UID FLAGS)
* 1 FETCH (UID 78197 FLAGS (\Seen))
* 2 FETCH (UID 78198 FLAGS (\Seen))
* 3 ...
  ...
* 4347 FETCH (UID 93668 FLAGS (\Seen))
* 4348 FETCH (UID 93669 FLAGS ())
* 4349 FETCH (UID 93670 FLAGS (\Seen))
* 4350 FETCH (UID 93671 FLAGS ())
* 4351 FETCH (UID 93681 FLAGS ())
6 OK Fetch completed (0.023 secs).
>>> 7 APPEND "INBOX" (\Seen) {883+}
(1 in progress) >>> 8 APPEND "INBOX" {900+}
* 4352 EXISTS
* 1 RECENT
7 OK [APPENDUID 1384393581 93688] Append completed (0.081 secs).
* 4353 EXISTS
* 2 RECENT
8 OK [APPENDUID 1384393581 93689] Append completed (0.094 secs).
>>> 9 CLOSE
9 OK Close completed.
>>> 10 LOGOUT
* BYE Logging out
10 OK Logout completed.
Sync completed after 1s at 2015-11-20 09:55:49 (1 mailbox)


------------------------------------------------------------------------------
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to