I'm trying send mail via sendmail, but mail is not received. Here is the command:
/bin/cat /scripts/zabbix/test.txt | mail -v -s "Blocked IPs" example@example.com
Here is the output
example@example.com... Connecting to [127.0.0.1] via relay... 220 nshost1.example.am ESMTP Sendmail 8.15.2/8.15.2; Fri, 3 Feb 2017 13:05:32 +0400 (AMT) >>> EHLO nshost1.example.am 250-nshost1.example.am Hello localhost [127.0.0.1], pleased to meet you 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-8BITMIME 250-SIZE 250-DSN 250-ETRN 250-STARTTLS 250-DELIVERBY 250 HELP >>> STARTTLS 220 2.0.0 Ready to start TLS >>> EHLO nshost1.example.am 250-nshost1.example.am Hello localhost [127.0.0.1], pleased to meet you 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-8BITMIME 250-SIZE 250-DSN 250-ETRN 250-DELIVERBY 250 HELP >>> MAIL From:<david@nshost1.example.am> SIZE=76 250 2.1.0 <david@nshost1.example.am>... Sender ok >>> RCPT To:<example@example.com> >>> DATA 250 2.1.5 <example@example.com>... Recipient ok 354 Enter mail, end with "." on a line by itself >>> . 250 2.0.0 v1395W8n061857 Message accepted for delivery example@example.com... Sent (v1395W8n061857 Message accepted for delivery) Closing connection to [127.0.0.1] >>> QUIT 221 2.0.0 nshost1.example.am closing connection
Here is the maillog output
Feb 3 13:05:27 nshost1 sendmail[61739]: v1395R0Q061739: from=david, size=76, class=0, nrcpts=1, msgid=<201702030905.v1395R0Q061739@nshost1.example.am>, relay=root@localhost Feb 3 13:05:32 nshost1 sm-mta[61857]: ruleset=check_relay, arg1=localhost, arg2=127.0.0.1, relay=localhost [127.0.0.1], discard Feb 3 13:05:32 nshost1 sm-mta[61857]: STARTTLS=server, relay=localhost [127.0.0.1], version=TLSv1.2, verify=NO, cipher=DHE-RSA-AES256-GCM-SHA384, bits=256/256 Feb 3 13:05:32 nshost1 sendmail[61739]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1.2, verify=FAIL, cipher=DHE-RSA-AES256-GCM-SHA384, bits=256/256 Feb 3 13:05:32 nshost1 sm-mta[61857]: v1395W8n061857: from=<david@nshost1.example.am>, size=408, class=0, nrcpts=1, msgid=<201702030905.v1395R0Q061739@nshost1.example.am>, proto=ESMTPS, daemon=IPv4, relay=localhost [127.0.0.1] Feb 3 13:05:32 nshost1 sm-mta[61857]: v1395W8n061857: discarded Feb 3 13:05:32 nshost1 sendmail[61739]: v1395R0Q061739: to=example@example.com, ctladdr=david (1007/1007), delay=00:00:05, xdelay=00:00:05, mailer=relay, pri=30076, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (v1395W8n061857 Message accepted for delivery)
Any suggestions?
DISCARD
entries in your access (map) sendmail configuration file?Connecting to [127.0.0.1] via relay
looks extremely suspect. Does this host (think it's) calledexample.com
as per your target email address?