![]() Given as -u parameter to dsync, not to ssh. If the location is on a remote server, dsync can ssh to it by giving host or as the parameter. If the location is on local filesystem, you can use a regular mail_location, such as maildir:/backup/user/Maildir This parameter defines the other mail location that is used. It's also possible to override it by giving -o ![]() Location2 The first mail location is based on configuration ( mail_location or userdb settings). u user Specifies that the userdb lookup for the given user should be done and used to set up the environment (uid, gid, home, etc.). Reverse backup direction, so mails in location2 are backed up to default mail location. Multiple settings to -o option may be specified multiple times. o setting = value Overrides the configuration setting from /etc/dovecot/nf and from the userdb with the given value. The default is to synchronize all respectively convert m mailbox Specifies the mailbox that should be synchronized or from which mails should be converted. highest-modseqs were equal), but with different changes. In fast sync mode dsync might skip syncing a mailbox, if both locations had Makes dsync run in "full sync" mode rather than "fast sync" mode. The default isĪctivates debug messages and makes dsync more verbose. These invalid mailbox names are fixed by replacing such invalid characters with the given alt_char. If source and destination mailbox formats are different, it's possible that on one side there exists a mailbox name that C alt_char Specifies anĪlternative mailbox name character. c config-file read configuration from the given config-file. If you want to dsync all users, you'll need to get a list of all users and executeĭsync recognizes the following command line options: It doesn't require any Dovecot server processes to be running, except when using -u parameter to do a userdbĭsync can currently sync only one user at a time. When executing a remote dsync program it works the same way: it usesĭsync can be run completely standalone. To another configuration file, or using -o parameter to override specific settings. The entire configuration can be changed by giving -c parameter See the dsync design document for more information.ĭsync uses the same configuration files as the rest of Dovecot (via doveconf binary). ![]() Merging, these are resolved in a safe way. ![]() It's of course possible to have conflicts during This is possible because dsync can access Dovecot's index logs that keep track of changes. Syncing means that it's safe to do any kind of modifications in both sides, and dsync will merge the changes without losing any changes done on either The syncing is done as perfectly as possible: an IMAP or a POP3 client shouldn't be able to notice any differences between the two mailboxes. Servers (via ssh(1)), creating backups of mails to a remote server, and convert mailboxes from/to different mailbox formats. It can be used for several different use cases: Two-way synchronization of mailboxes in different In some cases, async logic requires the return value from an asynchronous function.Dsync is Dovecot's mailbox synchronization utility. Like non-asynchronous functions that can throw, try can be used for asynchronous functions in combination with await to call the asynchronous function and throw if an error occurs: try await attachImageToData( If multiple async functions are called using await, Swift will wait for completion of each function before moving onto the next function: // Await completion of uploadData The await keyword is used to tell Swift to wait for completion of an asynchronous function: // Await completion of saveChanges Using async allows the uploadImage and uploadData functions to utilize the expected return type definition -> URLResponse, matching the syntax of other non-asynchronous functions: func uploadImage(image: UIImage) These other types were often logically the return type of asynchronous logic: func uploadImage(Ĭompletion: ((URLResponse?, Error?) -> Void)? In previous versions of Swift, some completion blocks contained other types in addition to a potential error. Using async allows the attachImageToData function to utilize throws, matching the syntax other non-asynchronous functions use for errors: func attachImageToData( In previous versions of Swift, some completion blocks returned errors indicating the asynchronous logic in a function could potentially result in an error: func attachImageToData( In other code, the async saveChanges function Using the new async keyword, Swift can mark a function as having asynchronous logic: // Swift automatically handles asynchronous In other code, the saveChanges function would saveChanges completes its asynchronous logicįunc saveChanges(completion: (() -> Void)?) In previous versions of Swift, asynchronous programming was often implemented through the use of completion blocks: // The completion block will be called when
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |