Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

About sendmail from AIX server through a Linux mail server to internet

Status
Not open for further replies.

wumh

IS-IT--Management
Sep 11, 2002
6
0
0
CN
The following is my operation:

- Create an /etc/netsvc.conf file, this is to tell sendmail to use /etc/hosts for name resolution not
DNS (default):

vi /etc/netsvc.conf

Add the following:

hosts=local

- Change the permissions on the /etc/netsvc.conf file to lock down root only access:

chmod 600 /etc/netsvc.conf

- Add into /etc/hosts file:
a1.b1.c1.d1 mailserver.domain_internal
a2.b2.c2.d2 myserver.domain_internal

- Edit the /etc/sendmail.cf and make the following changes:

Vi /etc/sendmail.cf

Change:

#DwYourHostName

To:

Dwmyserver.domain_internal

Change:

# "Smart" relay host (may be null)
# Relay host to forward outgoing mail not in the local domain to.
# To forward ALL mail to this relay host, uncomment the appropriate
# rule in ruleset 0, as indicated by the ruleset's comments.
#DSmailer:relayhostname
DS

To:

# "Smart" relay host (may be null)
# Relay host to forward outgoing mail not in the local domain to.
# To forward ALL mail to this relay host, uncomment the appropriate
# rule in ruleset 0, as indicated by the ruleset's comments.
#DSmailer:relayhostname
DSmailserver.domain_internal

Save the file.

- run the command "refresh -s sendmail"

- try to mail -v xxx@sina.com.cn but fail by the following tips:

"The local host name (myserver) does not have a domain; fix $j in co
nfig file"

I have tested I can "telnet mailserver 25" to send the mail successfully.
Pls help to verify where is wrong.Thanks a greate!
 
That error usually means you do not have a fully qualified host name
in /etc/hosts.....In 4.3.3 it required the addition of a . as in myhost. or myhost.com
but not just myhost

You can try adding an alias? myserver myserver.

--------------------------------------
Because sendmail is built to use a DNS, sendmail also expects the host
name to have a domain name. If a host running sendmail does not have a
domain name, sendmail will loop because it cannot define the Dm
variable. The typical error message is fix $j in config file, but this
is misleading so don't fix $j in the config file. This is fixed one of
two ways.

Edit the /etc/hosts file and give the local systems host name a domain
name 1.1.1.1 bogus will become 1.1.1.1 bogus.lab.net bogus (the short
name was moved to the alias position) or 1.1.1.1 bogus. This is
considered incorrect but will work as long as the DS variable is not
defined.
 
Thanks for your reply.
Some points need to be verified:
1.I have used the name with .com such as: mailserver.mydomain.com.cn
2.I am not sure about DS syntax.
Pls help me to check what I do with sendmail.cf.
Thanks a greate!
 
After you save the sendmail.cf file, and before you refresh sendmail, try typing the command

sendmail -bi

Also you could try setting the $j (Dj) to your server's FQDN) in sendmail.cf

i.e.

Djmyserver.mydomain.org

Hope that helps,
LHLTech

IBM Certified Specialist - AIX System Support
Halfway through CATE exams!
 
I doh't think your system can resolve the Ds setup above
DSmailserver.domain_internal or the Dw...but I may be wrong...See
the reference urls below....maybe they will assist you.
------------------------
Configuring for relay DS
When a workstation that is behind a firewall needs to send and receive
Internet mail, the DS and DM variables are
used. The comments for the DS entry describe the server defined
there as a Smart Relay. A Smart Relay is a system
that has access to a working DNS, and has Internet connectivity
so that it is able to make a network connection and
deliver the mail. Typically, the DS is a firewall, or a system that is
trusted by the firewall.

The DS options would be defined, as follows:

DSsmtp:firewall.lab.net
or
DSsmtp:[1.1.1.99] (If an IP address is used, it must be in square brackets.)
-------------------
 
Now I can recieve the following message after run" mail -v xxx@sina.com.cn":

---------------------------
WARNING: The local host name (myserver) does not have a domain; fix $j in config file
xxx@sina.com.cn ... Connecting to mailserver.domain_internal via smtp...
220 domain_external ESMTP Sendmail 8.9.3/8.8.7; Thu, 19 Sep 2002 10:23:54 +0800
>>> EHLO myserver
250-domain_external Hello [a1.b1.c1.d1], pleased to meet you
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ONEX
250-ETRN
250-XUSR
250 HELP
>>> MAIL From:<root@myserver> SIZE=90
250 <root@myserver>... Sender ok
>>> RCPT To:<xxx@sina.com.cn>
250 <xxx@sina.com.cn >... Recipient ok
>>> DATA
354 Enter mail, end with &quot;.&quot; on a line by itself
>>> .
250 KAA28758 Message accepted for delivery
xxx@sina.com.cn ... Sent (KAA28758 Message accepted for delivery)
Closing connection to mailserver.domain_internal
>>> QUIT
221 domain_external connection
-------------------------

But from my mailbox: xxx@sina.com.cn, I cann't receive the mail.

How can I check the mail queue and how can send them out?

Thanks a greate!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top