Tuesday, April 12, 2016

linux - Mail troubleshooting

I'm just trying to send myself an e-mail. On on Ubuntu using sendmail. For some reason, it doesn't work. Here's the command I'm running and what shows up when I run it:



jason@ve:~$ echo "Subject: test" | /usr/lib/sendmail -v jason@woollymammothlabs.com
jason@woollymammothlabs.com... Connecting to [127.0.0.1] via relay...
220 ve.5wrvhfxg.vesrv.com ESMTP Sendmail 8.14.3/8.14.3/Debian-9.1ubuntu1; Wed, 29 Dec 2010 13:51:49 -0800; (No UCE/UBE) logging access from: localhost.localdomain(OK)-localhost.localdomain [127.0.0.1]

>>> EHLO ve.5wrvhfxg.vesrv.com
250-ve.5wrvhfxg.vesrv.com Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN

250-DELIVERBY
250 HELP
>>> VERB
250 2.0.0 Verbose mode
>>> MAIL From: SIZE=14
250 2.1.0 ... Sender ok
>>> RCPT To:
>>> DATA
250 2.1.5 ... Recipient ok
354 Enter mail, end with "." on a line by itself

>>> .
050 ... Connecting to 205.186.165.157. via esmtp...
050 ... Deferred: Connection refused by 205.186.165.157.
250 2.0.0 oBTLpnEj012261 Message accepted for delivery
jason@woollymammothlabs.com... Sent (oBTLpnEj012261 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 ve.5wrvhfxg.vesrv.com closing connection



It seems to me that the "Connection refused by 205.186.165.157" part is where things are going wrong, but I have no idea where or how to begin troubleshooting. Any advice?



$ grep 127.0.0.1 /etc/mail/sendmail.cf
O DaemonPortOptions=Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1
O DaemonPortOptions=Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1
R<@> < $* @ [127.0.0.1] >
$: < ? $&{client_name} > < $1 @ [127.0.0.1] >
R127.0.0.1 $@ RELAY originated locally
# DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
# DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...