while (doveadm_mail_iter_next(iter, &mail)) {
if (ctx->by_msgid) {
if (mail_get_first_header(mail, "Message-ID", &key) < 0) {
- errstr = mailbox_get_last_internal_error(mail->box, &error);
+ errstr = mail_get_last_internal_error(mail, &error);
if (error == MAIL_ERROR_NOTFOUND)
continue;
e_error(ctx->ctx.cctx->event,
}
} else {
if (mail_get_special(mail, MAIL_FETCH_GUID, &key) < 0) {
- errstr = mailbox_get_last_internal_error(mail->box, &error);
+ errstr = mail_get_last_internal_error(mail, &error);
if (error == MAIL_ERROR_NOTFOUND)
continue;
e_error(ctx->ctx.cctx->event,
field->name, mailbox_get_vname(mail->box),
mail->uid,
ctx->print_error != NULL ? ctx->print_error :
- mailbox_get_last_internal_error(mail->box, NULL));
+ mail_get_last_internal_error(mail, NULL));
doveadm_mail_failed_mailbox(&ctx->ctx, mail->box);
ctx->print_error = NULL;
ret = -1;
e_error(event,
"Mailbox %s: Precache for UID=%u failed: %s",
mailbox_get_vname(box), mail->uid,
- mailbox_get_last_internal_error(box, NULL));
+ mail_get_last_internal_error(mail, NULL));
ret = -1;
break;
}
/* NOTE: Errors are logged, but they don't cause the entire import
to fail. */
if (dsync_mail_fill(mail, TRUE, dmail_r, &error_field) < 0) {
- errstr = mailbox_get_last_internal_error(mail->box, &error);
+ errstr = mail_get_last_internal_error(mail, &error);
if (error == MAIL_ERROR_EXPUNGED)
return 0;
if (mail_precache(mail) < 0) {
e_error(index_event, "Precache for UID=%u failed: %s%s",
mail->uid,
- mailbox_get_last_internal_error(box, NULL),
+ mail_get_last_internal_error(mail, NULL),
get_attempt_error(counter, first_uid, last_uid));
ret = -1;
break;
if (mail->expunged)
return 0;
mail_set_critical(mail, "Failed to read stream: %s",
- mailbox_get_last_internal_error(mail->box, NULL));
+ mail_get_last_internal_error(mail, NULL));
return -1;
}
int ret;
if (mail_get_hdr_stream(mail, NULL, &input) < 0) {
- errstr = mailbox_get_last_internal_error(mail->box, &error);
+ errstr = mail_get_last_internal_error(mail, &error);
e_error(event,
"pop3_migration: Failed to get header for msg %u: %s",
mail->seq, errstr);
(and/or RETR) and we'll parse the header ourself from it. This
should work around any similar bugs in all IMAP/POP3 servers. */
if (mail_get_stream_because(mail, NULL, NULL, "pop3-migration", &input) < 0) {
- errstr = mailbox_get_last_internal_error(mail->box, &error);
+ errstr = mail_get_last_internal_error(mail, &error);
e_error(event,
"pop3_migration: Failed to get body for msg %u: %s",
mail->seq, errstr);
if (quota_get_mail_size(ctx, mail, &size) < 0) {
enum mail_error err;
- error = mailbox_get_last_internal_error(mail->box, &err);
+ error = mail_get_last_internal_error(mail, &err);
if (err == MAIL_ERROR_EXPUNGED) {
/* mail being copied was already expunged. it'll fail,