Sponsored Content
Full Discussion: Log and Mail problem
Top Forums UNIX for Dummies Questions & Answers Log and Mail problem Post 302173312 by chris1234 on Thursday 6th of March 2008 09:17:27 AM
Old 03-06-2008
Thanks praveenvi. I do not get the error now. I have to test it to see if that mail functionality works or not. But its very wiered that this same mail function i used for my other program and never had a problem but when i used in this script it give me error.

One more question so right now my if statement looks like this :-

Code:
 if [ $? != 0 ]; then
    echo "Error occured"
     mailx -s \ "File Transfer Failed" \ "abc@xyz.com"
    scp failed from SUPRA to FERRARI
   `date`
    echo "File Transferred failed from SUPRA to FERRARI `date +%n%m/%d/%Y%n%H:%M:%S`" >>$LOCAL_LOG_FILE 2>&1

My question is that is :-

scp failed from SUPRA to FERRARI
`date`

will be added in the description of the mail or not?

Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Problem with mail

what I have to write in a shell that every time that it arrives a new e-mail has to perform a program taking some data from the e-mail. (2 Replies)
Discussion started by: mmistero
2 Replies

2. UNIX for Dummies Questions & Answers

E-mail problem

Is it true that you need port 110(POP3) to be open for sending email out ?? I can send email out fine but when I check my port 110 is not open. The problem I have is that I can not receive email at all or can not send email locally (between my users). Here is what I get using the netstat... (6 Replies)
Discussion started by: guest100
6 Replies

3. UNIX for Advanced & Expert Users

mail problem !!

Hi, Below a try to send an email to a local user can be seen. I can NOT send e-mail anywhere, but I receive email perfectly. <pre> isgsi01(root)10: mail aris < /home/aris/mail2send dbm map "Alias0": unsafe map file /etc/mail/aliases: No such file or directory </pre> ..... but the... (3 Replies)
Discussion started by: guest100
3 Replies

4. UNIX for Dummies Questions & Answers

mail problem (NOT Mail or Mail.app)

When I try to use the CLI mail, I get the following error. What's wrong? Welcome to Darwin! % mail root Subject: test test . EOT % /etc/mail/sendmail.cf: line 81: fileclass: cannot open /etc/mail/local-host-names: Group writable directory Do I just need to change the... (1 Reply)
Discussion started by: chenly
1 Replies

5. UNIX for Dummies Questions & Answers

Problem with mail

Hello! I have to servers with Solaris 2.7. I mail from first to second ( mailx user@dev < letter ). But mail not arrive to second. It return by daemon with explanation: .... --- Transcript of session follows --- 550 5.1.2 user@dev... Host unknown (Name server: mailhost.serv.dom: host not... (2 Replies)
Discussion started by: Colf
2 Replies

6. UNIX for Dummies Questions & Answers

Problem with mail.

Hello! I have two servers with Solaris 2.7 I send mail from first to second. The first is also dns. It's known as "ns.oldb.pkb", second is "dev.pkb". Ping works successful from 1 to 2 and vice verse. But when I am trying on first server : sendmail -v user@dev.pkb < /etc/motd it is... (3 Replies)
Discussion started by: Colf
3 Replies

7. Red Hat

Mail Problem. Maybe, it is a DNS Problem!

Hi, i've a redhat linux 9 upadated by redhat from 7 version to 9 version. A couple of days ago i was a problem with my mail, in other words i'm not able to get any email nor to send any email. I've a proxy configuration and i tried to set iptables in order to verify the port. The 110,255 and 995... (1 Reply)
Discussion started by: pintalgi
1 Replies

8. UNIX for Advanced & Expert Users

HP UX mail problem

I am uxing HP UX mailx, I want to send mail with: 1) to list 2) cc list 3) sender address 4) mail body 5) subject 6) attachment I am using : (cat cc_list; cat mail_body; ux2dos file_1 | uuencode attachment.txt)|mailx -m -s "subject" -r sender@abc.com recepient@abc.com cc_list... (2 Replies)
Discussion started by: gautamadak
2 Replies

9. UNIX for Dummies Questions & Answers

Mail Problem

Hi All, I am having a problem that is very similar to the one being discussed here. I am using OS X and am trying to send mail from the OS X Terminal to my GMail account. The mail seems to go through, but gets stuck at Google's servers. I have a log file from the /var/mail directory that... (0 Replies)
Discussion started by: danielsutton
0 Replies

10. Shell Programming and Scripting

Log search and mail it if the log is updated before 24 hours from the current time

Hi , We have around 22 logs , each has different entries. I have to automate this using shell script. The ideas which am sharing is given below 1) We use only TAIL -100 <location and name of the log> Command to check the logs. 2) We want to check whether the log was updated before 24... (13 Replies)
Discussion started by: Kalaihari
13 Replies
mail(1B)					     SunOS/BSD Compatibility Package Commands						  mail(1B)

NAME
mail, Mail - interactive message processing system SYNOPSIS
/usr/ucb/mail ... /usr/ucb/Mail ... DESCRIPTION
/usr/ucb/mail and /usr/ucb/Mail are provided as links to /usr/bin/mailx. See mailx(1) for more information on the usage of these commands. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: /usr/ucb/mail +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ /usr/ucb/Mail +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ SEE ALSO
mailx(1),attributes(5) SunOS 5.11 19 Aug 1998 mail(1B)
All times are GMT -4. The time now is 08:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy