1

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?

  • 2
    Do you have any DISCARD entries in your access (map) sendmail configuration file? – AnFi Feb 3 '17 at 10:29
  • No,here is access file content ## Examples (commented out for safety) To:example.am OK From: nshost1.example.am OK localhost.localdomain RELAY localhost RELAY – David Feb 3 '17 at 11:19
  • 1
    @David please put your updates in the question, not here in the comments. For starters it means you can format the text properly, and so be going on with, comments are often ignored by people reading the question as they are expected to be requests for clarification, etc. – roaima Feb 3 '17 at 19:39
  • 1
    The line Connecting to [127.0.0.1] via relay looks extremely suspect. Does this host (think it's) called example.com as per your target email address? – roaima Feb 3 '17 at 21:33
0

Thank you Andrzej A. Filip.My problem is solved after I run

make restart

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.