Groovy Gorilla
Local sendmail can't deliver local mails. The localhost not responding, what else needs to check?
echo "Subject: sendmail test" | sendmail -v root root... Connecting to [127.0.0.1] via relay... 220 zika.gattaca.net ESMTP Sendmail 8.15.2/8.15.2/Debian-20; Mon, 12 Apr 2021 10:02:30 -0400; (No UCE/UBE) logging access from: ip6-localhost(OK)-ip6-localhost [127.0.0.1] >>> EHLO zika.gattaca.net 250-zika.gattaca.net Hello ip6-localhost [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-AUTH GSSAPI DIGEST-MD5 CRAM-MD5 250-DELIVERBY 250 HELP >>> VERB 250 2.0.0 Verbose mode >>> MAIL From:<> SIZE=23 AUTH= 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 192.168.1.4. via esmtp... 050 <>... Deferred: Connection refused by 192.168.1.4. 250 2.0.0 13CE2UWq079303 Message accepted for delivery root... Sent (13CE2UWq079303 Message accepted for delivery) Closing connection to [127.0.0.1] >>> QUIT 221 2.0.0 zika.gattaca.net closing connection /etc/hosts:
127.0.0.1 localhost.localdomain localhost 127.0.1.1 localhost # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 192.168.1.4 zika.gattaca.net zika /etc/mail/sendmail.mc:
dnl DAEMON_OPTIONS(`Family=inet6, Name=MTA-v6, Port=smtp, Addr=::1')dnl DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl dnl DAEMON_OPTIONS(`Family=inet6, Name=MSP-v6, Port=submission, M=Ea, Addr=::1')dnl DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl listen:
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 32911/sendmail: MTA tcp 0 0 127.0.0.1:587 0.0.0.0:* LISTEN 32911/sendmail: MTA Firewall is disabled anyhow allows 25/TCP and 587/TCP traffic
Thanks!
1 Answer
You local (127.0.0.1) accepted email.
It failed to relay/forward it to 192.168.1.4:25.
Details: sendmail -v makes sendmail use VERB command in SMTP session. When accepted it makes sendmail trace also trace "next hop" SMTP session
Most likely
- your sendmail is configured to use 192.168.1.4:25 as relay for local emails
see lines starting withDH(MAIL_HUB) orDR(LOCAL_RELAY) in /etc/mail/sendmail.cf - something is botched in recognizing "this host email name"