Hows does FreePBX/Asterisk work with external IMAP server?


I’ve seen the option for using external IMAP storage with FreePBX and Asterisk but I’m not clear on how this is meant to work. I presume it allows the use of an external IMAP server (even MS Exchange?) to store voicemails.

Reading/deleting the voicemail message via the mail client will read/delete the voicemail from Asterisk/FreePBX and turn off the MWI on the extension/set. Likewise reading or deleting voicemail via the telephony interface will cause it to be marked as read and/or deleted from the IMAP server.

I have the following questions:

  1. How does Asterisk send the voicemail wav file to the external mail server’s mailbox Is this via SMTP?

  2. Does the voicemail still get stored on the local Asterisk machine as well?

I’m hoping someone with a bigger brain out there can explain this to me


I have never used the IMAP voicemail function, but I believe asterisk just acts like an IMAP client to store/access the voicemail as an IMAP folder on the remote server.

I do not believe asterisk keeps a local copy of the voicemail.

What I wonder about using this feature is what happens if the IMAP server is:

  • down or temporarily unreachable OR
  • user’s quota on the mail server is full

Is the voicemail silently dropped, saved locally, or some sort of voice notification played to the person attempting to leave the message?

I didn’t think you could use IMAP to store mail/voicemail into a mailbox on a remote system. I thought IMAP was only used to access mail in a mailbox - you need another mechanism to get the message into the mailbox in the first place ie SMTP.

I could understand it better if the IMAP server and Asterisk were on the same machine and asterisk and the IMAP server shared a common mail store.

Pretty cool as long as it is tried & true (solid & reliable).


Quick overview & basic howto:

How-to from FreePBX:

Issues/bugs open & resolved:

Google results relating to it (only 39 results in the past year & 289 total seems kinda low in my opinion):"imap+vm"+OR+"imap+voicemail",or.r_gc.r_pw.&fp=ff3e2739446bc197

Just FYI, the above google search filters to only show results from,, & I figured that should be enough to cover the vast majority of related articles. I guess you could add if you wanted. But I didn’t.