Score:0

Sendmail unable to find recipient to send email

US flag

I am trying to set up sendmail for my server to send alert notification status. After searching for guides on the internet, I am still unable to send outgoing emails to my work email. from what I've read, sendmail doesn't need any configuration to send out emails. I've checked the outgoing port 25, configured the DNS, and edited the hostname but have not succeeded. This is the failed email response I got. From what I can see, it cannot find the recipient of the email. what else that i need to change to make it successful?

From: Mail Delivery Subsystem <[email protected]>
Message-Id: <[email protected]>
To: [email protected]
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
        boundary="3651ovxS001207.1688521876/company.com"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)

This is a MIME-encapsulated message

--3651ovxS001207.1688521876/company.com

The original message was received at Wed, 5 Jul 2023 01:50:57 GMT
from root@localhost

   ----- The following addresses had permanent fatal errors -----
[email protected]
    (reason: 550 5.1.1 <[email protected]>... User unknown)
    (expanded from: [email protected])

   ----- Transcript of session follows -----
... while talking to [127.0.0.1]:
>>> DATA
<<< 550 5.1.1 <[email protected]>... User unknown
550 5.1.1 [email protected]... User unknown
<<< 503 5.0.0 Need RCPT (recipient)

--3651ovxS001207.1688521876/company.com
Content-Type: message/delivery-status

Reporting-MTA: dns; company.com
Arrival-Date: Wed, 5 Jul 2023 01:50:57 GMT

Final-Recipient: RFC822; [email protected]
Action: failed
Status: 5.1.1
Remote-MTA: DNS; [127.0.0.1]
Diagnostic-Code: SMTP; 550 5.1.1 <[email protected]>... User unknown
Last-Attempt-Date: Wed, 5 Jul 2023 01:51:16 GMT

--3651ovxS001207.1688521876/company.com
Content-Type: message/rfc822

Return-Path: <root>
Received: (from root@localhost)
        by company.com (8.15.2/8.15.2/Submit) id 3651ovxR001207
        for [email protected]; Wed, 5 Jul 2023 01:50:57 GMT
Date: Wed, 5 Jul 2023 01:50:57 GMT
From: root <root>
Message-Id: <[email protected]>
Subject: Test email

Test email from linode

--3651ovxS001207.1688521876/company.com--
drookie avatar
za flag
You a) obfuscated a lot b) didn't provide any info on local domain this MTA is configured to receive mails for c) should provide the `sendmail -bv [email protected]` output.
br flag
One guess, which is hard to verify since you didn't post a lot of details: If your sendmail server and your mail email server are configured with the same domain, it's possible sendmail just tries to deliver mail to itself. If then that mailbox doesn't exist on the local mailserver it will generate the posted response. Instead you should either setup a subdomain for your mailserver or configure sendmail to run as relay. on Exchange this is called external relay, which forces all outgoing mail to be sent via its public ip address over the internet instead of local delivery.
ws flag
In the absence of the email headers and/or log entries (for anything OTHER than sendmail, you should also post the configuration - but that for sendmail is too verbose) we can't advise.
ws flag
....but you might consider using a different MTA, specifically nullmailer or postfix and possibly configuring it as a relay.
user6354238 avatar
md
@MoWo I think what i'm trying to achieve here is to setup sendmail as a relay. since I don't have access to the mail server or its configuration. i did tried setup sendmail on my local linux machine and it can send email without any configuration needed. that's why I'm a bit confused. and also I just need to send outgoing email from this server, the receiving part can be neglected. should I edit the question and post again?
Score:0
fi flag
  1. Check if the recipient's domain (company.com) is configured as local email domain (domain delivered by sendmail to local mailboxes).
    To get list of local email domains from sendmail as root execute:
    echo '$=w' | sendmail -bt
  2. It is nor => As root send a test message with full transcript od SMTP session. It usually helps to reduce possible problems.

Example shell script for sending test message in verbose mode:

#!/bin/sh
RECIPIENT='[email protected]'

/usr/sbin/sendmail -v -oi -- $RECIPIENT <<END
To: [email protected]
Subject: Delivery test

Delivery test
END
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.