1752689 Members
5261 Online
108789 Solutions
New Discussion юеВ

mailx/sendmail

 
SOLVED
Go to solution
10ft
Occasional Advisor

mailx/sendmail

With an hpux workstation i have to send e-mail in a script via mailx.
My smtp server is on another computer.
My problem is that i do not know
how to configure mailx ? sendmail ?.
I wish send message via my smtp server (is on a linuxbox) that is on internet.
Thanks
5 REPLIES 5
Radhakrishnan Venkatara
Trusted Contributor

Re: mailx/sendmail

hi,

this is very simple.

go to /etc/mail/ edit sendmail.cf

add the hostname of linux smtp server in sendmail.cf .

thereis entry called DS which is known as smart relay host.
so the mails from the workstation will be forwarded to linux.

but make sure linux will accept the mails from this workstation,
incase u configured access file linux sendmail go to /etc/mail/access add the ipaddress of the workstation.

/etc/mail/access
ipaddress RELAY

then use mailx to check it.

u can even use sendmail to check whether it is working.

sendmail -v user@domain < /dev/null

it gives full detailed output of the connection.

radhakrishnan
Negative thinking is a highest form of Intelligence
T G Manikandan
Honored Contributor
Solution

Re: mailx/sendmail

In your /etc/mail/sendmail.cf

file

Make sure that you have these entries.

1.
DSeg.
DSpsldns
(psldns is my smtp server name)

2.add the domain name to Dj$w

Dj$w.hp.com

Make sure that you could do a nslookup of your smtp server



#nslookup

If this is not working check whether the smtp server name is there on the DNS server for to resolve.
or check whether it is there in your hosts file.


Restart sendmail.
/sbin/init.d/sendmail stop & start.


Post your results

Thanks
10ft
Occasional Advisor

Re: mailx/sendmail

Hi
My linux smtp server has Qmail ans I am sure accept relay from any computers 172.16.
I changed DS entry (DSlinux)
but when i try to send a message
via mailx the messages goes in queue

Here the resoult of maiq and some logs


DAA01382 972 Sat Apr 26 03:21 root
(host map: lookup (hp.com): deferred)
aaaa@hp.com


Apr 26 03:21:36 cad100 sendmail[1386]: DAA01386: from=root, size=1097, class=0, pri=31097, nrcpts=1, msgid=<200304260121.DAA01386@studio.mio.>, relay=root@localhost
Apr 26 03:21:36 cad100 sendmail[1386]: DAA01386: to=aaaa@hp.com, delay=00:00:00, mailer=relay, stat=queued



Thanks ;-)
T G Manikandan
Honored Contributor

Re: mailx/sendmail

Do u have the /etc/nsswitch.conf?

What entries you have in your /etc/nsswitch.conf?

Thanks
10ft
Occasional Advisor

Re: mailx/sendmail


Hi

My /etc/nsswitch.conf

hosts: files[NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=continue UNAVAIL=continue TRYAGAIN=continue] files

with my DNS server i resolv only
local address as (linux) my smtp
"external" server.
If a send an e-mail via Netscape-Mail configured with outgoing SMTP server (linux) it all OK ;-)

Thanks ;-)