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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |