Change From Address on email from Asterisk Server

Hello Experts,

We are using asterisk server for IVRs only, once IVR is updated successfully Asterisk is sending confirmation email from root@localhost address, for some reason we I need that email to go out of our network and since the domain in the From address is not global emails are not being received to recipients, how to change From field in the Email from asterisk server?

Regards,
Ronak

It is not Voice mail to Email

This is best addressed in your mail transport agent (sendmail, etc.) Asterisk will send with the default address.

1 Like

Thank you David,
can you give me more detail, I don’t see any sendmail file under /etc, however there are lots of file name sendmail but its all garbage in there.

If you’re using sendmail, you can modify the /etc/aliases file to send root emails to another address…

#
# Mail aliases for sendmail
#
# You must run newaliases(1) after making changes to this file.
#

# Required aliases
postmaster:    root
MAILER-DAEMON:    postmaster

# Common aliases
abuse:        postmaster
spam:        postmaster

# Other aliases
root:        your_email@your_host.xxx

thank you it seems like changing the To address, I want to change the From address, since default From address has local domain which does not allow me to send email to outside of our network since it needs FQDN in from address.

seems that current From is default address, it says root@host.local

Regards

That would be defined by the sending application. If this is for voicemail, it’s in the general section of voicemail.conf. Otherwise, you’ll need to configure the “from” in the program that sends the email.

serveremail = from_email@from_host.org
fromstring = Company Name
emailsubject = You have a New Voicemail from ${VM_CALLERID} in mailbox ${VM_MAILBOX}
emailbody = Dear ${VM_NAME}:\n\n\tJust wanted to let you know you were just left a ${VM_DUR} long message\nin mailbox ${VM_MAILBOX} from ${VM_CALLERID}, on ${VM_DATE} so you might\nwant to check it when you get a chance.  Thanks!

Thank you Sir for help, by the way it has been resolved, we don’t find any config file for the Email template and we end up updating the hostname to FQDN so it can route globally.