Skip Menu |

This queue is for tickets about the TipJar-MTA CPAN distribution.

Report information
The Basics
Id: 45702
Status: resolved
Priority: 0/
Queue: TipJar-MTA

People
Owner: Nobody in particular
Requestors: jlmartinez [...] capside.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 0.30
  • 0.31
  • 0.32
Fixed in: (no value)



Hi, There is a bug that triggers after a message has been tried, and the server has had "trouble". $Post::Data::Trouble is only assigned to, and never initialized, so after one message sets $Post::Data::Trouble to 1, all other deliveries on that process after that get discarded. They do HELO, MAIL FROM, RCPT TO, but never do DATA, and they count as a successful delivery, so they get lost. My patch is to initialize $Post::Data::Trouble = 0; in sub newmessage: sub newmessage($) { #my $pack = shift; my $messageID = shift; -f $messageID or return undef; -s $messageID or do { # eliminate freeze on zero-length message files unlink $messageID; return undef; }; $Post::Data::Trouble = 0; open MESSAGE, "<$messageID" or return undef; flock MESSAGE, LOCK_EX | LOCK_NB or return undef; chomp( $ReturnAddress = <MESSAGE> ); chomp( $Recipient = <MESSAGE> ); @Recipients = split / +/, $Recipient; $InitialRecipCount = @Recipients; bless \$messageID; }
this should be fixed in 0.33. The state machine, with all the gotos, is getting a little unwieldy; maybe we should rewrite the attempt method into a bunch of smaller pieces and walk messages through various states with an explicit state-based dispatch.