FOOD FOR THOUGHT Centos 6/7 Sendmail Smarthost Not Working

trupsalms

Member
Joined
May 13, 2011
Messages
337
Reaction score
6
root@shawnvoiptech1:/etc/mail $ echo "test" | mail -v -s test [email protected] [email protected]... Connecting to [127.0.0.1] via relay...
220 shawnvoiptech1.goldcoast.us ESMTP Sendmail 8.14.4/8.14.4; Wed, 10 Jul 2019 17:45:02 -0500
>>> EHLO shawnvoiptech1.goldcoast.us
250-shawnvoiptech1.goldcoast.us Hello pbx.local [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH LOGIN PLAIN
250-DELIVERBY
250 HELP
>>> MAIL From:<[email protected]> SIZE=229 AUTH=[email protected]
250 2.1.0 <[email protected]>... Sender ok
>>> RCPT To:<[email protected]>
>>> DATA
250 2.1.5 <[email protected]>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 x6AMj2Mw018788 Message accepted for delivery
[email protected]... Sent (x6AMj2Mw018788 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 shawnvoiptech1.goldcoast.us closing connection
You have new mail in /var/spool/mail/root
WARNING: Always run Incredible PBX behind a secure hardware-based firewall.
 
Last edited:

trupsalms

Member
Joined
May 13, 2011
Messages
337
Reaction score
6
Jul 11 02:13:14 shawnvoiptech1 sendmail[3574]: x6B7DE3v003574: from=<[email protected]>, size=591, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA, relay=pbx.local [127.0.0.1]
Jul 11 02:13:14 shawnvoiptech1 sendmail[3573]: x6B7DEcO003573: to=[email protected], ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30313, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (x6B7DE3v003574 Message accepted for delivery)
Jul 11 02:13:15 shawnvoiptech1 sendmail[3576]: STARTTLS=client, relay=smtp.gmail.com, version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128
Jul 11 02:13:15 shawnvoiptech1 sendmail[3576]: x6B7DE3v003574: to=<[email protected]>, ctladdr=<[email protected]> (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=120591, relay=smtp.gmail.com [108.177.12.108], dsn=5.0.0, stat=Service unavailable
Jul 11 02:13:15 shawnvoiptech1 sendmail[3576]: x6B7DE3v003574: x6B7DF3v003576: DSN: Service unavailable
Jul 11 02:13:15 shawnvoiptech1 sendmail[3576]: x6B7DF3v003576: to=<[email protected]>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31857, dsn=2.0.0, stat=Sent
 

tbrummell

Guru
Joined
Jan 8, 2011
Messages
1,275
Reaction score
339
Works fine for me, but did end up in Gmail Spam folder.
Code:
Jul 11 08:11:33 pbx sendmail[32281]: x6BCBUCa032279: to=<[email protected]>, ctladdr=<root@my_FQDN> (0/0), delay=00:00:03, xdelay=00:00:02, mailer=esmtp, pri=120497, relay=gmail-smtp-in.l.google.com. [74.125.124.27], dsn=2.0.0, stat=Sent (OK  1562847093 n18si8130555iod.107 - gsmtp)
Code:
Asterisk 13.25.0    Incredible 13.0.122.60
 

tbrummell

Guru
Joined
Jan 8, 2011
Messages
1,275
Reaction score
339
Code:
root@pbx:/var/log $ nslookup shawnvoiptech1.goldcoast.us
Server:         8.8.8.8
Address:        8.8.8.8#53

** server can't find shawnvoiptech1.goldcoast.us: NXDOMAIN
That certainly isn't going to help your case. If the receiving email server can't do a lookup on the host, and have an associated MX record, it will most likely fail....every time.
My personal mail server will drop you like a hot potato if there is no associated MX record to the domain that is sending the email.
 

smarks

Guru
Joined
Jan 7, 2015
Messages
116
Reaction score
26
I would replace sendmail with postfix for starters. That error seems to indicate it's not even reaching gmail. Maybe try disable your firewall and see what happens but it should not be blocking outbound to begin with. Also make sure selinux is disabled.
 
Last edited:

trupsalms

Member
Joined
May 13, 2011
Messages
337
Reaction score
6
Sorry name and host are sanitized. Public IP with dyndns to use name instead of IP.
 

trupsalms

Member
Joined
May 13, 2011
Messages
337
Reaction score
6
Incredible PBX/FAX 13-13.7 for CentOS 6 also, this is a cloud VPS server.
 

tbrummell

Guru
Joined
Jan 8, 2011
Messages
1,275
Reaction score
339
Depending on VPS, they may have outbound 25 blocked. Pretty sure I had to open a ticket on DO to have that opened. Currently on Vultr and I don't think I had to get it opened there.
 

Members online

No members online now.

Forum statistics

Threads
25,778
Messages
167,504
Members
19,198
Latest member
serhii
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top