[HELP] Asterisk@Home and sendmail

Hello,

I can’t for the life of me get Asterisk to notify me of a new voicemail via email. This is my first experience with Linux.

  • I installed Asterisk@Home 1.3, which is based on the CentOS
  • I can see sendmail starting “OK” when I boot the server
  • My Asterisk@Home debug log says that the email was sent

I don’t end up receiving the email. My Asterisk server is not the email server that I use, so it should be sending the email over the internet. I have assigned a static IP to the box, Apache is running, and I can administer my settings using the web AMP.

I’d really appreciate any help you all can offer. I’ve read through just about every post on this board, and you definitely seem to know your stuff!

Thanks in advance,

John

I had the same problem…assuming that sendmail is functional (which if you’re using asterisk@home i doubt it wouldn’t be), the problem is most likely that the email server to which you are sending the voicemail notifications is rejecting the messages because they are not fully qualified domain names - asterisk@home by default calls itself asterisk1.local (a zeroconf name) which, over the internet, will not resolve anywhere, and as a result the server rejects the message as coming from an insecure source - and thus a source of viruses or spam or something. So, the fix is simple, as root, modify /etc/hosts and insert a qualified name that points to the public ip of the asterisk box and reboot.

Here’s the relevant entry from my /etc/hosts file:

127.0.0.1 pbx.deleted.com asterisk1.local asterisk1 localhost

Eric -

Thanks for the info. My asterisk server is behind a firewall, and my email server is not on my network (it’s a web host). Any thoughts?

And I know this further complicates things and should probably be posted to another forum, but I’m not sure how to edit “/etc/hosts”. Any pointers would be great.

Thanks again

I had a similar problem. After many hours of frustration I found two issues.

One was that I had not configured my HOSTS file. It was set to localhost and it needs to be set to some domain name. This is not a sendmail issue as far as I know but a search on how to configure sendmail should describe what needs to be done.

The other issue was that my email account was rejecting the emails from the asterisk server because it was a dynamic IP that did not verify to a DNS. A lot of ISP email accounts do that to reduce untraceable SPAM.

My setup is the same as your’s JohnM. In order to edit your /etc/hosts file you need to be logged in as root - you also need to be somewhat comfortable with vi - which is the only editor AAH comes with (blech, I prefer emacs) I’d find a reference for it online. Your hosts file looks like this -

127.0.0.1 asterisk1.local asterisk1 localhost

You need to make it look like this:

127.0.0.1 pbx.yourhost.com asterisk1.local asterisk1 localhost

In my case, the domain i entered (pbx.yourhost.com) is a CNAME record for a dyndns name (dyndns.org for more info) so that when the receiving mail server gets the fully qualified domain and looks up the ip, the information matches. Depending on your mail servers settings, you may also need to create an MX record that’s a CNAME to the same dyndns name.

This should be all that’s required.

*@home also comes with nano, a pico like editor. Much easier for newbies.
d

You could also use yum install appname to get any text editor you desire. Well not any, but more than are currently installed.