Seems that processes that use Mail::Internet end up running out of memory. The error isn't reported from the script itself; it comes from the mailserver attempting to contact the alias that handles the auto-responder.
The error message is below ( with the obvious 'violation of security info' changed to protect the innocent, and the guilty):
and the code in question:The original message was received at Tue, 10 Oct 2000 06:05:03 -0700 ( +PDT) from mailer.foo.com [xxx.xxx.xxx.xxx] ----- The following addresses had permanent fatal errors ----- "|<full path removed>autorespond.pl responder" (expanded from: <responder@appserv.foo.com>) ----- Transcript of session follows ----- Out of memory! 554 "|< full path removed>autorespond.pl responder"... unknown mailer error 1
my $mail = Mail::Internet->new(\*STDIN); my $header = $mail->head; my $to = $mail->get('To'); my $subject = $mail->get('Subject'); my $from = $mail->get('From'); chomp( $to, $subject, $from ); ### some processing logic that says "don't send if =~ /stuff/ my $newbody = &loadMessage; my $rply = Mail::Internet->new(); $rply=$mail->reply(); $rply->replace('From',"nobody\@foo.com"); $rply->replace('Reply-To',"nobody\@foo.com"); $rply->replace('X-Loop','already_processed'); $rply->body("$newbody"); $rply->smtpsend() or die "COuldn't send $!"; undef $rply;
sub loadMessage is just an 'open' statement that returns a text string.
In reply to Mail::Internet memory leaks?? by geektron
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |