Operating System - HP-UX
1820754 Members
3468 Online
109627 Solutions
New Discussion юеВ

Re: Sending Mail using HP-UX

 
ravi.aryan
Advisor

Sending Mail using HP-UX

Hi people,

I know this subject has been taken up quite a lot of times, but after many efforts I am still unable to succeed, so finally I have decided to start a thread for it..

My Requirement is to use my HP-UX Server to send mail both locally and to the Internet as well.
For this I need to pass through my mail server which is Lotus Notes Server...

I have edited the Hosts file and added this address and the corresponding name as well

After which I edited the sendmail.cf so as to include this server name in the DS Parameter

However when sending a mail using sendmail -v , example: sendmail -v geepun.foolchand@dcdm.intnet.mu, I am not getting any mail...

If ever I use sendmail -v geepun.foolchand, I get a message unknown user.

When checking the mail queue through mailq, all the mails that I sent as a test purpose, have the status 'DEFERRED'

I am completely new to this. In fact with the administrator not here, I am having to take charge of this... And this is quite urgent as it is needed in a demo on monday..

I would appreciate if you guys could help me..
Thanks in advance for your quick and detailed explanations...

Regards
Ravi
26 REPLIES 26
mobidyc
Trusted Contributor

Re: Sending Mail using HP-UX

Hello,

in /etc/mail/sendmail.cf
you can set the DS variable to use your lotus notes server (if it accepts relaying):

DSmailserver.domainame

it's indicated in the sendmail.cf file:
# Relay all non-local mail to the "Smart" relay host (DS) via smtp: #
# #
# This macro is optional. If you wish to send all non-local mail #
# to a smart relay via SMTP just set macro S (DS) to the name of the #
# smart relay. If this macro is not set, then all mail addresses to #
# a non-local user will be send to the relay. #

for test you can use the following command:
#> sendmail -bv test@hp.com
test@hp.com... deliverable: mailer esmtp, host [mailserver.domainame], user test@hp.com

It indicates you the localhost or the mailhost that will be used.

Regards,
Cedrick Gaillard
Best regards, Cedrick Gaillard
ravi.aryan
Advisor

Re: Sending Mail using HP-UX

Hi Cedrick,

Thanks for the Prompt answer. However, I am getting confused about what I should edit..

I am attaching the sendmail.cf file.. Could you have a quick look at it and guide me please? I am very sorry for the inconvenience... But its really important that i get this working...

Also in my hosts file I defined the mail server as follows:

172.16.100.222 mail

Should I suffix mail with the domain name?
Therefore should it become: 172.16.100.222 mail.dcdm.mu?

Thanks
Ravi

mobidyc
Trusted Contributor

Re: Sending Mail using HP-UX

hello,

at the lin 717, replace the DS variable:

vi +717 /etc/mail/sendmail.cf
DSmail
:x!

PS: there is no blank between the DS variable and the mail server

restart sendmail:
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

test address:
sendmail -bv test@domain.com
sendmail -bv root

the first test must indicates the mailhost [mail]
the second must indicates [local]

Regards,
Cedrick Gaillard
Best regards, Cedrick Gaillard
ravi.aryan
Advisor

Re: Sending Mail using HP-UX

Hi Cedrick,

I tried what you told me..

--------------------------------
# sendmail -bv geepun.foolchand@dcdm.intnet.mu
geepun.foolchand@dcdm.intnet.mu... deliverable: mailer relay, host mail.luser-re
lay, user geepun.foolchand@dcdm.intnet.mu
-----------------------------------

However, I still did not receive any messages..
And from what I see above Host is being mail.luser-relay... Is that correct, or the domain is not good?

Also there is another thing I do not know if it has an implication:

Sendmail listens on port 23
and the lotus notes server listens on port 25

I hope this can help to find a solution

Thanks
Ravi
mobidyc
Trusted Contributor

Re: Sending Mail using HP-UX

Hello,

what is mail.luser-relay ?
what gives : nslookup mail.luser-relay ?
is it your lotus notes mail server ?

in all manner , acording the result of your command, your mail is send to the mail server mail.luser-relay.

you can see if this server have refused your mail by examining /var/adm/syslog/mail.log.

maybe you could set your /etc/hosts and /etc/mail/sendmail.cf files with the long dns name of your lotus server.

another thing, you're using a sendmail 8.9.3 config file, verify your sendmail version (what /usr/sbin/sendmail |grep version), if the sendmail version is higher than your config file, do:
cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.OLD
and
cp /usr/newconfig/etc/mail/sendmail.cf /etc/mail/sendmail.cf
don't forget to set your new config file (DS var)

Regards,
Cedrick Gaillard.
Best regards, Cedrick Gaillard
Yogeeraj_1
Honored Contributor

Re: Sending Mail using HP-UX

hi Ravi,

First of all, verify that you can ping the mail server from the HP-UX host:
ping mail.dcdm.mu

If ok, define the DS variable, e.g.
DSmail.dcdm.mu

then try a simple test to see if it working:
e.g.
echo "hello world" | /bin/mailx -s "test mail" ravi.aryan@dcdm.intnet.mu

good luck!

kind regards
yogeeraj

No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
ravi.aryan
Advisor

Re: Sending Mail using HP-UX

Hi People,

Sorry but this is really urgent.. Please try to assist me with the problem..

Thanks a lot
Ravi
Yogeeraj_1
Honored Contributor

Re: Sending Mail using HP-UX

hi again,

did you run the mentioned tests?

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
mobidyc
Trusted Contributor

Re: Sending Mail using HP-UX

Hello,

please answer to the asked questions for help you.

if you're sure your lotus notes server accepts relaying you can do a simple things, run:
/usr/newconfig/etc/mail/cf/cf/gen_cf

this script will configure your sendmail file with few questions.

hope this help you.

regards,
Cedrick Gaillard
Best regards, Cedrick Gaillard
ravi.aryan
Advisor

Re: Sending Mail using HP-UX

Hi Guys,

I am working on it... Excepting the last test that you have asked I have done the above... It is still the same... The mail goes but I do not receive it..

I will provide feedback about the last test shortly..

Thanks ppl
Ravi
mobidyc
Trusted Contributor

Re: Sending Mail using HP-UX

Hello ravi,

do you have error in /var/adm/syslog/mail.log?

please post the last lines of this file so you could help you better.

Regards,
Cedrick Gaillard
Best regards, Cedrick Gaillard
ravi.aryan
Advisor

Re: Sending Mail using HP-UX

Hi Cedrick,

Please find attached the log file.. I got to zip it since it exceeded 1MB

best regards
Ravi
mobidyc
Trusted Contributor

Re: Sending Mail using HP-UX

Hello,

the error is :
Apr 6 17:30:12 oraserv sendmail[2124]: RAA02124: to=xxxxx@xxx.xxx.xxx, delay=00:00:00, mailer=relay, relay=mail.dcdm.mu, stat=Transient parse error -- message queued for future delivery

Transient parse error is typically a DNS error.

you didn't answer to my previous questiosn, WHAT IS mail.luser-relay ?
WHAT GIVES : nslookup mail.luser-relay ?
IS IT your lotus notes mail server ?

please verify your:
/etc/hosts <= set a long name for mail, not just the alias
/etc/nsswitch.conf

nslookup mail.luser-relay
nslookup IP_ADDRESS_OF_mail.luser-relay

what are the files in /etc/mail?

Regards,
Cedrick Gaillard.
Best regards, Cedrick Gaillard
ravi.aryan
Advisor

Re: Sending Mail using HP-UX

Hi Cedrick,

mail.luser_relay was a mistake on my part.
In fact I had wrongly specified the mail server name...

The host file contains:

172.16.100.222 main main.dcdm.mu

nsswitch.conf : I do not know what I should modify in it.. Please guide me..

Contents of etc/mail is:
# cd /etc/mail
You have mail in /var/mail/root
# pwd
/etc/mail
# ls
aliases mailcap sendmail.cw service.switch
aliases.db sendmail.cf sendmail.pid
#

Thanks
Ravi
Yogeeraj_1
Honored Contributor

Re: Sending Mail using HP-UX

hi again,

check your /etc/nsswitch.conf
and
/etc/mail/service.switch files.

Set the two values to:

hosts files dns
aliases files

May be a name resolution problem.

Verify whether there are the MX records (or not) in your DNS server. When sendmail gives up on a hostname, see how it will figure out where to send the mail for a given destination:

nslookup -type=mx mail.dcdm.mu

revert

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
mobidyc
Trusted Contributor

Re: Sending Mail using HP-UX

Hello,

please correct your /etc/hosts file, replace:
172.16.100.222 main main.dcdm.mu
by
172.16.100.222 mail mail.dcdm.mu

and restart your sendmail.
if the problem is not solved, post /etc/mail/service.switch and /etc/nsswitch.conf for config checking.

Regards,
Cedrick Gaillard.
Best regards, Cedrick Gaillard
ravi.aryan
Advisor

Re: Sending Mail using HP-UX

Hi Guys,

I did the nslookup for the mail.dcdm.mu, it resolved it using the etc/hosts file.

However there is no services.switch and nsswitch.conf in the etc folder

Thanks
Ravi
mobidyc
Trusted Contributor

Re: Sending Mail using HP-UX

Hello Ravi,

does your problem is solved ?

Regards,
Cedrick Gaillard
Best regards, Cedrick Gaillard
ravi.aryan
Advisor

Re: Sending Mail using HP-UX

Hi Cedrick,

The mail goes but I do not receive anything...

Thanks
Ravi
mobidyc
Trusted Contributor

Re: Sending Mail using HP-UX

Hello,

and now, what appears in your mail.log ?

do you still have transient parse error ?
(it's a name server time out error)

Regards,
Cedrick Gaillard
Best regards, Cedrick Gaillard
ravi.aryan
Advisor

Re: Sending Mail using HP-UX

Hi Cedrick,

Unfortunately I am still stuck.. The log file shows that the transient error is still there..

I have not obtained any nsswitch.conf file

However I am attaching sendmail.cf and service.switch for your perusal.

Thanks a lot
Ravi
mobidyc
Trusted Contributor

Re: Sending Mail using HP-UX

Hi Ravi,

in /etc/mail/sendmail.cf replace:
hosts dns files
by
hosts files dns

and restart sendmail.
this will fix the order of a domain name resolution in sendmail.

for nsswitch.conf do :
ls /etc/nsswitch*

this will list example files for nsswitch.conf, select them you want to use and copy it in /etc/nsswitch.conf.
(i'm at home with no hpux access for obtain file name example).

your nsswitch.conf will be something like that:
passwd: files
group: files
hosts: files [NOTFOUND=continue TRYAGAIN=continue] dns
networks: files
protocols: files
aliases: files
services: files

hope your problem will be solved after that ;)

Regards,
Cedrick Gaillard
Best regards, Cedrick Gaillard
ravi.aryan
Advisor

Re: Sending Mail using HP-UX

Hi Cedrick,

Its today that I am back in the office.. I am going to try and give you a feedback promptly..

Thank you
Ravi
ravi.aryan
Advisor

Re: Sending Mail using HP-UX

Hi Cedrick,

Just tried what you suggested.. I still get the transient error..

I'll clarify something: the domain on which I log on is called main using windows, and the mail server is on a domain dcdm.mu....

The HP-UX has an oracle applications installed on it and is not a domain controller either.. I need to send mail locally on Unix so that I can extend the logic to Oracle Workflow at a later stage...

Also there is no nsswitch.conf file, I verified..

Regards
Ravi