FOOD FOR THOUGHT Centos 6/7 Sendmail Smarthost Not Working

trupsalms

Member
Joined
May 13, 2011
Messages
337
Reaction score
6
[email protected]:/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
593
Reaction score
56
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=<[email protected]_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
593
Reaction score
56
Code:
[email protected]:/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
105
Reaction score
24
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:

tbrummell

Guru
Joined
Jan 8, 2011
Messages
593
Reaction score
56
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.
 
  • Like
Reactions: wardmundy

Members online

PIAF 5 - Powered by 3CX

Forum statistics

Threads
22,262
Messages
136,420
Members
14,501
Latest member
yeoldroundabout