1855733 Members
1933 Online
104103 Solutions
New Discussion

Re: How to send mails

 
rolando diaz_1
Occasional Contributor

How to send mails

Hi
I want to send a mail from my server RP7410
to e-mail address.
What are the configuration files ?

I have up the sendmail daemon and HP-UX
version 11i.

Thank
Rolando
8 REPLIES 8
harry d brown jr
Honored Contributor

Re: How to send mails


TO send mail:


mail username@mailserver.com
message body here
more body here
and more
until you have a line with just a PERIOD on it
like below
.


live free or die
harry
Live Free or Die
harry d brown jr
Honored Contributor

Re: How to send mails

If you want to send files, then:

for i in `echo filename1 filename2 filename3 ...`
do
uuencode $i $i.txt
done|mailx -m -s "test" username@whereever.com


live free or die
harry
Live Free or Die
Daimian Woznick
Trusted Contributor

Re: How to send mails

If you haven't configured sendmail yet, you shouild do a man on sendmail to get further information. The following files may also be important for you:

/etc/mail/aliases - raw data for alias names
/etc/mail/aliases.db - data base of alias names
/etc/mail/sendmail.cf - configuration file
/usr/share/lib/sendmail.hf - help file
/etc/mail/sendmail.st - collected statistics
/var/spool/mqueue/* - mail queue files
/etc/mail/sendmail.pid - The process id of the daemon
/etc/mail/sendmail.cw - The list of all hostnames that are recognized as local, which causes sendmail to accept mail for these hosts and attempt local delivery
/etc/nsswitch.conf - configuration file for the name-service switch


These are taken from the man page in case you were wondering. You may have further questions on this.
Arockia Jegan
Trusted Contributor

Re: How to send mails

If you have sendmail.cf file configured properly the following commands will send the mails with out any issues,

#mailx -s

Type the message....

Once you have done enter dot (.)


#echo "" | mailx -s
#mailx -s < "message"
Sridhar Bhaskarla
Honored Contributor

Re: How to send mails

Check with your DNS/mail administrator and find out if you have to specify a "smart relay host" in your sendmail.cf. If so, append it to
the line that starts with DS in /etc/mail/sendmail.cf and restart sendmail to send mail to the outside of your domain.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Ron Gordon
Advisor

Re: How to send mails

It's very easy. The hardest part is getting information from your mail administrator.
(Note: this is for 11.00 I assume it is the same for 11i)

1) vi /etc/mail/sendmail.cf
Change Dj$w.Foo.COM
To Dj$w.acme.com (or whatevery your domain name is)

2) get smtp access to your email server (e.g. mailsvr1) i.e. if there is a firewall between your HP box and the mail server open port 25

3) vi /etc/mail/sendmail.cf (same file as step 1)
Change DS
to DS mailsvr1.acme.com

4) stop and start sendmail
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

5) Send in body of e-mail
mailx -s 'Subject line' ron.gordon@bellnexxia.com

# To send as an attachment
#/usr/bin/uuencode // | /usr/sbin/sendmail ron.gordon@bellnexxia.com

Robert Barton_1
New Member

Re: How to send mails

The easy way is to use elm. All your info is there for you and if you just want to send files the quick way is: mail [e-mail address] < filename. Read the man pages on sendmail for more info

Best wishes
Sanjay_6
Honored Contributor

Re: How to send mails

Hi Rolando,

First Configure sendmail on your system. Try this link from hp docs on basic steps on configuring sendmail,

http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90147/B2355-90147_top.html&con=/hpux/onlinedocs/B2355-90147/00/00/35-con.html&toc=/hpux/onlinedocs/B2355-90147/00/00/35-toc.html&searchterms=sendmail&queryid=20020711-071933

To send an email from the system to an email address, if you have sendmail configured, try

cat some_file_name |mailx -s "email subject" your_internet_email_address

Hope this helps.

Regds