1748124 Members
3245 Online
108758 Solutions
New Discussion юеВ

Re: Sendmail Setup

 
William Kastner
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.
6 REPLIES 6
Tim Nelson
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 sendmail.cf ) this forwards everthing thing.

if you send an email to joe@mycompany.com then joe must have a mailbox on mycompany.com

( 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.

Sanjay_6
Honored Contributor

Re: Sendmail Setup

Hi,

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

127.0.0.1 localhost loopback

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

Hope this helps.

Regds
Sanjay
William Kastner
New Member

Re: Sendmail Setup

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

/etc/mail/sendmail.cf

# my official domain name
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM
DjMyCompany.com


# "Smart" relay host (may be null)
#DS
DSexch01.coent.MyCompany.com


Output from Sendmail call:

User1Fname.User1Lname@MyCompany.com... 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
User2Fname.User2Lname@outside.com... Connecting to exch01.coent.MyCompany.com. via relay...
220 exch01.coent.MyCompany.com Microsoft ESMTP MAIL Service ready at Fri, 22 Jan 2010 08:48:37 -0600
>>> EHLO MyCompany.com
250-exch01.coent.MyCompany.com Hello [xxx.xxx.xxx.10]
250-SIZE 10485760
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-AUTH
250-8BITMIME
250-BINARYMIME
250-CHUNKING
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 <201001221450.IAA04364@MyCompany.com> Queued mail for delivery
User2Fname.User2Lname@outside.com... Sent (2.6.0 <201001221450.IAA04364@MyCompany.com> Queued mail for delivery)
Closing connection to exch01.coent.MyCompany.com.
>>> QUIT

/etc/hosts

127.0.0.1 localhost loopback
xxx.xxx.xxx.10 ServerA
xxx.xxx.xxx.11 ServerB
xxx.xxx.xxx.185 exch01.coent.MyCompany.com
Steven E. Protter
Exalted Contributor

Re: Sendmail Setup

Shalom,

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.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Taifur
Respected Contributor

Re: Sendmail Setup

Hi,

Check below link,

http://docs.hp.com/en/B2355-91064/ch02s01.html

Rgds//
Taifur
Peter Lundquist
New Member

Re: Sendmail Setup

You have set the $j macro (Dj) to your systems top level domain.
> DjMyCompany.com
That means your local system is expected to process any email going to that domain. And your output shows that:
>User1Fname.User1Lname@MyCompany.com... 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 ServerA.MyCompany.com.
Sendmail automatically defines it, unless you override it (as you did).
I hope this helps.