LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-11-2016, 05:12 AM   #1
starqazi
LQ Newbie
 
Registered: Jul 2012
Posts: 10

Rep: Reputation: Disabled
Smile Error while sending mail with mailx


Hi All,

I am getting following error while sending mail with mailx through shell script.

*********************
temporary mail file: No such file or directory
*********************

Permission for /tmp given below:

drwxrwxrwt. 18 root root 4096 Feb 11 16:07 tmp

Size for /tmp is:
80K tmp

Waiting for your kind and immediate response.

Regards,
Qazi Mohammad Shahnawaz
 
Old 02-11-2016, 07:30 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 23,188

Rep: Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476
Quote:
Originally Posted by starqazi View Post
Hi All,
I am getting following error while sending mail with mailx through shell script.

*********************
temporary mail file: No such file or directory
*********************

Permission for /tmp given below:
drwxrwxrwt. 18 root root 4096 Feb 11 16:07 tmp

Size for /tmp is: 80K tmp

Waiting for your kind and immediate response.
We volunteer our time here...if you need an 'immediate response', then your best course of action would be to hire someone. Otherwise, asking for/expecting 'immediate' help is fairly rude. Also, you need to read the "Question Guidelines" link in my posting signature, because unless you provide actual DETAILS, there is nothing we can tell you. You don't tell us what version/distro of Linux, post your shell script, or really give us anything to go on.

Also, since you need 'immediate' help, did you try just putting that error into Google, along with the "mailx" term??? Because it pulls up LOTS of information, and tells you exactly why you're getting that message, and how to fix it.
 
1 members found this post helpful.
Old 02-11-2016, 11:39 PM   #3
starqazi
LQ Newbie
 
Registered: Jul 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
Linux version and Shell script

Thanks for response.

My linux version is:

Linux XXXXXXXXX 2.6.32-504.23.4.el6.x86_64 #1 SMP Tue Jun 9 08:39:04 PDT 2015 x86_64 x86_64 x86_64 GNU/Linux
*************************************************************
My Shell script is:

#! /bin/ksh
prog=`echo $0 | sed 's/.*\///g;s/\.sh//g'`.sh # extract script name
prog1=`echo $0 | sed 's/.*\///g;s/\.sh//g'`
HOST=`uname -a | awk '{print $2}'`; export HOST

export ORACLE_SID=$1
export ORACLE_HOME=$2
export SCRDIR=$dba_bin
export cur_date=$(date +%d/%m/%y)
stamp=`date +%m/%d@%H.%M`
echo "Begin time: `date`"

DBA_LIST=`grep dba_ei $dba_config/.ob_config.env | cut -d= -f2`
MsgFile=$mon_log'/'$prog1'_'$ORACLE_SID.msg

function WarnMes
{
echo $stamp
echo $stamp >$MsgFile
ScriptLoc='Script - '$HOST':'$SCRDIR'/'$prog
echo $ScriptLoc
echo $ScriptLoc >>$MsgFile
echo ' ' >>$MsgFile
echo $MSG
echo $MSG >>$MsgFile
}




users_pwd=$dba_config/jobs.ctl
DBAUSER=`grep DBA_$ORACLE_SID= $users_pwd | cut -d= -f2`
###################################################################################
#Get a dump of all the indexes where owner is SCOTT
###################################################################################

#${ORACLE_HOME}/bin/sqlplus /nolog << EOF
#connect $DBAUSER@$ORACLE_SID
${ORACLE_HOME}/bin/sqlplus $DBAUSER@$ORACLE_SID @$dba_sql/check_alert_errors.sql
if [ -s $mon_log/alert_errors.lst ];
then
WarnMes
echo " Following Errors/Warnings found in Alert Log File for $ORACLE_SID: on $HOST on $cur_date" >>$MsgFile
cat $mon_log/alert_errors.lst >>$MsgFile
cat $MsgFile | mailx -s 'Errors/Warnings found in Alert Log for '$ORACLE_SID' on '$HOST' on '$cur_date'' $DBA_LIST

else
WarnMes
echo "No Errors found in Alert log File for instance $ORACLE_SID on $cur_date' >> $MsgFile
fi


echo "End time: `date`"

*****************************************************************

Thanks & Regards,
Qazi

Last edited by starqazi; 02-11-2016 at 11:41 PM.
 
Old 02-12-2016, 01:11 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 23,188

Rep: Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476
Quote:
Originally Posted by starqazi View Post
Thanks for response.
My linux version is:

Linux XXXXXXXXX 2.6.32-504.23.4.el6.x86_64 #1 SMP Tue Jun 9 08:39:04 PDT 2015 x86_64 x86_64 x86_64 GNU/Linux
No, that's the kernel version. Version/distro of Linux is just that...something like "CentOS 6.5" or "Mint 17". This tells us nothing.
Quote:
*************************************************************
My Shell script is:
...not in CODE tags, and is hard to read without them. And it also doesn't matter, since you haven't apparently tried to look up the error, as it was suggested you do.

AGAIN did you try to look up the error???? You're not setting a TMPDIR variable in your script, and you say that /tmp is 80K?? That's tiny, so redirect it somewhere else.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
squirrer mail- error while sending mail centos123 Linux - Server 6 04-21-2011 12:08 PM
Sending mail with mailx version 12.1 stf92 Linux - General 1 07-19-2010 03:38 PM
mailx sending mail via axigen johnh10000 Linux - Server 2 02-24-2010 08:37 AM
Sending mail by mailx command? lifeforce4 Debian 2 07-28-2008 05:00 PM
Composing and sending HTML mail from mailx stv_t Solaris / OpenSolaris 2 03-15-2004 03:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration