voicemail - email delivery

Discussion in 'General' started by Telco, Oct 15, 2009.

  1. Telco

    Joined:
    Oct 4, 2007
    Messages:
    275
    Likes Received:
    0
    I can't get the voicemail to email to work. It worked fine until I upgraded to 1.5.2 then it all stopped. I don't know where to look to see what is happening. I even tried installing a fresh install on a different server, added 1 ext, left a voicemail and I never got it either.

    ???????

    Any help would be appreciated.

    P.S. If I log into roundcube and send an email, it says it has been sent but I don't get that one either.

    Chris
     
  2. torboy

    Joined:
    Apr 30, 2009
    Messages:
    37
    Likes Received:
    0
    You can send email from you elastix server only if your ISP allows you to send email without authentication. If your ISP allows you to do that then you should be able to send your voice mail to email without any additional change. Ofcourse you have to add the email address to extenion.

    If your ISP is not allowing you to send email without authentication then use this script to send your email via gmail. you need to make a new or use your old gmail account to send the files via gmail.

    If found this script on this form. Not sure who wrote it.

    you need to copy the following codes in a file.sh and then copy it to your server and run it.

    Code:
    tmp=/tmp/autoconfig
    
    cd /tmp
    
    yum install dialog -y
    
    
    
    #########################################################################
    #### Configuracion de Cuenta de gmail para enviar mails de Asterisk######
    #########################################################################
    
    gmail="Auto Configuration for e-mails for Elastix using Gmail Account"
    # creacion del archivo /etc/postfix/main.cf
    
    mv /etc/postfix/main.cf /etc/postfix/main.cf.backup
    rm /etc/postfix/generic* -f
    rm /etc/postfix/sasl_passwd* -f
    rm /etc/postfix/certs/* -f
    
    echo "# SMTP relayhost" > /etc/postfix/main.cf
    echo "relayhost = [smtp.gmail.com]:587" >> /etc/postfix/main.cf
    echo "" >> /etc/postfix/main.cf
    echo "## TLS Settings" >> /etc/postfix/main.cf
    echo "smtp_tls_loglevel = 1" >> /etc/postfix/main.cf
    echo "smtp_tls_CAfile = /etc/postfix/certs/CAcert.pem" >> /etc/postfix/main.cf
    echo "smtp_tls_cert_file = /etc/postfix/certs/mycert.pem" >> /etc/postfix/main.cf
    echo "smtp_tls_key_file = /etc/postfix/certs/mykey.pem" >> /etc/postfix/main.cf
    echo "smtp_use_tls = yes" >> /etc/postfix/main.cf
    echo "smtpd_tls_CAfile = /etc/postfix/certs/CAcert.pem" >> /etc/postfix/main.cf
    echo "smtpd_tls_cert_file = /etc/postfix/certs/mycert.pem" >> /etc/postfix/main.cf
    echo "smtpd_tls_key_file = /etc/postfix/certs/mykey.pem" >> /etc/postfix/main.cf
    echo "smtpd_tls_received_header = yes" >> /etc/postfix/main.cf
    echo "smtpd_use_tls = yes" >> /etc/postfix/main.cf
    echo "" >> /etc/postfix/main.cf
    echo "# configuracion tls" >> /etc/postfix/main.cf
    echo "smtp_use_tls = yes" >> /etc/postfix/main.cf
    echo "smtp_sasl_auth_enable = yes" >> /etc/postfix/main.cf
    echo "smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd" >> /etc/postfix/main.cf
    echo "smtp_sasl_security_options = noanonymous" >> /etc/postfix/main.cf
    echo "smtp_sasl_tls_security_options = noanonymous" >> /etc/postfix/main.cf
    echo "" >> /etc/postfix/main.cf
    echo "# alias de mapeo interno a externo" >> /etc/postfix/main.cf
    echo "smtp_generic_maps = hash:/etc/postfix/generic" >> /etc/postfix/main.cf
    
    dialog --backtitle '$gmail'  --inputbox "Please, insert the username of your account (without @gmail.com)" 0 0 "your_username_here" 2>temp
    
    usuario=`cat temp`
    
    dialog --backtitle '$gmail'  --inputbox "Put your account password" 0 0 "your_password" 2>temp
    
    pass=`cat temp`
    
    echo "[smtp.gmail.com]:587 $usuario@gmail.com:$pass" > /etc/postfix/sasl_passwd
    
    echo "root@$name $usuario@gmail.com" > /etc/postfix/generic
    
    chmod 600 /etc/postfix/sasl_passwd
    chmod 600 /etc/postfix/generic
    
    /usr/sbin/postmap /etc/postfix/sasl_passwd
    /usr/sbin/postmap /etc/postfix/generic
    
    dialog --backtitle "$gmail" --msgbox "This part of the script is not working automatic. Please hit enter every time, at least 6 times. If you find a way to make it automatic please let me know - emilianovazquez@gmail.com" 0 0
    
    mkdir /etc/postfix/certs
    cd /etc/postfix/certs
    /usr/bin/openssl dsaparam 1024 -out dsa1024.pem
    /usr/bin/openssl req -x509 -nodes -days 3650 -newkey dsa:dsa1024.pem -out mycert.pem -keyout mykey.pem 
    ln -s mycert.pem CAcert.pem 
    /usr/bin/openssl req -x509 -new -days 3650 -key /etc/postfix/certs/mykey.pem -out /etc/postfix/certs/mycert.pem 
    rm dsa1024.pem
    Service postfix restart
    
    dialog --backtitle "Config Done!" --msgbox "All configuration are finish!, Thanks for use this Script!!" 0 0
     
  3. ramoncio

    Joined:
    May 12, 2010
    Messages:
    1,663
    Likes Received:
    0
    Telco, the problem is that if you don't have a fixed ip and reverse DNS properly configured you can't use end-to-end delivery, you need to use a relayhost.
    Look at this post:

    http://www.elastix.org/index.php?option ... 8103#38103

    You can see what's going on with your emails in the /var/log/maillog file.

    torboy, that script is part of the autoconfig.sh script by gamba47, from the Spanish forums. Mine is very similar.
     
  4. Telco

    Joined:
    Oct 4, 2007
    Messages:
    275
    Likes Received:
    0
    Thanks Ramoncio, I do have a static IP and dns is configured right. I don't understand what has changed. What relayhost I never set one up before. It just always worked. Did something change in 1.5.2? If I do have to set one up now where do I do that?
     
  5. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    that was REVERSE DNS, which a commonly mis-setup service, you call a mail server, she asks who you are, then checks backwards, no reverse to the same host, no workee in many cases.
     
  6. Telco

    Joined:
    Oct 4, 2007
    Messages:
    275
    Likes Received:
    0
    ok so where do I set that up? As I have said before I have never had to set this up since 0.8 which was my first install. I am totally confused now.
     
  7. Telco

    Joined:
    Oct 4, 2007
    Messages:
    275
    Likes Received:
    0
    OK GOT IT! Thanks for all your help. I looked in the main.cf file and found that the domain in there was an old domain that is no more. I changed it to my current email server domain and it is working now.:) :) :) :)
     
  8. digitalthread

    Joined:
    Nov 21, 2009
    Messages:
    5
    Likes Received:
    0
    Hi,

    That script really saved me, I was working on this since morning to configure my google apps account to send email.
    Its finally setup but now when I try to send email to gmail or hotmail both servers mark mails orignated from my domain as spam.

    Your kind help would b highly appreciated.

    Thanks in advance.
     

Share This Page