Hi,

I try to use Mail::Box and I want to bounce some message from a Catchall MBox to original destination.

#!/usr/bin/perl use warnings; use strict; use Mail::Box::Manager; # paquet libmail-box-perl my $mailspool = "/var/spool/mail/catch-all"; my $mgr = Mail::Box::Manager->new; my $folder = $mgr->open(folder => $mailspool, remove_when_empty => 0,) or die ("Erreur d'ouverture de $mailspool :\n $!\n +"); foreach my $msg ($folder->messages) { # all messages my $xoriginalto = $msg->study('X-Original-To'); # bounce $msg #my $bounce = $msg->bounce(To => $xoriginalto); #$bounce->send; } $folder->close(); $mgr->closeAllFolders;

Before sending them, I have create user account. I use Postfix for MTA, with this particular parameter

luser_relay = catchall local_recipient_maps =

The bounced emails with this script, go to /var/mail/nobody. The reason seem to be "Forwarding loop to <destination>".

When I bounce from a account to the same destination, it works. Only the script don't work and I don't know why.

Could you help me ?

Thanks


In reply to Mail::Box message->bounce give me a forwarding loop by Anonymous Monk

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.