events send mail to admin -

Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Answers to Frequently Asked Questions How do I send email? events send mail to admin -
# 1  
events send mail to admin -

Hi everybody !!

I want to do something and I can't figure out. The idea is that a script should send an email when a backup is done.
It works with a unix account (like root) but what I really want is to send that email to other account like

I have a mail server installed in other computer, all these boxes are running solaris 9.

I believe that I should tell the box that is running the backup script to send the email using other mail server, but I don't know how to do it.

Also, as a test, I tried: mail -t, and it doesn´t work. (of course the email acount exist...)

So if someone can help me, I'll send a pack of six beers...

Thanx a lot.
# 2  
it really depends on how your doing the backup in the first place.

for me. i run my backups via cron and i have the output goto the cronusers email. you can always pipe the output to the mail command and then you can specify which user.

some backup software allows you to configure users to be notified when an event happens. so i would check your software docs and see what you can come up with, or talk with the people that manage the backups and set it up in the first place they would prolly have the most valuable information for you.
# 3  
No, it is just a normal script like:

# !/bin/bash

cd /tmp
cp /tmp /home/mystuff

# and when the copy is done I want to be informed by mail
# but not to my unix account like root, I want the mail to, for # example,



Thanks for your help
# 4  
You can create a shell script and test to see if it executes without error. If it executes without error, then you can email a success message; if with error, you can email an error message.

Take a look at error codes, for example:

ps aux | grep grep | grep -v grep ; echo $?

Then try:

ps aux | grep grep; echo $?

Are the results the same? Why not?
This User Gave Thanks to Neo For This Post:
# 5  
Thanks, but my problems is not with the script, what I really don't know how to do is sending the mail from a command.

mail -t sends a mail only to unix account and I want to send the mail to an "outside" mail account like

Thanks again.
# 6  
Try this:

echo "Hello World!" | elm -s "Hello World Message"
# 7  
I think mailx is the standard front-end for sendmail and elm is HP-UX only(?)

echo "Hello World!" | mailx -s "Hello World Message"

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #832
Difficulty: Medium
JSON is a data serialization format.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies

2. HP-UX

Send Audit Events to Syslog

Hi guys, I am currently runnig hp-ux v11.3. I have enabled auditing and I am able to send the audit events to a text file in syslog format using the following command: audisp -r /var/.audit/audtrail/auditfile -P -o follow -O sync | audit_p2l > /var/adm/auditlog I am required to send the... (0 Replies)
Discussion started by: peter maisiba
0 Replies

3. Ubuntu

Not able to send mail out of UbuntuBox in send mail

Hi Guys.. yesterday i purchased a VPS server and installed sendmail on ubuntu 12.4 with Webmin & Apache runing webserver problem is.. i can send mail via webmin user interface account to anybody to out side to any domain and able to recieve any mail from any domain.. Now main... (2 Replies)
Discussion started by: cmdman
2 Replies

4. Shell Programming and Scripting

How to send mail using PHP mail function On apache server.?

Hello, I am using centos-6.2 I have apache server,php5 on my system and I want to send mail using sendmail on my system. when I try to send mail from shell that time mail is succesfully sent to respective address() but when I try to send it through webbrowser I am not able to send it.... (1 Reply)
Discussion started by: Kiran ursal
1 Replies

5. UNIX for Advanced & Expert Users

How can I send a mail from my outlook or other mail accounts to UNIX server?

Hi all, I want to send a mail for my business needs from outlook account to an unix server (HP-UX) but I don't send any mail. While I can send from the unix server to my outlook account, I can't send from outlook to unix. How can I achieve this ? How can I send a mail from my outlook or other... (2 Replies)
Discussion started by: igelegin
2 Replies

6. UNIX for Advanced & Expert Users

need to configure mail setting to send mail to outlook mail server

i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail. actually i am trying to automate the high... (2 Replies)
Discussion started by: amitranjansahu
2 Replies

7. UNIX for Dummies Questions & Answers

How to send html file in a mail not as an attachment but it should display in the mail in table for

Hi The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment . cat Employee.sql SET VERIFY OFF SET PAGESIZE 200 SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON - HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies

8. UNIX for Advanced & Expert Users

send attachments using send mail in Solaris

Hi All, I have a requirement to send and email of body html with an attachment. concatinating uuencode output to the mail body with mailx command works, but as my Email body is of HTML type i use sendmail. my command to send HTML body is as below: export MAILTO=""... (1 Reply)
Discussion started by: mohan_kumarcs
1 Replies

9. UNIX for Dummies Questions & Answers

I am not able to send mail form unix to other mail accounts.

Using Mailx command i.e mailx -s "subject" < \tmp\chin this command executed sucessfully but not able to receive the mail in please help. (1 Reply)
Discussion started by: chinnigd
1 Replies

10. UNIX for Dummies Questions & Answers

can not send mail from unix server to company/yahoo mail

hi, Gurus, I need some help with sending mail out from my UNIX server: It is running Solaris 2.6 and the sendmail version is 8.8. Output of :/usr/lib/sendmail -d0.1 -bt < /dev/null Version 8.8.8+Sun Compiled with: LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND NDBM NETINET ... (5 Replies)
Discussion started by: b5fnpct
5 Replies

Featured Tech Videos