SOLVED - How to set up Email with System Admin pro but no FQDN?

I am running the ISO on a virtual machine, based on CentOs I believe. I purchased the system admin module but have not been able to get email working. I’m trying to get it to work with gmail. I created the app and got the 16 digit password. I followed several guides setting up the main.cf and sasl_passwd file but keep getting “SASL authentication failed; server smtp.gmail(dotedit)com[142.250.111.109] said: 535-5.7.8 Username and Password not accepted.” I am stuck what to try next. Had to edit post as it is seeing my information as links so am not able to post main.cf.

sasl files has "smtp.gmail(dotedit)com:587 mygamilemail:16digitapppaswordfromgooglenospaces

If you mark up text as pre-formatted, it won’t be scanned for links.

There is a preference for using pastebin.freepbx.org for non-trivial file extracts.

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
inet_interfaces = localhost
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost
unknown_local_recipient_reject_code = 550
smtp_tls_security_level = secure
smtp_tls_mandatory_protocols = TLSv1
smtp_tls_mandatory_ciphers = high
smtp_tls_secure_cert_match = nexthop
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
 
 
debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.10.1/samples
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
smtp_generic_maps = hash:/etc/postfix/generic
 
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_type = cyrus
smtp_use_tls = yes
smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
relayhost = smtp.gmail.com:587
myhostname = freepbx.local.com

Some things I have noticed different from the different guides/posts: Some enclose the relay host in [ ] and some don’t? Ubunu and CentOs seem to keep the CAfile in different locations (I did edit the path to where I verified the file to be) There are different methods and commands to send email from the command line… tried all I could find but no success. I was not able to find a command line example where I could also enter the google 16 digit password… was hoping to verify it was not a google end problem.

Square brackets means don’t use a DNS MX record, but treat the address as literally the server to use.

Is one way better than the other?

system info:

NAME="Sangoma Linux"
VERSION="7 (Core)"
ID="sangoma"
ID_LIKE="centos rhel fedora"
VERSION_ID="7"
PRETTY_NAME="Sangoma Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:sangoma:sng:7::server:utf8"
HOME_URL="https://distro.sangoma.net/"
BUG_REPORT_URL="https://issues.sangoma.net/"

CENTOS_MANTISBT_PROJECT="Sangoma-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="sangoma"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

Sangoma Linux release 7.8.2003 (Core) 
Sangoma Linux release 7.8.2003 (Core) 
Sangoma Linux release 7.8.2003 (Core) 

Solved - not sure exactly which change I made made it work, or if it was more about rebooting at the right time. If it was due to a change, I did change the inet_protocalls = all to ipv4 in the main.cf file. I also suspect fwconsole stop …and then fwconsole start are more effective than fwconsole reload. I got clues on the stop and start that I did not get with just reload. I found several posts but few solutions when searching this problem, hope this helps someone.

FreePBX GUI Setup

Under Admin - System Admin - Email setup -
Use External SMTP Server
freepbx.local.com was used for both My Hostname and My Origin
local.com was used for my domain
Select GMAIL button
Enter gmail email address for username
Enter 16 digit App password created by Google… no spaces

clicking submit creates new sasl_passwd and sasl_passwd.db files

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