General
cancel
Showing results for 
Search instead for 
Did you mean: 

How can i get unix to send an email

SOLVED
Go to solution
Mousa55
Super Advisor

How can i get unix to send an email

Hi
how do i send the message to my E-mail from HP unix server (rp8420 11.11i).
this e-mail include logs file and another information about DB in server.
how do i this?
19 REPLIES
Shrikant Lavhate
Esteemed Contributor

Re: How can i get unix to send an email

Hi,

use mail command. and attahced the files using redirector. Before attching make a tar file all logfiles you want to attched.

Will it remain a personal, if I broadcast it here!
Jeeshan
Honored Contributor

Re: How can i get unix to send an email

Hi Nejad

develop a shell script about system information to mail you.
But first thing you must sendmail configuration in HP-UX server.

About DB information you can make a procedure in your database which will also mail you.
a warrior never quits
Shrikant Lavhate
Esteemed Contributor

Re: How can i get unix to send an email

Yes, ahsan is more deep and efficient way to your problem. What i have suggested is simple command line way for short type of mails. :D
Will it remain a personal, if I broadcast it here!
Mousa55
Super Advisor

Re: How can i get unix to send an email

Hi
i need by step how to unix server send to me
message to my e-mail (exchange server).
plz help me
thanks
Shrikant Lavhate
Esteemed Contributor

Re: How can i get unix to send an email

Simple format

#mail -s "Subject:...." abe@xyz.com
you can use -t option to send mail to Unix account only.

Embed this format into your script to automate the process.

Ahsan may put some light on script you can use. Check man page for mail for more details.
Will it remain a personal, if I broadcast it here!
Jeeshan
Honored Contributor

Re: How can i get unix to send an email

Nejad

Did you configure your sendmail to send mail to exchange server?
a warrior never quits
Shrikant Lavhate
Esteemed Contributor

Re: How can i get unix to send an email

FYI,

Internet express for HPUX is shipped with many utilities like fetchmail, Hypermail etc. which are related to file transfer and mailing in hpux.

You can have a look at this toolkit on www.software.hp.com

You may find this useful.
Will it remain a personal, if I broadcast it here!
Mousa55
Super Advisor

Re: How can i get unix to send an email

hi
no i am not configured, and how i do it?
thanks
Shrikant Lavhate
Esteemed Contributor

Re: How can i get unix to send an email

Here you go:

Installing and Administering sendmail

http://docs.hp.com/en/B2355-90685/ch04.html
Will it remain a personal, if I broadcast it here!
Jeeshan
Honored Contributor
Solution

Re: How can i get unix to send an email

Follow the below steps

1.configure macro DS to DSexchange_relau_name
- configure macro Dj$w. to Dj$w.
- put to /etc/hosts (don't forget the dot at the end)

2. - start end stop sendmail to take modifications in sendmail.cf active.
- configure exchage to accept relay this host.

3. Save and quit sendmail.cf
4. start the sendmail service
a warrior never quits
Yogeeraj_1
Honored Contributor

Re: How can i get unix to send an email

hi,

First of all, you should configure sendmail on your HP-UX server.

/etc/sendmail.cf

Modify line:
DS

Restart the sendmail process:
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start


Test mail:
e.g.
sendmail < /etc/hosts


Please try the above and let us know.

Kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Mousa55
Super Advisor

Re: How can i get unix to send an email

Hi
i have some question
1-the /etc/sendmail.cf file is not found.

2- what you mean with and
>

thanks
Mridul Shrivastava
Honored Contributor

Re: How can i get unix to send an email

can u check if sendmail is installed on the server???

swlist -l product | grep -i sendmail
Time has a wonderful way of weeding out the trivial
Mousa55
Super Advisor

Re: How can i get unix to send an email

Hi
# swlist -l product | grep -i sendmail
PHNE_29774 1.0 sendmail(1m) 8.9.3 patch
PHNE_29774 1.0 sendmail(1m) 8.9.3 patch
# /usr/bin/ksh: syntax error: `(' unexpected
Yogeeraj_1
Honored Contributor

Re: How can i get unix to send an email

>> 1-the /etc/sendmail.cf file is not found.
man sendmail

At the end, the following configuration files will be listed:
/etc/mail/aliases
/etc/mail/aliases.db
/etc/mail/sendmail.cf
/usr/share/lib/sendmail.hf
/etc/mail/sendmail.st
/var/spool/mqueue/*
/etc/mail/sendmail.pid
/etc/mail/sendmail.cw
/etc/nsswitch.conf

If you do not get this, most probably sendmail is missing.


>> 2- what you mean with and
>

DS

The value that comes after these letters is the name of the mail server which does the relay.

Dj$w.

This specifies your domain name.

hope this helps!

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

Re: How can i get unix to send an email

why it's showing 2 entries... I guess there is some corruption in the patch.. could you please post the o/p of the following:

swlist -l patch -a state |grep -i corrupt
Time has a wonderful way of weeding out the trivial
Jeeshan
Honored Contributor

Re: How can i get unix to send an email

Hi Nejad

Install densmail depot. it will create a folder in /etc where you can find the sendmail.cf file along with many files

BTW why did u install same patch?
a warrior never quits
Mousa55
Super Advisor

Re: How can i get unix to send an email

Hi
now i am found the /etc/mail/sendmail.cf file
but now What is the Modification i can do it in this file and where, to become my ux server send email to my email.
you can find attached file "sendmail file".
thanks

Service Manager_2
Frequent Advisor

Hi Team,   I need a help.   Objective to achieve: Mail he...

Hi Team,

 

I need a help.

 

Objective to achieve: Mail header should change depending upon the certain word or parameter in the mail.

 

1)      In the current environment, HPSM and SCauto is installed in HPUX.

 

2)      I am sending emails to my clients through sendmail utility of UNIX. Emails are being sent as a single header as of now. Example   From: ABC_XYZ

 

Here in this case the administrator email id is ‘smadm@testmail.co’ and the alias name of the same is provided as ABC_XYZ. So, when the email is sent, it looks as:

 

From: ABC_XYZ

 

3)      I want these emails to be sent as double header.

 

          For example: It should check some specific condition or parameter(from the mail), and the mail is supposed to be sent to a different team. For Example ABC_LMN

 

To be more clear, it should fire email as From:ABC_XYZ(if there is an issue with certain list of CI’s in SM)

 

And it should fire email as From From: VDF_ENOC ( if there is an issue with other list of CI’s in SM)

 

 

Raju Singh