Showing results for 
Search instead for 
Did you mean: 

Re: Sendmail Setup

New Member

Sendmail Setup

I am trying to setup sendmail to allow outgoing emails from this node to an exchange server. I am able to send email to global email addresses, but not internal company email addresses. I am getting an error "User unknown" for the company emails. I went directly into the email server and was able to successfully send emails out. There must be something wrong in my setup of sendmail and I need some direction. Please advise.
Honored Contributor

Re: Sendmail Setup

How about a couple examples of what works and what does not ?

one way to configure sendmail is to send all email to a smart relay. ( e.g. set DS macro in ) this forwards everthing thing.

if you send an email to then joe must have a mailbox on

( your error suggests that this user does not )

There a many ways to configure sendmail... provide the examples and maybe we can make some suggestions.

Honored Contributor

Re: Sendmail Setup


Check and see if you have this entry for localhost or something similar in your /etc/hosts. localhost loopback

If not, try to add it and see if it fixes your issue.

Hope this helps.

New Member

Re: Sendmail Setup

Here is some output of the settings that I have made:


# my official domain name
# ... define this only if sendmail cannot automatically determine your domain

# "Smart" relay host (may be null)

Output from Sendmail call: User unknown
UserMain... forward: /home/UserMain/.forward.ServerA+: World writable directory
UserMain... forward: /home/UserMain/.forward+: World writable directory
UserMain... forward: /home/UserMain/.forward.ServerA: World writable directory
UserMain... forward: /home/UserMain/.forward: World writable directory
/home/UserMain/dead.letter... Saved message in /home/UserMain/dead.letter Connecting to via relay...
220 Microsoft ESMTP MAIL Service ready at Fri, 22 Jan 2010 08:48:37 -0600
>>> EHLO Hello []
250-SIZE 10485760
250 XEXCH50
>>> MAIL From: SIZE=38
250 2.1.0 Sender OK
>>> RCPT To:
250 2.1.5 Recipient OK
>>> DATA
354 Start mail input; end with .
>>> .
250 2.6.0 <> Queued mail for delivery Sent (2.6.0 <> Queued mail for delivery)
Closing connection to
>>> QUIT

/etc/hosts localhost loopback ServerA ServerB
Exalted Contributor

Re: Sendmail Setup


Exchange servers require setup to relay mail. You have to have the exchange administrator authorize mail relay by IP address.

I've done this, its a very confusing GUI, not straightforward.

Once this is done, you mail will forward.

You may have additional issues and need to set up sendmail to use your internal domain name.

Steven E Protter
Owner of ISN Corporation
Respected Contributor

Re: Sendmail Setup


Check below link,

New Member

Re: Sendmail Setup

You have set the $j macro (Dj) to your systems top level domain.
That means your local system is expected to process any email going to that domain. And your output shows that:
> User unknown
I doubt that you have a login ID on your system of User1Fname.User1Lname. Therefore, it fails.
The default for $j macro is the fully qualified canonical name of your local host, which would be
Sendmail automatically defines it, unless you override it (as you did).
I hope this helps.