Problems Configuring FreePBX for using external SMTP Server


(Eric B) #1

Does anyone know how to change the default FROM address when attempting to use an external SMTP server? Right now it is asterisk@phonesystem.xxxx.org. I want it to be just phonesystem@xxxx.org. I’ve tried making changes with Postfix, but I may be doing it in the wrong config file. I have an SMTP server set up on a Windows machine to relay. We are using FreePBX 15.0.16.81.

Log of last attempted email:
Dec 13 10:01:25 phonesystem postfix/pickup[21592]: 91B022937: uid=995 from=<asterisk>
Dec 13 10:01:25 phonesystem postfix/cleanup[24576]: 91B022937: message-id=<Asterisk-1-2018172776-241-2318@phonesystem>
Dec 13 10:01:25 phonesystem postfix/qmgr[16679]: 91B022937: from=<asterisk@phonesystem.xxxx.org>, size=146370, nrcpt=1 (queue active)
Dec 13 10:01:25 phonesystem postfix/smtp[24580]: connect to 10.1.1.180[10.1.1.180]:25: Connection refused


(Eric B) #2

The previous log’s error were because of a service not started on the SMTP server. This is a more accurate log of the problem:

Dec 13 10:21:24 phonesystem postfix/qmgr[16679]: 0D73B10712: from=<asterisk@phonesystem.xxxx.org>, size=187148, nrcpt=1 (queue active)
Dec 13 10:21:24 phonesystem postfix/smtp[26957]: 0D73B10712: to=<ericb@xxx.org>, relay=10.1.1.180[10.1.1.180]:25, delay=0.08, delays=0.02/0.01/0.01/0.05, dsn=5.7.1, status=bounced (host 10.1.1.180[10.1.1.180] said: 550 5.7.1 Unable to relay for ericb@xxx.org (in reply to RCPT TO command))
Dec 13 10:21:24 phonesystem postfix/cleanup[26953]: 1E43F11039: message-id=<20201213182124.1E43F11039@phonesystem>
Dec 13 10:21:24 phonesystem postfix/bounce[26963]: 0D73B10712: sender non-delivery notification: 1E43F11039
Dec 13 10:21:24 phonesystem postfix/qmgr[16679]: 1E43F11039: from=<>, size=2380, nrcpt=1 (queue active)
Dec 13 10:21:24 phonesystem postfix/qmgr[16679]: 0D73B10712: removed
Dec 13 10:21:24 phonesystem postfix/smtp[26957]: 1E43F11039: to=<asterisk@phonesystem.xxxx.org>, relay=10.1.1.180[10.1.1.180]:25, delay=0.05, delays=0/0/0/0.04, dsn=5.7.1, status=bounced (host 10.1.1.180[10.1.1.180] said: 550 5.7.1 Unable to relay for asterisk@phonesystem.xxxx.org (in reply to RCPT TO command))
Dec 13 10:21:24 phonesystem postfix/qmgr[16679]: 1E43F11039: removed


(Jared Busch) #3

Assuming oyu have updated all the things inside FreePBX, then you drop to postfix config settings.
The file /etc/postfix/generic is handy here.

root pbx@domain.com
root@localhost pbx@domain.com
root@localhost.localdomain pbx@domain.com
root@freepbx pbx@domain.com
root@freepbx.localdomain pbx@domain.com
asterisk pbx@domain.com
asterisk@localhost pbx@domain.com
asterisk@localhost.localdomain pbx@domain.com
asterisk@freepbx pbx@domain.com
asterisk@freepbx.localdomain pbx@domain.com
asterisk@domain.com pbx@domain.com
vm@asterisk pbx@domain.com
@pbx.domain.com @domain.com

Add a reference (if needed) to main.cf
image

Run the postmap command to build it.

postmap /etc/postfix/generic

Then restart postfix

systemctl restart postfix

Postfix Force sender=SMTP authenticate username?
Email Settings Asterisk User
(system) closed #4

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.