Sponsored Content
Full Discussion: maillog - Error Message
Top Forums Shell Programming and Scripting maillog - Error Message Post 302071289 by unknown2205 on Friday 14th of April 2006 12:37:32 AM
Old 04-14-2006
maillog - Error Message

dear expert

Im using shell script to send mail from unix server.

My script like below:
HTML Code:
#! /bin/sh -f
# Set necessary variables
#export PATH
#PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/contrib/bin
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/contrib/bin:$PATH; export PATH
#PATH=/usr/bin:/usr/local/bin:$PATH; export PATH

# Get date

Date="`date +'%b %d %Y'`"
Date1="`date +'%b %d'`"
Date2="`date +'%Y'`"

# The recepient email address

Email="eizu.azwandi@mimos.my";

# Set directory

dir="/home/eizu";
dir_logs="/etc/namedb/log";
cd /etc/namedb/log
process=`more  bind.log | grep "< ours" | wc -l`

tarikh=`date`
echo
echo "Counter: $process"

if [ $process -lt 1 ]; then
      echo "Date checking:$tarikh"
      echo "Message from dns2-test.mynic.net.my - ZONE TRANSFER NO ERROR"
fi

if [ $process -gt 0  ]; then
   echo "Date checking:$tarikh"
   echo "Message from dns2-test.mynic.net.my - ZONE TRANSFER ERROR!"
   `mail $Email -s "TEST message from dns2-test.mynic.net.my" -c "ana@mimos.my" < $dir/zone-transfer-error.txt`
   content=`more $dir_logs/bind.log >> $dir_logs/bind.log-14042006`;
   cp /dev/null $dir_logs/bind.log
fi

but..i've got this errors come ahead

HTML Code:
Apr 14 12:31:01 dns2-test sendmail[29602]: k3E4V1qs029602: from=eizu, size=135, class=0, nrcpts=7, msgid=<200604140431.k3E4V1qs029602@dns2-test.mynic>, relay=root@localhost
Apr 14 12:31:01 dns2-test sm-mta[29603]: k3E4V1qt029603: tcpwrappers (localhost.mynic.net.my, 127.0.0.1) rejection
Apr 14 12:31:01 dns2-test sendmail[29602]: k3E4V1qs029602: to=ana@mimos.my,eizu.azwandi@mimos.my,-c,dns2-test.mynic.net.my,message,from,TEST, ctladdr=eizu (1021/1021), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=210135, relay=[127.0.0.1] [127.0.0.1], dsn=5.0.0, stat=Service unavailable
Apr 14 12:31:01 dns2-test sendmail[29602]: k3E4V1qs029602: k3E4V1qt029602: DSN: Service unavailable
Apr 14 12:31:01 dns2-test sendmail[29602]: k3E4V1qt029602: to=eizu, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31159, relay=[127.0.0.1], dsn=5.0.0, stat=Service unavailable
Apr 14 12:31:01 dns2-test sendmail[29602]: k3E4V1qt029602: k3E4V1qu029602: return to sender: Service unavailable
Apr 14 12:31:01 dns2-test sendmail[29602]: k3E4V1qu029602: to=postmaster, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32183, relay=[127.0.0.1], dsn=5.0.0, stat=Service unavailable
Apr 14 12:31:01 dns2-test sendmail[29602]: k3E4V1qt029602: Losing ./qfk3E4V1qt029602: savemail panic
Apr 14 12:31:01 dns2-test sendmail[29602]: k3E4V1qt029602: SYSERR(root): savemail: cannot save rejected email anywhere
Anyone have suggestion on this??

Thanks
~unknown

Last edited by unknown2205; 04-14-2006 at 04:35 AM..
unknown2205
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

error message

Hi All, occasionally my server gives this error messages "NOTICE:HTFS Out of inodes on HTFS dev hd (1/42)" why ?? Alice. (3 Replies)
Discussion started by: alisev
3 Replies

2. UNIX for Advanced & Expert Users

Error message

Hi, My Solaris 5.8 system keeps getting this error at boot - "Can't set vol root to /vol" then /usr/sbin/vold: can't set vol root to /vol: Resource temporarily unavailiable Any idea what is wrong, and how do I fix it? (1 Reply)
Discussion started by: ghuber
1 Replies

3. UNIX for Advanced & Expert Users

maillog extract

Hi all, below are some text extracted from maillog. I have a cronjob running at 1720 daily and it will send mails to me. it was working fine on the 27 Sept.Sep 27 17:20:01 venus sendmail: k8R9K0OR032710: from=user1, size=580, class=0, nrcpts=1, msgid=<200609270920.k8R9K0OR032710@venus.domain.com>,... (1 Reply)
Discussion started by: new2ss
1 Replies

4. UNIX for Dummies Questions & Answers

Error Message

I keep getting an error message in a script im writing, this line is allways pointed out. if and this is the message i keep getting. line 32: [: 8: unary operator expected Whats wrong with it? Please Help. (5 Replies)
Discussion started by: chapmana
5 Replies

5. UNIX for Advanced & Expert Users

maillog errrors

Watching my maillog this morning i have discovered some errors but I cant track down whats causing them. Jun 16 11:04:12 ws096 sendmail: m5GExW7e006613: Milter (spamass-milter): timeout before data read Jun 16 11:04:12 ws096 sendmail: m5GExW7e006613: Milter (spamass-milter): to error state Jun... (3 Replies)
Discussion started by: mcraul
3 Replies

6. UNIX for Advanced & Expert Users

/var/log/maillog isn't updating. Postfix related

can someone please help me figure how i can get maillog to start updating again? it just all of a sudden stopped. and postfix isn't writing to it anymore. I'm running a Ubuntu box 8.04 thanks (2 Replies)
Discussion started by: SkySmart
2 Replies

7. Solaris

Flood Messages in maillog

Hi All, I am getting large number of messages in below file /www/wls8/logs/HOSTS/tswebd01-zd01/maillog/maillog In past 24 hours, it has been increased by near to 1 GB. Can somebody help in finding, from where these messages are being generated and how to I stop them ? Same kind of messages... (11 Replies)
Discussion started by: solaris_1977
11 Replies

8. Shell Programming and Scripting

Grep out ONLY subject from maillog

I have the following entries in maillog. I need to grep out only the subject part from the following entries. Maillog contain following entries. 2013-11-14 03:30:02 1Vgnd4-001qwZ-36 <= user@domain.com U=user P=local S=9797 id=cd3732bbd0fbda5cb16384bb7d5b465d@localhost.localdomain T="Subject... (3 Replies)
Discussion started by: anil510
3 Replies

9. Shell Programming and Scripting

Filter maillog

Hi, I need to take them all fields SendTo and ip address from a file maillog First I look at all emails from containing the empty field. # zcat /var/log/mail/maillog-20140331.server1.gz | grep "from=<>" | awk '{print $6}' > 1.txt output: Mar 30 23:31:24 servidor1 postfix/smtpd:... (2 Replies)
Discussion started by: Jomeaide
2 Replies
SMRSH(8)						      System Manager's Manual							  SMRSH(8)

NAME
smrsh - restricted shell for sendmail SYNOPSIS
smrsh -c command DESCRIPTION
The smrsh program is intended as a replacement for sh for use in the ``prog'' mailer in sendmail(8) configuration files. It sharply limits the commands that can be run using the ``|program'' syntax of sendmail in order to improve the over all security of your system. Briefly, even if a ``bad guy'' can get sendmail to run a program without going through an alias or forward file, smrsh limits the set of programs that he or she can execute. Briefly, smrsh limits programs to be in a single directory, by default /usr/lib/sendmail.d/bin/ allowing the system administrator to choose the set of acceptable commands, and to the shell builtin commands ``exec'', ``exit'', and ``echo''. It also rejects any commands with the characters ``', `<', `>', `;', `$', `(', `)', ` ' (carriage return), or ` ' (newline) on the command line to prevent ``end run'' attacks. It allows ``||'' and ``&&'' to enable commands like: ``"|exec /usr/local/bin/filter || exit 75"'' Initial pathnames on programs are stripped, so forwarding to ``/usr/bin/vacation'', ``/usr/bin/vacation'', ``/home/server/mydir/bin/vaca- tion'', and ``vacation'' all actually forward to `/usr/lib/sendmail.d/bin/vacation''. System administrators should be conservative about populating the /usr/lib/sendmail.d/bin/ directory. For example, a reasonable additions is vacation(1), and the like. No matter how brow-beaten you may be, never include any shell or shell-like program (such as perl(1)) in the /usr/lib/sendmail.d/bin/ directory. Note that this does not restrict the use of shell or perl scripts in the /usr/lib/sendmail.d/bin/ directory (using the ``#!'' syntax); it simply disallows execution of arbitrary programs. Also, including mail filtering programs such as procmail(1) is a very bad idea. procmail(1) allows users to run arbitrary programs in their procmailrc(5). COMPILATION
Compilation should be trivial on most systems. You may need to use -DSMRSH_PATH="path" to adjust the default search path (defaults to ``/bin:/usr/bin'') and/or -DSMRSH_CMDDIR="dir" to change the default program directory (defaults to ``/usr/lib/sendmail.d/bin/''). FILES
/usr/lib/sendmail.d/bin/ - default directory for restricted programs on SuSE Linux SEE ALSO
sendmail(8) $Date: 2004/08/06 03:55:35 $ SMRSH(8)
All times are GMT -4. The time now is 07:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy