QRESYNC would require keeping track of expunges. This could be implemented by just going through records in log files to find out what messages have been expunged since the given modseq (= log seq+offset). Although I'm not sure if it would be better to have a separate expunge log. To allow rarely (e.g. once a week?) syncing clients the .log files may have to be rotated less often, so they would take more space. Also reading through them to find expunges would be slower than reading a separate log having only expunges. But writing a separate expunge log would add extra writes and there's no guarantee that it's ever even read.
Yeah, expunges are one of the fairly crucial things to track here in order to support sync between servers. You can always infer creation of new messages by seeing that they exist on one server and not the other, but you can't differentiate between a delete on one server and a creation on the other without some kind of "tombstone" record to record the delete.
Iff it turns out to have a performance effect perhaps it would make sense to have it as a configurable option? I'm sure someone will ask for it to be configurable per folder or some incredible granulatity like that, but I'm thinking that for most purposes having a per server option will be plenty...?
Just my 2p..
Cheers
Ed W