Asterisk Voicemail as email using sendmail


This is a working example of a Voicemail as email for Asterisk .


• OS: Centos 5.5 Final
• Asterisk
• DAHDI Version:
• Asterisk-GUI 2.0
• sendmail


Install asterisk and all required libraries.Install sendmail.
If sendmail is not installed already do the following.

  1. yum install sendmail
  2. yum install sendmail-cf

Using sendmail as a client with AUTH

(This section is from Sendmail.)

If you are using sendmail only to transfer e-mail from your local computer to a mail server that requires SMTP AUTH, follow these instructions. They assume that sendmail 8.12 or later, and other software, is already installed on your computer. You should probably be logged in as root to perform these steps.

1. Change directory to where your sendmail configuration files ( and are located, usually /etc/mail/.
2. Create a safe subdirectory (suggested name auth/):
  1. mkdir auth
  2. chmod 700 auth

3. Create a file with your authentication information (suggested name auth/client-info): "" "" "P:password"
filling in your ISP's mail server, your user name, and your password.

4. Generate the authentication database and make both files readable only by root:
  1. cd auth
  2. makemap hash client-info < client-info
  3. chmod 600 client-info*
  4. cd ..

5. Add the following lines to your file, filling in your ISP's mail server:
Search for SMART_HOST put following line just below that.(Dont forget to change to your domain name).
FEATURE(`authinfo',`hash /etc/mail/auth/client-info')dnl

6. Generate
  1. m4 >

7. Restart the sendmail daemon, e.g., (this depends on your OS):
  1. /etc/init.d/sendmail restart

Configuration files


; Formats for writing Voicemail. Note that when using IMAP storage for
; voicemail, only the first format specified will be used.
format = wav49|gsm|wav
serveremail =
attach = yes
fromstring=The Asterisk PBX
sendvoicemail = yes ; Allow the user to compose and send a voicemail while inside
emailonly = no
emailsubject = You have a New Voicemail from ${VM_CALLERID}
emailbody = Dear ${VM_NAME} ,\n \t\t\t You have received a new voicemail from ${VM_CALLERID} \non ${VM_DATE}. \n Find attached.\n\n----\nAsterisk PBX
maxgreet =
operator = no
maxmsg = 25
maxmessage = 300
minmessage = 0
saycid = no
sayduration = no
envelope = no
review = no

Thats it !
Leave a voicemail on your extension and check if it arrives at your mail box.


Shyju Kanaprath(shyju at epillars dot com)

Other Voicemail To Email Guides:
Created by: shyju, Last modification: Fri 09 of Jan, 2015 (17:08 UTC) by jdmphone
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+