03-10-2011
First, whatever is hanging the child processes you spawn off with your call to system() will probably cause the same problem no matter how you get around it.
Second, what the mail program does is pretty complex. Duplicating that would be a lot of work, and you won't do it as well as the mail program does.
Finding out why "echo ... | mail ..." is so slow is your best option.
If you're on Linux, run the mail utility under strace. If Solaris, use truss. Look at the man page for the one you need to use, then look in the output and find out where the mail program is taking so long.
10 More Discussions You Might Find Interesting
1. Post Here to Contact Site Administrators and Moderators
I have been a member for almost a year now. I have always recieved email notifications when I select "subcribe to this thread" at the bottom of posts that I reply to.
However, over the last month or so, I have not been recieving email notification of replys to posts I respond to.
I have... (6 Replies)
Discussion started by: Kelam_Magnus
6 Replies
2. UNIX for Dummies Questions & Answers
Hi.
I want to add email notification so when the my script finishes it sends out an email of the results to our team. If there are errors the subject on the email should say there were errors.
If any having idea/sample scripts pls share with me. (2 Replies)
Discussion started by: redlotus72
2 Replies
3. AIX
I have two different cron jobs that run on the same days. The jobs are 7 hours apart. Both jobs are set to send notification emails when they start running.
Both jobs always run successfully, but I only receive an email from the first job. I never get the email from the second job.
... (1 Reply)
Discussion started by: sasaliasim
1 Replies
4. AIX
Hi,
I'm fairly new to Aix and am looking for some help on the following.
I have setup a cron job under root and want it to send the email once it's run to an external email address. I can get it to send the output in an email to me by using mail on the end of the crontab entry. But I would... (1 Reply)
Discussion started by: elmesy
1 Replies
5. Programming
Dear all,
Currently I'm working on a C program (OS = ubuntu 9.0.4)in which a USB key will
be mounted and umounted for several times. I read the man page
of the mount system call.
I use the following test code
#include <sys/mount.h>
int main(int argc, char *argv)
{
if... (5 Replies)
Discussion started by: dariyoosh
5 Replies
6. UNIX for Advanced & Expert Users
hi guys
I hope this goes here
Have someone used Linux heartbeat to send email when the Slave server becomes the Master?
I've read I can configure the MailTo under
/etc/ha.d/resource.d
but I really don't know how to do it.
I basically need my primary server to send an email when it... (2 Replies)
Discussion started by: karlochacon
2 Replies
7. Homework & Coursework Questions
Write a program using select, which will create some number of child processes that continuously send text messages to the parent process using pipes. Each child has its own pipe that it uses to communicate with the parent. The parent uses select () to decide what pipes should be processed to... (1 Reply)
Discussion started by: ripssingh
1 Replies
8. Shell Programming and Scripting
HI
what i need to be able to do is add a email to the end of a rsync. my current ion configures writes a daily log to disk, but real want to send the log to a central email address.
The current script is as below, is this possible?
#!/bin/bash
if
then
rsync -aWv --stats progress... (3 Replies)
Discussion started by: treds
3 Replies
9. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
"Your a7.c program should use printf to print a nice message. (You can decide what to say.) Then the process... (9 Replies)
Discussion started by: miniviking10
9 Replies
10. Shell Programming and Scripting
Hi All,
I need write a linux script which emails each record to the employee manager email-id which will be specified inside the file.
Each employee can have a different manager too..
file contain 200 to 300 records
Employee ID, Employee Name, Employee Email-ID, Manager, Manager... (4 Replies)
Discussion started by: tradingspecial
4 Replies
LEARN ABOUT ULTRIX
condredirect
condredirect(1) General Commands Manual condredirect(1)
NAME
condredirect - perhaps redirect mail to another address
SYNOPSIS
in .qmail: |condredirect newaddress program [ arg ... ]
DESCRIPTION
condredirect feeds each new mail message to program with the given arguments. If program exits 0, condredirect forwards the mail message
to newaddress, and then exits 99, so further commands in .qmail are ignored.
If program exits 111, condredirect exits 111, so delivery will be retried later.
If program exits anything else (or does not exist), condredirect exits 0, so the rest of .qmail will be processed as usual.
Note that it is not safe for program to fork a child that reads the message in the background.
WARNING: If you create a .qmail file to enable condredirect, make sure to also add a line specifying delivery to your normal mailbox.
SEE ALSO
bouncesaying(1), except(1), dot-qmail(5), qmail-command(8), qmail-queue(8)
condredirect(1)