I'm boggled. I've tried searching through both Google and DejaNews (c.l.p.misc and c.l.p.modules) for some problem resolution, but since I can't turn anything up, I'm going to ask the Monks.

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):

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
and the code in question:

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.