Am 07.08.2012 00:06, schrieb Cyril Brulebois:
> Hi Patrick.
>
> Patrick Matthäi <pmatthaei@debian.org> (31/07/2012):
>> Package: release.debian.org
>> Severity: normal
>> User: release.debian.org@packages.debian.org
>> Usertags: unblock
>>
>> Please unblock package otrs2
>>
>> I have added an upstream patch to fix the postmaster module with IMAPTLS
>> mailboxes:
>>
>> * Add backported upstream patch 27-imaptls-more-than-one-email. Using IMAPTLS
>> will purge all e-mails, if more than one is located in the inbox. This is
>> because of newer Mail::IMAPClient module versions return an array reference
>> insteaf of an array on the ->message action.
>>
>> unblock otrs2/3.1.7+dfsg1-3
>
> Attaching the diff would have been helpful, would have saved a few
> copying/pasting.
Sorry I will add the debdiffs next time.
>
> +otrs2 (3.1.7+dfsg1-3) unstable; urgency=low
> +
> + * Add backported upstream patch 27-imaptls-more-than-one-email. Using IMAPTLS
> + will purge all e-mails, if more than one is located in the inbox. This is
> + because of newer Mail::IMAPClient module versions return an array reference
> + insteaf of an array on the ->message action.
> ^^^^^^^
> instead, which you can fix for the next uploads.
Whop, should I upload it with an fixed description?
>
> +diff -Naur otrs2-3.1.7+dfsg1.orig/Kernel/System/MailAccount/IMAPTLS.pm otrs2-3.1.7+dfsg1/Kernel/System/MailAccount/IMAPTLS.pm
> +--- otrs2-3.1.7+dfsg1.orig/Kernel/System/MailAccount/IMAPTLS.pm 2011-11-14 16:27:31.000000000 +0100
> ++++ otrs2-3.1.7+dfsg1/Kernel/System/MailAccount/IMAPTLS.pm 2012-07-28 14:06:33.293674056 +0200
> +@@ -132,9 +132,9 @@
> + my $IMAPObject = $Connect{IMAPObject};
> + $IMAPObject->select($IMAPFolder) or die "Could not select: $@\n";
> +
> +- my @Messages = $IMAPObject->messages()
> ++ my $Messages = $IMAPObject->messages()
> + || die "Could not retrieve messages : $@\n";
> +- my $NumberOfMessages = scalar @Messages;
> ++ my $NumberOfMessages = scalar @{$Messages};
>
> What happens if an old Mail::IMAPClient module version is used?
Then the code would fail, but it shouldn't delete e-mails, which are not
processed. Since there is no safe way (nothing like a SONAME bump or
like that) it is not possible to be sure to have the correct version
(but the one in wheezy is the right one), okay I also could add a
versioned dependency on it and then also fix my spelling error above.
> +- $IMAPObject->expunge_mailbox($IMAPFolder);
>
> I think that's part of the bug fix, since the retrieved messages are
> deleted through:
> # mark email for deletion if it got processed
> $IMAPObject->delete_message($Messageno);
>
> And I guess calling expunge_mailbox() was a way to make sure all
> messages went away? Is calling delete_message() enough?
Yes it is enough and much safer, since only e-mails will be deleted,
which are processed.
>
> +- $IMAPObject->close();
> ++ $IMAPObject->close;
>
> I think it's a no-op, but a confirmation would be good.
Does not make any difference, just part of the upstream patch and so we
are on sync with them :)
Sorry for my late answer, I completly oversaw your e-mail!
--
/*
Mit freundlichem Gruß / With kind regards,
Patrick Matthäi
GNU/Linux Debian Developer
Blog: http://www.linux-dev.org/
E-Mail: pmatthaei@debian.org
patrick@linux-dev.org
*/
Attachment:
signature.asc
Description: OpenPGP digital signature