#88 replying fails in shared folders (setting flags)

9 hours ago
Sam Johnston

The code in 1.4.2 (to be uploaded shortly) does not
appear to have changed a whole lot since 1.2.5, and
although I haven't been able to verify the bug exists,
if it idid before it probably does now. I'm hesitant to
ignore errors without knowing what the side effects may be.

Package: squirrelmail
Version: 1:1.2.5-1
Severity: normal

When replying to a message residing in a shared folder
(Cyrus IMAPD)
with ACL "lrs", replying to message fails because
squirrelmail tries
to set the answered flag, which is not possible on
shared folders.
Ideally, Squirrelmail would recognize shared folders,
but a non-fatal
warning would be sufficient.


Here is a workaround. It makes SquirrelMail ignore
(all) errors when
setting flags.

diff -u
/usr/share/squirrelmail/functions/imap_messages.php.old Sat
Apr 20 18:40:28 2002
/usr/share/squirrelmail/functions/imap_messages.php Sat
Apr 20 18:41:55 2002@@ -36,7 +36,7 @@
** Sets the specified messages with specified flag

function sqimap_messages_flag ($imap_stream, $start,
$end, $flag) {
- $read = sqimap_run_command ($imap_stream, "STORE
$start:$end +FLAGS (\\$flag)", true, $response, $message);
+ $read = sqimap_run_command ($imap_stream, "STORE
$start:$end +FLAGS (\\$flag)", false, $response, $message);


  • Logged In: YES

    While I think this patch might be an ideal option, as it
    might be better to either silently fail, or provide a "hey I
    couldn't change the flag, but I did send your reply" type
    message. However, this isn't the only case where flags are
    set. When deleting messages, flags are altered, so it is
    required that some kind of feedback be provided at that
    point as well (hey it's a pain not being able to flag mail
    as deleted).

    I think you'll find a lot has changed between 1.2.5 and
    1.4.2, but I think we can pick up where your patch is
    supposed to go. I'll discuss with the other developers and
    get reviews.

  • Logged In: YES

    By respecting the PERMANENTFLAGS response returned in a
    SELECT call we know what flags we can set and which not.
    That's what we are going to use in future SquirrelMail versions.

    That info should also be used to decide what buttons (flag
    unflag, seen, unseen, delete, undelete) and links should be
    displayed. Nice thing to do when we move to templates ;)

  • Logged In: YES

    What to do with this one? Move to devel-tracker?

    • labels: 102905 -->