[imp] Unable to strip Attachments
Michael M Slusarz
slusarz at horde.org
Mon Feb 25 00:25:36 UTC 2013
Quoting cjdl01 <cjdl01 at brokensolstice.com>:
> I have tried this with other attachments, and in other mailboxes,
> and the result is always the same. The email in this particular
> example is in my inbox. I do not use imap acls and attachment
> stripping worked in until I updated earlier this week (from horde
> 4/Imp 5). My entire horde suite is up to date as of today (as is
> the debian lenny system it is hosted upon).
>
> So here it is, I apologize for the length, but I didn't want to edit
> it much for fear I might remove something useful to you:
Much easier (and clearer output) if you implement IMAP debugging in
IMP (see imp/config/backends.php). But I think I can piece together
from below:
> READ: NUMBER: 7
> READ: ATOM: SELECT
> READ: QUOTED_STRING:
> WRITE: 7 NO Mailbox does not exist, or must be subscribed to.
This is us closing the mailbox. But command #8 is strangely missing here...
> READ: NUMBER: 9
[snip]
> READ: NUMBER: 10
> READ: ATOM: EXAMINE
> READ: QUOTED_STRING: INBOX
This is us re-opening the mailbox read-only.
> READ: NUMBER: 15
[snip]
> READ: NUMBER: 8
> READ: ATOM: APPEND
> READ: QUOTED_STRING: INBOX
> WRITE: 8 NO Current box is selected READ-ONLY.
And *now* we see command #8. Huh. What happened? Turns out we
needed to reconnect to the mailbox in order to build the append data
(since Courier doesn't support CATENATE, we need to workaround by
actually building the full message data in-memory). But we never
re-close the mailbox before issuing the APPEND command.
The reason the commands are issued out of order is that we start
building the APPEND command (the command identifier is created at this
time) before we convert the CATENATE url's to raw data.
A-ha! The solution should simply be to close the mailbox immediately
before issuing the APPEND command. This will be fixed in the
forthcoming Horde_Imap_Client 2.7.0 release.
michael
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the imp
mailing list