I'm able to setup Elastix (Asterisk) to send email voicemail attachments without any issue. But I'm trying to email them to a particular external address and it seems to be rejecting the emails as they are coming from root@.com

I have an SMTP address I can validate through (voicemail@.com) but I cannot seem to find a way to make Elastix send emails as a client.

Is there a way to do this?


You can force your mail server to rewrite the sender address. On postfix, this can be done this way:

  1. Add your domain as mydomain on postfix main.cf and enable generic maps in postfix main.cf:

postconf -e 'mydomain = example.com'

postconf -e 'smtp_generic_maps = hash:/etc/postfix/generic'

  1. Put the rewrite rule in /etc/postfix/generic:

    root@example.com voicemail@example.com

  2. Run postmap: postmap /etc/postfix/generic

  3. Reload postfix: postfix reload

  • Thanks, this helped change the from address, but it seems to remote mail server is still rejecting or blocking these emails. I was really hoping there would be a way to authenticate as a client and then send the messages that way. – Chris Jan 2 '15 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.