movemail: various improvements.
New configuration options allow to specify the maximum number of messages to be copied and control the actions of movemail when an error occurs while appending a message. * movemail/movemail.c (ONERROR_OPTION,MAX_MESSAGES_OPTION): New option codes. (options): New options --onerror and --max-messages. (max_messages_option, onerror_flags): New variable. (ONERROR_SKIP, ONERROR_DELETE, ONERROR_COUNT): New defines. (parse_opt): Handle ONERROR_OPTION. (cb_onerror): New callback. (movemail_cfg_param): New configuration statements: "max-messages" and "onerror". (move_message): Delete the message if ONERROR_DELETE is set. (main): Handle the limit on the number of processed messages and onerror flags. Use mu_mailbox_expunge instead of mu_mailbox_flush. This preserves the attributes of not processed options (in case max_messages_option is not 0) and speeds up the things considerably, especially on huge mailboxes.
Showing
1 changed file
with
139 additions
and
25 deletions
-
Please register or sign in to post a comment