I know the command "mailq" can be used to check any mail is pending , if I would like to get the alert if the no. of pending mail is over 500 , would advise what can I do , if a script can do that ? very thanks
#!/bin/ksh userid="chansd" filename="/apps/log/check.txt" while true ;do touch $filename pass=`/apps/eDMZ/call_st.ksh $userid` sleep 20 rm $filename done
#!/bin/ksh filename="/apps/log/check.txt" if [ -f "${filename}" ] then if test "`find $filename -mmin +2`" then echo "script is not working ! Please act on it" | mail -s "Script is not working" Example@mail.com fi else exit 1 fi
function tx_unreachable_msg() { LOGLINE="[$DATE] no ip service unreachable" typewriter "$NOIPSERVICE niet bereikbaar" .1 sleep 1 typewriter "Mail wordt verzonden naar $email" .1 mail -s "NO ip mail error" "$email"<<EOF dynupdate.no-ip.com niet bereikbaar @ $DATE EOF }
echo "Test Mail" | mail -s "Test" me@mydomain.com
mail -s "test" | /usr/sbin/mail myemail@domain.com
sendmail -v my@email.com < /dev/null
telnet mail.ourdomain.com 25 helo mail.ourdomain.com mail from: unknown@anyname.com rcpt to: anyemailid@ourdomain.com data from: "Any Unknow name" <unknown@anyname.com> to: "Some user Name" <anyemailid@ourdomain.com> subject: Testing MTA with telnet Hi, This way anybody can fool us. Regards, . quit