1833095 Members
2982 Online
110050 Solutions
New Discussion

Send email from HP-UX

 
Vita
Occasional Contributor

Send email from HP-UX

Hi,
I want to send email from HP-UX 11 to any internet user(like user@hotmail.com).
What processes/parameters should be run/set/checked?

Thanks in advance,
Vita
8 REPLIES 8
RAC_1
Honored Contributor

Re: Send email from HP-UX

First set smart relay host parameter in sendmail.cf Check Dj macro. Once set you can send email to anyone on internet.

Anil
There is no substitute to HARDWORK
KapilRaj
Honored Contributor

Re: Send email from HP-UX

You need to register and get an official host name from NIC
You need to be wired to internet
Install sendmail product and configure it there are number of posts here as well as documents avail in docs.hp.com .

you can use mail / mailx commands to send an email out

Regds,

Kaps
Nothing is impossible
RAC_1
Honored Contributor

Re: Send email from HP-UX

It is not Dj macro, it is DS macro.

Anil
There is no substitute to HARDWORK
Jeff Schussele
Honored Contributor

Re: Send email from HP-UX

Hi Vita,

Once you have sendmail configured properly then you can use tha mailx command to actually send the mail.

To send the contents of a file - use

cat filename | mailx -s "Your subject here" user@company.com

To attach a file you also need uuencode

uuencode filename filename.out | mailx -s "Subject here" user@company.com

and filename.out will be attached to the mail going out.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Steven E. Protter
Exalted Contributor

Re: Send email from HP-UX

Test code:

sendmail -v -d8.99 -d38.99 someone@yahoo.com
type some text

.


If you have DNS resolution set in nsswitch.conf and good DNS servers in /etc/resolv.conf you need not change a thing.

If your firewall blocks port 25 you must follow the procedures posted above.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Fabio Ettore
Honored Contributor

Re: Send email from HP-UX

Hi,

as ITRC forum people said you can use sendmail.
Anyway try too elm; just launch

# elm

and will run a friendly interface in order to send mail (with attachment too).

HTH.

Best regards,
Ettore
WISH? IMPROVEMENT!
Vita
Occasional Contributor

Re: Send email from HP-UX

Thanks all guys!!
Steven: I don't have /etc/resolv.conf ,
/etc/nsswitch.conf has this text:

hosts: files [NOTFOUND=CONTINUE] dns

and your test gives a long listing (attached)

RAC: I've set smart relay host parameter in sendmail.cf :
DS company-exchange-server

and restart sendmail, but still haven't gotten any email

Vita


Rita C Workman
Honored Contributor

Re: Send email from HP-UX

Well Vita,

Is your DNS configured correctly ? Can you resolve to outside:

try doing a couple nslookups:
nslookup www.hotmail.com

If it can't return an address for you than you have resolution issues. You probably need to define the /etc/resolv.conf and point to your DNS server. Then retry an nslookup again. Once you can resolve, then try again.

Also to get some easier sendmail debugging info, I like to use:

sendmail -v person@anycompany.com

It will return your cursor and you type your message, on the very last line just type a 'period' and hit return. It will show you where the mail is having problems sending.

Just a thought,
Rita