asterisk – Send Voicemail to Email as Client SMTP Address in Asterisk

asteriskelastixemaillinux

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?

Best Answer

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

Related Topic