Here we have a few extra functions and classes in libcamel-provider which don't really fit anywhere else.
This is a set of functions used to generate differences between lists of UIDs and store them persistently.
Basically its sole purpose is to implement a keep-on-server faciality for POP downloads. You start out with a set of UIDs, and given a new set of UIDs, it will calculate which ones no longer exist (permanently removed), which ones are the same (nothing required) and which ones are new (to be downloaded).
It is used by Evolution mail and Evolution/Camel.FilterDriver to keep track of what was downloaded successfully.
See the api docs for more information.
camel_movemail is a single function which will safely move a sendmail spool file to a local location, appending all of the messages to the new file.
The spool file is locked using camel-lock-helper, and then the messages copied. Once the messages have fully been successfully copied, the spool file is zeroed out and unlocked.
It has a compile-time option for properly handling SunOS's broken Berkeley Mailbox format, it will honour Content-Length headers, and automatically munge "From " lines when copying the messages to the target location.
Given that you may have a SunOS spool being accessed from a non-SunOS machine, the SunOS version should be a run-time option.
"dot" locking is used, which should be safe and portable.