Error sending mail with perl

M

murph

Hi ,
I have created a little script that is running as daemon ( it is hard
to say as daemon :)) ) . Then i try to send a mail and the mail is
refused from sendmail.

I have no idea why it refuses it

sub mail_message() {
open(MAIL |"$sendmail -t ") || die "Can not open the mail
programm \n";
print MAIL "To: $mailto\n";
print MAIL "Subject: $subject \n";
print MAIL "At $date , $hour , $computer reported that :\n";
print MAIL "$message\n";
close(MAIL) || die "Error sending the Mail\n";
}
$sendmail , $subject , $mailto are initialized in the script

that is the source of the procedure . The programm retrys to send the
mail and sendmail refuses and refuses (/var/log/maillog )

The error i receive is :

Feb 11 13:10:20 leopard sendmail[20415]: i1BCAGM20415: from=root,
size=342, class=0, nrcpts=1,
msgid=<[email protected]>,
relay=root@localhost
Feb 11 13:10:22 leopard sendmail[9551]: rejecting connections on
daemon Daemon0: load average: 14
Feb 11 13:10:22 leopard sendmail[20415]: i1BCAGM20415: to=root,
ctladdr=root (0/0), delay=00:00:06, xdelay=00:00:02, mailer=local,
pri=30342, dsn=2.0.0, stat=Sent

Have u any ideas ???
 
J

Joe Smith

murph said:
print MAIL "To: $mailto\n";
print MAIL "Subject: $subject \n";

print MAIL "\n"; # A blank line here is mandatory
print MAIL "At $date , $hour , $computer reported that :\n";
Feb 11 13:10:22 leopard sendmail[9551]: rejecting connections on
daemon Daemon0: load average: 14

Sendmail is refusing connections because the load average is too high.
Check to see if your program is looping and firing up 15 simultaneous
sendmail processes.
-Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top