On Fri, Dec 23, 2011 at 09:33:47AM -0500, Paul Miller via RT wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=73431 >
>
> OK, first of all, the problem seems to have been that imap does not
> produce an error when a message doesn't exist. NiS was just returning
> whatever random warning happened to have happened last. I believe this
> is due to gmail randomly disappearing things they shouldn't. I didn't
> look it up, but I'm pretty sure imap servers are supposed to preserve
> the message numbers from a select until you're done with the select
> session. Whatever.
>
> I taught NiS to do two things: first, generate a meaningful error in the
> case that a message doesn't exist. Second, return (spuriously) a \n in
> the case that the message is 0 bytes. This can happen in certain weird
> kinds of internal imap errors and things.
>
> The new version, 1.2027, should be on the cpan today or tomorrow maybe.
> Or you can get it at
http://jettero.pl/
I've just upgraded to this and will see if it fixes the problem.
Show quoted text> I also have some bug-irrelevant processing tips for you. The download
> upload method works, but it's really slow. It's better to copy things
> internal to the server in as few commands as possible. This also has a
> side effect of working around message number changes (grr, google).
>
> $msg = $imap->get($i);
> # do things
> push @to_copy, $i if $something;
> push @to_delete, $i; # almost always?
>
>
> # later
>
> $imap->copy( $imap->list2range(@to_copy), "oldMailBox" ); # BAMN!!
> $imap->delete( $imap->list2range(@to_delete) ); # see ya
> $imap->quit;
Thanks, I might give that a go.