Index: app_voicemail.c =================================================================== --- app_voicemail.c (revision 431735) +++ app_voicemail.c (working copy) @@ -2280,6 +2280,15 @@ goto exit; } + /* Ensure we have the correct mailbox open, in case a greeting changed mailbox + */ + init_mailstream(vms, 0); + if (!vms->mailstream) { + ast_log(AST_LOG_ERROR, "IMAP mailstream for %s is NULL\n", vmu->mailbox); + res = -1; + goto exit; + } + make_file(vms->fn, sizeof(vms->fn), dir, msgnum); snprintf(vms->introfn, sizeof(vms->introfn), "%sintro", vms->fn);