Voicemail to email

Hi folks

I am a bit in the dark about this - so please bear with me and I’ll try to explain my dilemma.

We have our Asterisk server on one machine and we also run our own email server ( ATMAIL ) on another machine - all on our network.
We were getting our phone messages left in our voicemail boxes sent to our Email Inboxes with no problem - UNTIL that email server crashed. We had to stand up a new email server and now we stopped getting those messages.
The original email server is very different that the new one - the NEW Server has a different IP address and Name - a whole new setup !!

My question is - where do I tell our VoIP server where the email servers is?? - I’ve looked in the the asterisk configs. found nothing. I also googled it and saw that sendmail on the Voip was the place to look - but I see nothing in sendmail configs. I inherited this whole mess and the original “designer” is not around.

I need to tell the Voip Server who the new email server is - if this is true - where do it do that??

I hope I have given enough info

Thank you

Can you post the following :

The output of: dig <yourdomain.name> MX

A portion of you /var/log/maillog that show the sendmail dialog.

Your /etc/mail/sendmail.mc

Dalenoll - the output of that file correctly identifies us and the DNS servers.
;xxx.net. IN MX

xxx.net. 3600 IN MX 100 xxx-xx-45.xxx.net.

I replaced the actual name with X’s - just didn’t feel it a good idea to display that info.

I do not see any files in sendmail directories on the VoIP server - there are no logfiles regarding mail at all. I don’t see any config files at all in any sendmail or mail directories. All I see is an “alias” file and a “Spamassassin” directory inside the “mail” directory /etc/mail.

Sorry if I am a bit cryptic - I was hoping that someone would say - it’s in the xxxxx file - that I am just not seeing.


Is the information in the Answer section of the Dig output the correct information for your new mail server or is it the old server?

Secondly, since you cannot find any sendmail information, let’s take a step back and ask this question. Which distro and version of Linux are you running on the VoIP server?
What is the output of cat /etc/issue
What is the output of uname -a

You could also try sending a message from the Linux command line…
echo testing | mail -s’testing’ your.email@domain.tld

Does the message get delivered?

The log files are in /var/log.

OK - I have some data …

We are running Asterisk 1.4.4 on gentoo

the output of cat /etc/issue is … This is \n.\O (\s \m \r) \t

the Linux version is Gentoo 2.6.17-gentoo-r8 #7 Thu Mar 29 07:58:20 EDT 2007 i686 Intel® Xeon™ CPU 2.80GHz GNU/Linux ( yea I know - old !!! ) We can’t really do any upgrades at the moment - I have to work with what we got.

and here’s the output of a command line test … send-mail: Cannot open xxxx.xxx-01.xxx.net:25
Can’t send mail: sendmail process failed with error code 1

and in the /var/log/messages output there are numerous messages …Unable to connect to xxx.xxx.xxx.net:25 ( The OLD SERVER name !!!

I am sorry but I cannot display our server’s names - but I can tell you that the output of the dig shows the correct server name our new email system is on BUT the test send shows the OLD server name !!! seems to me like it is trying to send mail via the old server still and that’s my issue - where on this machine is that set? I am guessing that if I can find that and change it to our new server name - all will be ok.

That helps.

It appears that the server has sendmail configured with a ‘smart host’ which it forwards all mail to.

I am not familiar with Gentoo, so I have to be somewhat generic here.

Sendmail it self uses a file called sendmail.cf for it’s configuration. This file is often generated from a file called sendmail.mc.

You need to locate these files.

If sendmail.mc exists…
Edit it and find a line that contains the text ‘SMART_HOST’. You should find that it refers to the old host name.
Change it to the correct host name and save the file.
Now you need to regenerate the sendmail.cf file which typically lives in /etc or /etc/mail. Assuming it is in /etc, the following command should work
m4 pathtosendmail.mc > /etc/sendmail.cf
restart the sendmail process

If sendmail.mc does not exist and only sendmail.cf is found…
edit sendmail.cf
find the line that starts with DS
You should find that after the DS is the old host name. replace it with the new host name and save the file
restart sendmail.

Beware that you can simply change the sendmail.cf even if you have a sendmail.mc, but if someone or some process comes along an rebuilds from the .mc file, any changes to sendmail.cf would be lost so it is better to change it at the source.

I hope this helps

Ok - this is getting me a bit frustrated.

All your suggestions are excellent and I do understand the process but my VoIP server does not have sendmail.cf or sendmail.mc files anywhere - not in /etc/or /etc/mail !! However - I did run locate and saw that there is a sendmail in /usr/lib and one in /usr/sbin - nano shows nothing but garbled text.

I have a Voip in another office across the country set up with same OS on the same type hardware and the same version of asterisk - that server DOES have those files - and the old server was shown in the configs !!

I ran the command and all that produced was an empty sendmail.cf file in /etc/mail dir.

So - given this - can this be rescued or do I need to start over ?

The garbled text is the actual sendmail program executable file.

Also, sendmail is both the name of a particular program and the de facto well known name of something to send mail on a Unix system, so all mail transport agents tend to use the same name.

If you are not using UCB sendmail, you need to find out what you are using.

I guess I am just so used to using sendmail, I tend to focus there instead of alternatives.

My next guess would be that you are running postfix.
Do you have a /etc/main.cf?

As david55 said, sendmail is the defacto name and many distros will install an alternate system and create a file named sendmail which actually calls the other system. If you do not have /etc/main.cf, then a little more research is needed. You may have to learn a little more about emerge/portage (package management on gentoo). You could post the output of a ps -ef and perhaps something will stick out. But until we can identify the MTA… well you know.

Hi guys - well - after all your input and me trying this and that etc etc - I found a config that housed the “wrong” server - It seems that function is handled by /etc/ssmtp/ssmtp.conf !! That’s where I can make that change to point to new server. So I will "play’ with that and run some messages :>)

Thank you all !!!

Spoke too soon !! - I succesfully changed to the new svr - I sent a test message to myself - In /var/log/messages I see this now …RCPT TO:myname@companyinc.com (550 Sender verify failed).

Could this error come from my new server rejecting the mail? or my VoIP server. ??

I think that now we are, at least, on the right track.

I am glad to hear that you found the config file and were able to make the change.

a 550 error is indeed coming from the mail server. It is complaining that it could not verify that the sending system was really who it says it is. There could be many causes to this and some depend on what software the mail server is running.

A couple of things to check:

On the VoIP server:
Is the VoIP server setup with a fully qualified domain (ie voip.yourdomain.net)?
Is the VoIP server setup in DNS so the mail server can do forward and reverse address lookup?
Does the VoOP server have an MX record?

On the Mail server:
Verify sender appears to be turned on, can it be turned off for specific hosts/ip addreses.
Perhaps allowing the VoIP server to ‘relay’ could solve the problem.
Perhaps turning SMTP AUTH on could solve the problem. I believe that you can setup SMTP AUTH information in the /ssmtp.conf file on the VoIP box.

I hope that helps

Thank you and It helps a great deal !! - The new server is ATMAIL - I don’t yet have full access to it as we are in the middle of recovering from the crash. All I have is the web admin interface to it so far.

My Voip is now set up the way it was when everything was working ok - so I have to figure it is now time to attend to new server configs.

New Wrinkle to this …

We totally re-worked our phone system/email…

We now have Asterisk 1.6 running on Ubuntu Server and we are now using a Corporate Email Account on GMAIL !!

I installed SSMTP on my server which deleted the postfix etc … I now could use some help with the SSMTP config file

I set up my Voicemail file to use mailcmd=ssmtp - t and changed all the users email address to their gmail accounts

I am a bit confused with the /etc/ssmtp/ssmtp.cong file - Could someone tell me how to configure that file? This is what I got so far but I googled some sample configs which help but I’m not sure what my entries should be…

This is what I have …

Config file for sSMTP sendmail

The person who gets all mail for userids < 1000

Make this empty to disable rewriting.

root=XXXXXXX ( our gmail admin user name )

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

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


Where will the mail seem to come from?


The full hostname


AuthUser=??? ( don’t know what to put here )

Are users allowed to set their own From: address?

YES - Allow the user to specify their own From: address

NO - Use the system generated From: address


That’s it ! Do I need to add any more lines - if so - what do I need? I suspect I need an STARTTLS and/or an SSL line

Could someone fill in the blanks ?/ Please

You can use google and search for commons configs to use sendmail and google apps or postfix and google apps. There are many examples in the web I use postfix with my google apps account.

I did Google this - I found that using SSMTP was a lot easier than Postfix setups etc. The configs I posted here are from Google. I see config samples but no explanations - which is becoming typical in forums - the advise is to google it - yes well we did. The reason I am posting this is because I am new to asterisk and trying to get something done - I thought I could get some insight here.

My question was and is - what do I need to enter for the Auth lines - - my account credentials as the admin - the actual admin account we have to admin the users on Google’s corporate gmail?

Even if someone could point me to a more complete / sample config file - that would help - I can’t find one.

I am trying to set up a voicemail to go to my user’s corporate gmail accounts - we had this working when we had our own mail server here - but I can’t seem to get any answers on getting this done with our new Asterisk 1.6 server in my office to work with Gmail.

I did see postfix was a bit complicated from what my minimum experience is telling me and SSMTP seems to be the better way ( it’s what we used before on OUR MAIL server ) but I need to know what works config wise.

Yes thats a common error, people thinks that forum are for teach for free, and no forums are for help based on topics.

Well i just do a google search and the first link send the to the man page of ssmtp checkit and then this articule:

This forum is for asterisk, other software question must be asked in their software maillist, forum or IRC.

Thank you for the help - the link does give an explanation of some of the config lines. So thank you there.

I have to say though, that we come to forums to learn something we cannot find OR we find it but just don’t fully understand what we read, SO - we come to forums in the hopes that someone will TEACH by explaining something.

I contribute to other forums and I am happy that I could TEACH someone who asked a question they need help with.

Maybe I am wrong, but I feel it’s part of the LEARNING process - we ask a question and get an answer.

Just my take on things being an older person who likes helping people.

Thank you all.