Sometimes we don’t get voicemail to email or update notifications from our asterisk pbx, in that case we can configure SMTP this way.
Modify your /etc/postfix/generic by adding these lines, replacing youremail@yourdomain.com with a real email account.
root youremail@yourdomain.com
root@localhost youremail@yourdomain.com
root@localhost.localdomain youremail@yourdomain.com
root@freepbx youremail@yourdomain.com
root@freepbx.localdomain youremail@yourdomain.com
asterisk youremail@yourdomain.com
asterisk@localhost youremail@yourdomain.com
asterisk@localhost.localdomain youremail@yourdomain.com
asterisk@freepbx youremail@yourdomain.com
asterisk@freepbx.localdomain youremail@yourdomain.com
vm@asterisk youremail@yourdomain.com
asterisk@ youremail@yourdomain.com
@freepbx.localdomain @yourdomain.com
Next Step is
Add the following to the end of /etc/postfix/main.cf
smtp_generic_maps = hash:/etc/postfix/generic
and
inet_protocols = ipv4
Reload postfix by running these commands:
postmap /etc/postfix/generic
service postfix restart
Additional Step for Office 365
v=spf1 ip4: **111.111.111.111** include:spf.protection.outlook.com ~all
<– be sure to replace 111.111.111.111 with your public ip address