Menu

#40 Proxy user: wrong folders displayed

open-postponed
imap (6)
5
2007-08-16
2007-08-16
zwahri
No

When I login as "admin" user and try to change filter rules for another user, I expected to get the folder list of the user I'm proxying for but I'm getting the folder list of the "admin" user instead.
Otherwise the editing of filters seems to work fine.

If this is a bug, please fix it - if it isn't fixable for some reason, I'd like to suggest a workaround:
Create a text field for entering paths manually instead of the drop down box.

Thanks,
Z

Discussion

  • Stephen Grier

    Stephen Grier - 2007-08-16
    • status: open --> open-postponed
     
  • Stephen Grier

    Stephen Grier - 2007-08-16

    Logged In: YES
    user_id=607130
    Originator: NO

    This is one of SmartSieve's "known bugs". The problem is that SmartSieve uses PHP's imap functions to get the folder list, which doesn't support proxy authorization in the way SmartSieve's own managesieve library does.

    The fix for this is not trivial. The plan is to use a different imap library that supports proxy authz. Unfortunately, the pear Net_IMAP library didn't support it either last time I checked, so this would require either patching that, or possibly writing an IMAP library for SmartSieve.

    Your suggested workaround will probably be a sufficient fix in the short term. I'll leave this ticket open until this is resolved.

     
  • zwahri

    zwahri - 2007-08-17

    Logged In: YES
    user_id=1831267
    Originator: YES

    First of, sorry for reporting a known bug and thanks for accepting the workaround.

    Second, I'm not quite sure if it's relevant (I have no idea about PHP whatsoever :) ) but I found something in the docs of php:
    http://www.php.net/manual/en/function.imap-open.php

    specifically "Table 147. Optional flags for names"
    It states that you may define a flag containing a username and an authentication user - I sincerly hope that this is what's needed...

    Unfortunately I also found
    http://bugs.php.net/bug.php?id=33527
    to consider, which basically says it doesn't work with cyrus.

    Meanwhile I tried to test it on my own with php 5.1.2 using:
    $mbox = imap_open("{imapserver:143/user=user/authuser=admin}INBOX", "admin", 'password', OP_HALFOPEN) or die("can't connect: " . imap_last_error());

    but it didn't work (can't use authuser with this server), so I'm guessing there's really no solution around. :(

     
  • Stephen Grier

    Stephen Grier - 2007-08-21

    Logged In: YES
    user_id=607130
    Originator: NO

    I have committed the suggested workaround. It will be in the upcoming 1.0-RC2 release.

    I will leave this ticket open until a more permanent fix for this has beeen found.

     

Log in to post a comment.