Tag Archives: Subject Output

DNS server /var/spool issue

By Junaid Subhani

Hello all
Currently I am working in a live production environment with 100+ Solaris servers . The environment has one DNS server and one SMTP server.

The problem that I am facing since the past 2 months is that the /var/spool/mqueue on my DNS server keeps getting full i.e. mails with name starting with qfr & dfr keeping on gathering up and I have to manually go and delete these mails.
Some sample outputs of these mail files are given below:

Code:

root@opaldn0: /var/spool/mqueue $ cat dfr238L5KN024487
Your "cron" job on mercury0 couldn't be run
can't change directory to your home directory.
Your commands will not be executed.
The error was "No such file or directory"


Code:

root@opaldn0: /var/spool/mqueue $ cat dfr237i8iY018725
Your "cron" job on mercury1
/med/appl/debmed/bin/runReadgFileS1.sh

produced the following output:

create_log_dir.sh is already running.


Code:

root@opaldn0: /var/spool/mqueue $ cat qfr237oAtK019510
V8
T1362297010
K1362297460
N1
P120613
I0/0/16374
MDeferred: Connection timed out with mercury1.waridtel.com.
Fbs
$_mercury1.waridtel.com [172.21.5.14]
$rESMTP
$smercury1.waridtel.com
${daemon_flags}
${if_addr}172.16.2.28
S
MDeferred: Connection timed out with mercury1.waridtel.com.
rRFC822; debmed@mercury1.waridtel.com
RPFD:
H?P?Return-Path:
H??Received: from mercury1.waridtel.com (mercury1.waridtel.com [172.21.5.14])
by opaldn0.waridtel.com (8.13.8+Sun/8.13.8) with ESMTP id r237oAtK019510
for ; Sun, 3 Mar 2013 12:50:10 +0500 (PKT)
H??Received: (from debmed@localhost)
by mercury1.waridtel.com (8.14.4+Sun/8.13.8/Submit) id r237o5Dc026496
for debmed; Sun, 3 Mar 2013 12:50:05 +0500 (PKT)
H??Date: Sun, 3 Mar 2013 12:50:05 +0500 (PKT)
H??From: Backend BINs operator for mediation
H??Message-Id:
H??To: debmed@mercury1.waridtel.com
H??Subject: Output from "cron" command
H??MIME-Version: 1.0
H??Content-Type: text/plain


It seems that the issue is somewhat related to crons.

Does anyone know how I can get rid of such mails ? I have to empty the /var/spool/mqueue directory every 7-8 hours since the number of mails reaches 50,000 +

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

How to change crontab output from console to email?

By hgjdv

Hi,

We are currently running AIX 6.1 TL4. There are around 30 ksh scripts that are ran from crontab which if an error occurs or a problem with an ftp unix sends the out of the ksh script which goest to our console via the local user hci which is viewed by the mail command. I’ve tired adding the MAILTO=Test@email.com varaible to the crontab doing a crontab -e as well as adding the variable MAIL=Test@email.com but neither options seemed to work.

I was able piple a mail command to the end of the cron entry however it only displays my subject. It does the job of notifying of an issue but doesn’t contain the actual output shown below when looking at the message via mail commad. That option would work but I want any of these jobs to email us and having to piple a mail for each just doesn’t seem efficient.

I’m not for sure if our version of AIX doesn’t support the mailto varible or if I’m doing something incorrectly. I’m searched this and googled this topic and have tried those variables as well as setting up an aliase which didn’t seem to work as well.

I see in the LOGNAME variabile in the output below has hci but I’m not for sure if that is what is being used as the TO: setting for the emial or if there is a config file somewhere that I can update to set the desired email address. Any help would be appreciated.

Example of crontab entry used for piping email would prefer to just have all the crontab jobs for the user hci send an email out instead of having to pipe a mail to each entry. Also I’m not wanting thsi email address to reiceve emails from the root crontab on the hic usr.
00,5,10,15,20,25,30,35,40,45,50,55 * * * * setroot; /qdxtest/qdx5.7/integrator/kshlib/SJS_SFTMD_ftp | mail -s “test” -r “root” “Test@email.com”

From root Thu Jan 17 11:15:00 2013
Received: (from root@localhost)
by hsdvim2b.test.local (AIX6.1/8.13.4/8.11.0) id r0HHF0FP5275882
for hci; Thu, 17 Jan 2013 11:15:00 -0600
Date: Thu, 17 Jan 2013 11:15:00 -0600
From: root
Message-Id:
To: hci
Subject: Output from cron job setroot; /qdxtest/qdx5.7/integrator/kshlib/SJS_SFTMD_ftp, hci@hsdvim2b, exit status 0

Cron Environment:
SHELL = /usr/bin/sh
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java5/jre/bin:/usr/java5/bin
CRONDIR=/var/spool/cron/crontabs
ATDIR=/var/spool/cron/atjobs
LOGNAME=hci
HOME=/home/hci

Your “cron” job executed on hsdvim2b on Thu Jan 17 11:15:00 CST 2013
setroot; /qdxtest/qdx5.7/integrator/kshlib/SJS_SFTMD_ftp

produced the following output:

bogusvar

*****************************************************************
cron: The previous message is the standard output
and standard error of one of the cron commands.

Source: FULL ARTICLE at The UNIX and Linux Forums