Operating System - HP-UX
1830938 Members
1946 Online
110017 Solutions
New Discussion

Sendmail basic configuration without using DNS

 
SOLVED
Go to solution
michi79
Frequent Advisor

Sendmail basic configuration without using DNS

Hello,

Can anybody tell me which steps I've to do
to configure sendmail without DNS. I use
NIS instead. My smtp-server is a NT-box
which provides contact to the internet
regards
L. Wahl
Ludwig Wahl
13 REPLIES 13
Stefan Farrelly
Honored Contributor

Re: Sendmail basic configuration without using DNS


If youre talking about the basic sendmail configuration on an HP server then you dont need to make any changes at all, just modify the /etc/nsswitch.conf file to include nis for host lookups so that when you try to send an email, eg;
echo test | mailx -s"subject" firstname.givenname@domain.com

sendmail can resolve the name youre trying to email to by looking it up in nis instead of dns. eg. the line in /etc/nsswitch.conf should look like;
hosts nis [NOTFOUND=continue] files
Im from Palmerston North, New Zealand, but somehow ended up in London...
Devbinder Singh Marway
Valued Contributor
Solution

Re: Sendmail basic configuration without using DNS

in your sendmail.cf file , add the name of your NT server under DS heading i.e. DSntserver ( you may have to put in the full domain) i.e. DSnt.fred.com

Also check you can talk to your smtp NT server , by telnetting to port 25

telnet server 25 ( if you get a response and your sendmail.cf file is set)
also you can type in once connected to port 25
HELO dev
(you'll get ok prompt back)
MAIL from:(your server name e.g. unixbox)

RCPT TO:(who you want to send it to i.e. fred@abc.com)
DATA
354 Send data. End with CRLF.CRLF
(enter your message)
test message
.
250 OK

The recipient should receive the email. if you cannot connect to port 25 check sendmail is listening on this port ( /etc/services) and check whether the NT server is allow requests through.

HTP
DEV
Seek and you shall find
CHRIS_ANORUO
Honored Contributor

Re: Sendmail basic configuration without using DNS

Check this thread: http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xc35fc5ea0230d411ade80090279cd0f9,00.html

When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
michi79
Frequent Advisor

Re: Sendmail basic configuration without using DNS

Hi All,

thanks for the tipps. The problem is stil
not solved. It is not the NT-Box. The example
with telnet to port 25 worked fine.
The pronlem is the UX-Box. In mail.log
I have the error message:
Name Server: NT-Box.FQDN : host name lookup
failure

I changed the /etc/nsswitch.conf as above
discribed. I can nslookup to the NT-Box
Why trys my UX-Box to use the NT-Box as
a Name-Server ???
regards
L. Wahl


Ludwig Wahl
Alex Glennie
Honored Contributor

Re: Sendmail basic configuration without using DNS

 
Kofi ARTHIABAH
Honored Contributor

Re: Sendmail basic configuration without using DNS

Wahl,

Lets try this again - since you are not using dns, make sure that you do not have a /etc/resolv.conf (this file lists the servers that will be your name server)

2. make sure that the IP address of your relay (ie. the NT box) is listed in your /etc/hosts file

3. Then confirm that your /etc/nsswitch.conf contains the line:

hosts: files [NOTFOUND=continue] nis

4. make sure that your /etc/mail/sendmail.cf file has a relay defined by the DS directive - (make sure that the name you specify on this directive is what you have defined in your /etc/hosts file for your NT box)

5. make sure that your /etc/mail/sendmail.cw contains ONLY localhost (or the hostname of your HPUX machine)

6. try restarting sendmail with /sbin/init.d/sendmail stop ; /sbin/init.d/sendmail start

good luck...
nothing wrong with me that a few lines of code cannot fix!
michi79
Frequent Advisor

Re: Sendmail basic configuration without using DNS

Thank you all,

sendmail is particulary running.
With: echo "test" | mailx -s "test" wahl@domain
I get a mail in the NT-Box. But there is no
sender and no subject and no message.
From the HP-UX box i get in mail.log the
following messages stat=Data format error
and DSN=data format error
Any ideas
regards
L. Wahl
Ludwig Wahl
Kofi ARTHIABAH
Honored Contributor

Re: Sendmail basic configuration without using DNS

DSN stands for Delivery Status Notification - I believe it was added in Sendmail 8.8 and above - you can disable from sendmail by editing your /etc/mail/sendmail.cf and modifying the O PrivacyOptions=noreceipts (check the comments in the sendmail.cf file for more info) as well as /usr/share/doc/sendmail8*delta*txt for more info.
nothing wrong with me that a few lines of code cannot fix!
P V Patel
Advisor

Re: Sendmail basic configuration without using DNS

Hi,
First of all check /etc/nsswitch.conf. It should have entry for hosts and aliases. e.g.
hosts : files
aliases : files

Modify /etc/mail/sendmail.cf to change following lines:
Dj$w{the name of your domain}
DS{ip of relay host/relay host}

Run newaliases command

run following two commands:

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail stop
Regards.
P V Patel
Punjabhai
michi79
Frequent Advisor

Re: Sendmail basic configuration without using DNS

Hello,

thank you all so far. I have done all you
suggested. Also I' ve ugraded to sendmail
8.9.3 with PHNE_18979. I think I have another
problem that RELAYING is not possible.
sendmail -v username@domain return error
code 501 the adress of username@domain
ist not known to the NT-Mail server although
the user is the defined.
Any ideas ?

regards
L. Wahl
Ludwig Wahl
michi79
Frequent Advisor

Re: Sendmail basic configuration without using DNS

Hi,

now I'am on the point. My NT-Box only accepts
in the from Dialog username@domain. The HP-UX
box sends in FROM: username@HP-Box.domain
If I change the hostname of the HP-UX Box
for testing to only domain the mail is delivered local on the HP-UX box
regards
L. Wahl
Ludwig Wahl
michi79
Frequent Advisor

Re: Sendmail basic configuration without using DNS

Hi,

now I'am on the point. My NT-Box only accepts
in the from Dialog username@domain. The HP-UX
box sends in FROM: username@HP-Box.domain
If I change the hostname of the HP-UX Box
for testing to only domain the mail is delivered local on the HP-UX box
regards
L. Wahl
Ludwig Wahl
michi79
Frequent Advisor

Re: Sendmail basic configuration without using DNS

Hi,

now I'am on the point. My NT-Box only accepts
in the from Dialog username@domain. The HP-UX
box sends in FROM: username@HP-Box.domain
If I change the hostname of the HP-UX Box
for testing to only domain the mail is delivered local on the HP-UX box
regards
L. Wahl
Ludwig Wahl