A standard feature of almost all of our cron jobs is to redirect output to a log file, then at the end of the script to embed the contents of that log file in the body of an email sent to the IT staff. Typical code to do this is
where $MAILER = /usr/bin/mailx
the mail is forwarded to an Exchange server where we then pick it up in our individual Outlook accounts. There are several dozen, possibly in excess of 100 of these every day. Last week we quit receiving the email from one single job. All others continue to come through. I checked for the log file output of the job (set to /tmp/$PROC.$$) and it is being created and shows the job ran as expected. But the mail appears to not be reaching our Exchange server. Or if it is, it is not making it to our individual accounts. On the source, the mail is sent to a distribution list defined in our aliases file.
So, how do I begin to follow this email through the system and find where it is getting dropped? (My primary job role is Oracle DBA, but I work closely with our unix SA and consider myself a power user or SA apprentice. I have full root access to the HP system. The exchange server is managed by a different dept and I have no direct access to it, will have to work with their admin when we get to that point.
I would start by:
What has this job so special compared to the others? For if all others make it there must be something that makes the difference...
try redirect STDOUT to something like $HOME/cronjobID_mailer.log and and 2 >jobID_mailer.err rather than
And see what output you get...
Thanks for the reply. Nothing about the job itself differs from any other. And this one *was* sending mail just fine until 22 Sep. We had changed nothing in the script itself or the mail config when it stopped. Further testing indicates there is an issue with the output of the key program being executed by the job (oracle's rman backup utility). That output is included in the body of the email and by doing some focused testing - controlling exactly what actions I have rman report on - the mail will go through. Narrowing that down now.
Have you tried to separate and put in file the redirections?
I would add an extra mail line for test at that precise point subject: after mail send... to yourself and see if you get it
Ive seen cases where in logs, we get side effects because of some characters I suppose, where the input never ends... (waiting for line feed or dot or...) but I believe such case should show up somewhere... I never managed to recreate the situation (without getting myself in a mess...)
So I suppose you could try to write a script that loads nothing and see what you get...
Does the log exist? I there anything in /var/spool/cron/log?
I am having trouble getting mail to work on a red hat server. At first I was getting this message.
Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused
Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Our Unix system is losing a considerable amount of time each day, and our support service company says our motherboard is the cause. They "upgraded" us 5 years ago to basically the same thing as what we had previously, and are looking to "upgrade" us again now for about $5,000... I think... (23 Replies)
Discussion started by: Big Z
23 Replies
3. Forum Support Area for Unregistered Users & Account Problems
Hi.
Recently when I'm logged in to site after some seconds, for instance, I lose the connection and need sign in again. It happens on Firefox and Chrome.
Or another example, when I'm logged in to site and click on my nick name (right up corner) I lose the connection to site.
User: tiago
... (0 Replies)
I'm newbie in UNIX programming, I have a problem with signals. I'm writing multithread program, where threads can die at any moment. When thread dies it generates signal SIGUSR1 to main thread and then thread dies. Main thread gets a signal and waits for thread dead.
I wrote program like this:
... (5 Replies)
Hey guys, facing a weird issue - hoping someone might be able to help.
The wireless network on my laptop is configured with a static IP address. (not using nm)
When i take the laptop out of the range (or i power the router down) the essid is becoming "off/any".
When i'm back in range the... (6 Replies)
So here's the scoop. I am working on a project to automate the building of spark based solaris servers. I've got a cursory amount of knowledge of how to use the os after some pretty heavy experience with Linux, and doing a similar project there.
I have a few questions though...
1) how is... (5 Replies)
I'm using a while read statement to read in lines from a file, if a value (for example) is 1000.10 in a field, the last zero is removed leaving 1000.1 does anyone know a way to keep the field as it is in the original file? (1 Reply)
Hi guys
yesterday we made an aplication update runing over solaris10, when finish we have next message every 5 minutes :eek:
sendmail: m4TKt04M014942: Losing ./qfm4TKt04M014942: savemail panic:confused:
Do you now what does it mean? what can I do in order to fix it?
Thanks in... (0 Replies)
I'm trying to sell the use of gzip instead of compress in our department. One issue I'm having (which is a showstopper) is that I lose the ownership when gzipping and gunzipping, though it's mentioned all over the web that files are supposed to keep ownership.
Example:
-rwxrwxrwx 1 ms32345 ... (3 Replies)