Sending received faxes thru an external email

Discussion in 'General' started by rfioravelastix, Mar 10, 2009.

  1. rfioravelastix

    Joined:
    Nov 27, 2007
    Messages:
    6
    Likes Received:
    0
    Hi everybody,

    I
     
  2. ramoncio

    Joined:
    May 12, 2010
    Messages:
    1,663
    Likes Received:
    0
    Code:
    #!/bin/bash
    relayhost=mail.myprovider.com
    username=myuser.myprovider.com
    password=mypassword
    echo "$relayhost   $username:$password" >> /etc/postfix/sasl_passwd
    chown root:root /etc/postfix/sasl_passwd
    chmod 600 /etc/postfix/sasl_passwd
    postmap /etc/postfix/sasl_passwd
    echo "relayhost = $relayhost" >> /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 
    service postfix restart
    
     
  3. rfioravelastix

    Joined:
    Nov 27, 2007
    Messages:
    6
    Likes Received:
    0
    Hi Ramoncio,

    I'm very impressed by your skills.
    Is this change able to relay the the voice messages also in the same way?

    Thank you very much
    Reinaldo
     
  4. ramoncio

    Joined:
    May 12, 2010
    Messages:
    1,663
    Likes Received:
    0
    Elastix uses postfix as MTA.
    You can configure postfix to send the emails by itself or to use a relay server.
    Usually, if you have a dynamic ip you will need a relay server because otherwise many smtp servers won't accept your emails (you might be a spammer).
    What the script does is configure postfix main.cf config file to use mail.myprovider.com as relay server.
    All your outgoing messages will be delivered by mail.myprovider.com.
    Obviously, you have to change

    relayhost=mail.myprovider.com
    username=myuser.myprovider.com
    password=mypassword

    before running the script to suit your server's details.
     

Share This Page