Index: apps/app_voicemail.c =================================================================== --- apps/app_voicemail.c (revision 309354) +++ apps/app_voicemail.c (working copy) @@ -5895,6 +5901,10 @@ } else { #ifndef IMAP_STORAGE msgnum = last_message_index(vmu, dir) + 1; + while (message_exists((char *)dir, msgnum)){ + ast_log(LOG_NOTICE, "ALEC Corrupt backend, incrementing msgnum=%d\n", msgnum); + msgnum+=1; + } #endif make_file(fn, sizeof(fn), dir, msgnum);