Operating System - HP-UX
1826414 Members
4114 Online
109692 Solutions
New Discussion

sending mail from HP-UX through relay

 
yc_2
Regular Advisor

sending mail from HP-UX through relay

Hi,

How to send mail from HP-UX machine through relay.

I had tried the following but without success:
1) Modified sendmail.cf with:-
DS
2) Added sendmail.cw with:-


3) Msg bounced back with:-
..."sender domain must exist" - correct me if I'm wrong that the mail didn't send using the relay.

I also tried sending the mail manually (i.e. "telnet 25" from the HP machine) and it successfully went thro'.

Any advice is appreciated.



YC
9 REPLIES 9
avsrini
Trusted Contributor

Re: sending mail from HP-UX through relay

Hi Yew,
Check in your relay machine to accept and relay mails from your domain.


Srini.
Be on top.
Khalid A. Al-Tayaran
Valued Contributor

Re: sending mail from HP-UX through relay


Hi,

If you don't use DNS you can create a file /etc/nsswitch.conf with the line:

hosts: files [NOTFOUND=continue]

restart sendmail:

/sbin/rc1.d/K460sendmail restart

/sbin/rc2.d/S540sendmail start


Good luck.
Khalid A. Al-Tayaran
Valued Contributor

Re: sending mail from HP-UX through relay


Hi,

If you don't use DNS you can create a file /etc/nsswitch.conf with the line:

hosts: files [NOTFOUND=continue]

restart sendmail:

/sbin/rc1.d/K460sendmail stop

/sbin/rc2.d/S540sendmail start


Good luck.
yc_2
Regular Advisor

Re: sending mail from HP-UX through relay

Thanks Srinisavan,

If I can perform manually "telnet 25" and sent successfully, does it mean that the relay machnie is configured to accept the mail coming from HP machine for relay ?

Thanks Khalid,

The HP machine is using DNS.


YC
Justo Exposito
Esteemed Contributor

Re: sending mail from HP-UX through relay

Hi,

Do you stop and start the sednmail daemon in order to update the configuration?
sbin/init.d/sendmail stop
sbin/init.d/sendmail start

Regards,

Justo.
Help is a Beatiful word
Justo Exposito
Esteemed Contributor

Re: sending mail from HP-UX through relay

Hi,

I had defined the sendmail.mc file like that:
LOCAL_CONFIG
define(`SMART_HOST', `correo')dnl
FEATURE(accept_unresolvable_domains)
FEATURE(redirect)dnl
FEATURE(use_cw_file)dnl
FEATURE(nodns)dnl
MAILER_DEFINITIONS
MAILER(smtp)dnl

Where "correo" is the relay host name included in the /etc/hosts file and in the sendmail.cf at the "DS" section.

You must stop/start sendmail in order to update the configuration as well.

Do you see the /var/adm/syslog/mail.log file in order to know the posible errors.

Regards,

Justo.
Help is a Beatiful word
F Verschuren
Esteemed Contributor

Re: sending mail from HP-UX through relay

the error is: sender domain must exist

So the domain you are using is not known, mail is having a mad habited that it looks ad the first line in the hosts file for a domain.
Your hosts file now is looking properly like:
11.11.11.5 systemname.domain
But must look like:
11.11.11.5 systemname
11.11.11.5 systemname.domain
If this is changed your mail will properly not have this error anymore.
I known it does not make match sense but this was my solution to a similar problem.
W.C. Epperson
Trusted Contributor

Re: sending mail from HP-UX through relay

If you can hand-roll an e-mail with telnet and get it accepted, the thing is to figure out what your sending machine is doing differently with sendmail than you are with telnet. It's probably the hostname in the HELO command (look at Received: headers). But also look at the From: address on the bounced mail--if your sendmail.cf DM is screwed up, your server may be munging addresses trying to "masquerade" them.
"I have great faith in fools; self-confidence, my friends call it." --Poe
Chuck J
Valued Contributor

Re: sending mail from HP-UX through relay

Make sure

* /etc/rc.config.d/netconf is correct with IP, name, default gateway & subnet mask

* /etc/resolv.conf has the correct info e.g:
domain yourdomain.com
nameserver x.x.x.x

Also make sure your full domain name (hostname in the /etc/rc.config.d/netconf and the domain in /etc/resolv.conf) is configured on the nameserver as specified in /etc/resolv.conf

Then, the default sendmail should work fine.

Chuck J