1834804 Members
2842 Online
110070 Solutions
New Discussion

Mail and DNS

 
carlos_83
Occasional Advisor

Mail and DNS

How can I configure sendmail to send emails to our external mail server??? I've modified the /etc/hosts and added the ip of the mail server, it looks like this

200.x.x.x aaa aaa.com #mail server
10.y.y.y bbb bbb.com #local server

I executed the command
#sendmail -v abc@aaa.com
abc@aaa.com... Connecting to aaa.com via esmtp...
220 aaa.com ESMTP Sendmail 8.12.9/8.12.6; Thu, 18 Sep 2003 14:39:19 -0500 (CDT)
>>> EHLO bbb.com
250-aaa.com Hello nfvpn.aaa.com [205.218.254.210], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From: SIZE=616
250 2.1.0 ... Sender ok
>>> RCPT To:
553 5.1.8 ... Domain of sender address abc@aaa.com does not exist
abc@aaa.com.ni... User unknown
>>> RSET
250 2.0.0 Reset state
/dead.letter... Saved message in /dead.letter
Closing connection to aaa.com.ni
>>> QUIT
221 2.0.0 aaa.com closing connection

I don't know how i can fix this "Domain of sender address ... does not exist". I would like some help with this. Thnx.
9 REPLIES 9
Dave La Mar
Honored Contributor

Re: Mail and DNS

Look at /etc/mail/sendmail.cf
Observe :
################################################################################
# Routing of local mail #
################################################################################
# #
# By default, all mail with just a user name or a user name at a host #
# that we consider to be local (also see Class W above) is delivered locally #
# using the local mailer. In some cases this may not be desired. If sendmail #
# is running on a discless client, for instance, then we would prefer to #
# pass the mail over to the discless server for local delivery. Or we may #
# just wish to have all mail send to a central mail hub. #
# #
# Send all local mail to the "mail hub" (DH macro): #
# #
# By setting the macro H (line starting with DH) to the name of the mail #
# hub, all mail that is destined for a local user will, instead, be forwarded #
# to the same user on the mail hub. #
# #
# Names that should be delivered locally, even if DH and DR are set (Class L): #
# #
# If you are sending local mail to a hub there may still be some users #
# whose mail should be delivered locally such as root. Class L lists #
# such users. To add a user to this class, define them as part of class #
# L as in: #
# #
# CL root bob mary #
################################################################################




############################################################
### Routing options ###
############################################################

# define the hub for all local mail
DH your_mail_server.com

Best of luck.

Reagrds,
dl
"I'm not dumb. I just have a command of thoroughly useless information."
Steven E. Protter
Exalted Contributor

Re: Mail and DNS

Obviously the domain does exist because your output shows clearly, you are talking to the mail server.

I think its just a bad error message. You can't control how other people configure their mail servers.


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
carlos_83
Occasional Advisor

Re: Mail and DNS

Thanks, but I'm trying to send mails to an external mail server, no locally. The hp-ux server is located in another separate network segment from the mail server. For instance the mail server could be an Exchange o Lotus server.
Sundar_7
Honored Contributor

Re: Mail and DNS

Hi,

I guess smart host is what u r looking for

# vi /etc/mail/sendmail.cf

DSyourmailhost

Thanks,

Sundar.
Learn What to do ,How to do and more importantly When to do ?
carlos_83
Occasional Advisor

Re: Mail and DNS

It doesn't work yet. Now at te beginning of communication it says

Connecting to aaa.com via relay...

but it stills displays the same error message.
Steven E. Protter
Exalted Contributor

Re: Mail and DNS

This is simple.

The user you are sending the email to is not recognized on the remote mail server.

If you are the admin, make sure the user exists.

If you are not the admin for the remote server, then contact them if the account should exist and does not.

You are connecting properly. The connection is being reset because the user does not exist. Playing with sendmail.cf will not in my opinion help.

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
carlos_83
Occasional Advisor

Re: Mail and DNS

But, this is a valid email account, it's already created on the mail server and the one that I'm using right now.
Steven E. Protter
Exalted Contributor

Re: Mail and DNS

In the target server:

display the output of this command.

sendmail -v -d8.99 -d38.99 abc
type some text.

.



Also upload the mail.log file from the target server. Or examine the log for the exact time that this event is ocurring.

I've been able to fix these kind of issues before but I'd need to see the sendmail.cf and other mail configuration files from both servers.

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
Linda Lux
Regular Advisor

Re: Mail and DNS

I just wanted to let everyone know that I had a similiar problem. For the last four weeks I have been trying to change every file associated with sendmail to correct this. Thank you for pointing me to one line in the sendmail.cf file. This has corrected my problem.
Linda Lux
If it isn't one thing, it's another