Emailing voicemail messages

hey everyone…

i have recently rolled out my asterisk system at my small office. i’d like to implement the feature of emailing users when a voicemail is recieved, but i’m having a hard time finding documentation on how to set this up. all i know so far is that you can indicate a users email address in ‘voicemail.conf’ and whether or not you want to attach the message as a soundfile. i know asterisk uses sendmail as a default application for sending mail. the problem is that i can’t figure out how to configure sendmail to send messages to my isp’s smtp server. does anyone have any good tips regarding voicemail emailing with asterisk or any good references on the subject?

thanks!

[quote=“tastygroove”]hey everyone…

i have recently rolled out my asterisk system at my small office. i’d like to implement the feature of emailing users when a voicemail is recieved, but i’m having a hard time finding documentation on how to set this up. all i know so far is that you can indicate a users email address in ‘voicemail.conf’ and whether or not you want to attach the message as a soundfile. i know asterisk uses sendmail as a default application for sending mail. the problem is that i can’t figure out how to configure sendmail to send messages to my isp’s smtp server. does anyone have any good tips regarding voicemail emailing with asterisk or any good references on the subject?

thanks![/quote]

Looks like that configuring this option (sneding voicemail to e-mail) is one of most complicating. There isn’t any good, step by step explanation how to do this. I alsoo didn’t configure this option, yet.

I just hope that there will be some nice persoon who will write some detail explanation how to do this. Because I sow that realy lots of people don’t know how to make it work.

If I ever setup voicemail to e-mail, I’ll post explenations here.

I would suggest looking at ssmtp. It’s an smtp client, and is much easier to set up than sendmail.

Once ssmtp is working (test it on the command line before trying to use it in asterisk), you can use it with asterisk voicemail by setting the following in your voicemail.conf.

mailcmd=/usr/sbin/ssmtp -t

I’m not an expert on ssmtp, but you should be able to find some help by googling on it. Here are the important settings you need to setup in the ssmt.conf file (at least these work with my mail host):

mailhub=your smtp server (e.g., something like smtp.mailserver.com) hostname=yourasteriskhost AuthUser=yoursmtpusername (i.e.., your mail account name) AuthPass=yoursmtppassword (i.e.., your mail account password)

HTH,
john

In my experience, if you set up a standard server based on a SuSE or RHEL distro (and many others) then this ‘just works’ if you add an email address to the users in /etc/asterisk/voicemail.conf. As all Asterisk expects is a working SMTP server to send out on, if there is not one on the server, then this is a Linux admin issue and little to do with Asterisk.

thanks greyhound,

i’ve installed ssmtp. i think i installed it properly, i just have to get it configured properly now. i thought i had it set up right, but when i leave a voicemail it doesn’t send an email.

here is my ssmtp.conf file in case you have any suggestions… not that i expect you to, this is really not the right place to look for help with ssmtp, but i’ll put it here anyway…

root=postmaster
mailhub=smtp-server.maine.rr.com
hostname=x-cafe.com

either way, it’ll be MUCH easier to configure this than sendmail. thanks again

Does your smtp host require authorization? That might be the problem.

One way to test this is to just use ssmtp at the command prompt. You can try something like this:

$ ssmtp you@yourmailhost.com subj: test This is a test [[ use two carriage returns to terminate the message and send it ]]

This should send an e-mail if ssmtp is configured properly. I can’t remember how helpful it is at pointing out what’s wrong if your configuration is broken, but it’s certainly a faster path to debugging than going through voicemail. IIRC, googling around will turn up some decent reference info on ssmtp.

Good luck.

well i’ve played with the ssmtp configuration, and got it working after not too long. i did some google searching and ended up having to configure the revaliases file as well as the ssmtp.conf file. strangely attachments work even though i don’t have attach=yes in my voicemail.conf file.

this was one of the features i was most excited about, i’m excited it works finally. thanks for the tip!

I am running the latest SuSE 10 release with Postfix installed. I am attempting to use ssmtp with Asterisk to send emails out via the localhost Postfix as an ‘open’ relay restricted to my IP addresses. I have followed the details here (as best I know):

metaconsultancy.com/whitepapers/smtp.htm#s3

by adding this to /etc/postfix/main.cf:


#added for local relaying
mynetworks = 127.0.0.0/8 {my_real_ip}/8
relay_domains = muppetmaster.com

smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, permit

And yet, when I try to use ssmtp from the command line I get:


waldorf:/etc/postfix # ssmtp john@doe.com
subj: Testing
Testing 123

ssmtp: RCPT TO:john@doe.com (554 john@doe.com: Relay access denied)

one last point, my /usr/local/etc/ssmtp/sstmp.conf has this line:

hostname=my_real_hostname.com

Any ideas on how to get this working?

Sorry MM. I used ssmtp to take postfix completely out of the picture, since i’ve always felt that was a steep hill to climb with little reward for me.

Using it as a simple smtp client to a remote smtp server (i.e., the one provided by my ISP), it works great. If you can go that route, I’m sure we can get it to work.

[quote=“greyhound”]Sorry MM. I used ssmtp to take postfix completely out of the picture, since i’ve always felt that was a steep hill to climb with little reward for me.

Using it as a simple smtp client to a remote smtp server (i.e., the one provided by my ISP), it works great. If you can go that route, I’m sure we can get it to work.[/quote]

In that scenario, how do you get SSL to work with your ISP provider (presuming your ISP provider requires this)? I can not see in the man pages for ssmtp how to get SSL working, even though I did a ./configure --enable-smtp before compiling.

Hmmm… I don’t think my ISP does require SSL. How can I check?

If you were able to do this without any changes/specifically addressing the point then your provder probably does not require it. For example, if you try to relay via smtp.gmail.com with your account you get:

[code]# /etc/ssmtp.conf – a config file for sSMTP sendmail.

The person who gets all mail for userids < 1000

Make this empty to disable rewriting.

root=postmaster

The place where the mail goes. The actual machine name is required

no MX records are consulted. Commonly mailhosts are named mail.domain.com

The example will fit if you are in domain.com and you mailhub is so named.

mailhub=mail

Where will the mail seem to come from?

#rewriteDomain=

The full hostname

hostname=smtp.gmail.com
waldorf:/usr/local/etc/ssmtp # ssmtp -au my_uname -ap my_pass john@doe.com

subj: test
testing 123

ssmtp: Server didn’t accept AUTH LOGIN (538 Encryption required for requested authentication mechanism)
waldorf:/usr/local/etc/ssmtp # [/code]

hi

I’m havinf a problem with my ssmtp configuration

I 'm using this

root=karlo@gmail.com mailhub=smtp.gmail.com rewriteDomain=gmail.com hostname=debian FromLineOverride="YES"

but it seems not working, I got this error

ssmpt: 530 5.7.0 Must issue a STARTTLS command first …

what could it be?

ssmtp can be configure from a private IP, like 192.168.1.56