Networking

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • The abysmal gpg plugin

    14 answers - 1158 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi!
    I installed the gpg plugin today. Apart from the fact that the PHP
    code doesn't properly use constants:
    if (!defined (SM_PATH)){
    hat to be changed into:
    if (!defined ('SM_PATH')){
    (I had to fix 20 files :( ) I'm having a bizarre problem:
    we use the vlogin plugin as well. Whenever a user has his/her account
    on our exchange server, I get the error message:
    ERRR: Could not complete request.
    Query: FETCH 1202 BDY[]
    Reason Given: The specified message set is invalid.
    I disable the gpg plugin, this error is gone immediately.
    The special options we're using in the vlogin plugin to adapt for the
    Exchange server are:
    allow_thread_sort=false
    allow_server_sort=false
    allow_charset_search=false
    force_username_lowercase=true
    uid_support=false
    imap_server_type=exchange
    IMAP Server: courier-imap & Exchange 2000
    PHP: php4-common 4.3.10-15
    Web server: apache2 2.0.54-4
    Platform: Debian/testing
    How your software was installed: CVS
    SquirrelMail version: CVS_HEADE
    Plugins Installed and versions: vlogin 3.4, gpg 1.6
  • No.1 | | 574 bytes | |

    * Ralf Hildebrandt <Ralf.Hildebrandt (AT) charite (DOT) de>:

    IMAP Server: courier-imap & Exchange 2000
    PHP: php4-common 4.3.10-15
    Web server: apache2 2.0.54-4
    Platform: Debian/testing
    How your software was installed: CVS
    SquirrelMail version: CVS_HEADE
    Plugins Installed and versions: vlogin 3.4, gpg 1.6

    Further investigation:
    1) with vlogin 3.6 instead of 3.4 I get the same behaviour.
    2) doing without vlogin and accessing the Exchange server directly works K
    with gpg or without it

    So it's a freak interaction.
  • No.2 | | 590 bytes | |

    * Ralf Hildebrandt <Ralf.Hildebrandt (AT) charite (DOT) de>:

    Further investigation:
    1) with vlogin 3.6 instead of 3.4 I get the same behaviour.
    2) doing without vlogin and accessing the Exchange server directly works K
    with gpg or without it

    How can I add debugging to see which IMAP commands are being sent to
    the server?

    SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
    from IBM. Find simple to follow Roadmaps, straightforward articles,
    informative Webcasts and more! Get everything you need to get up to
    speed, fast.
  • No.3 | | 829 bytes | |

    Hello Ralf,

    >Further investigation:
    >1) with vlogin 3.6 instead of 3.4 I get the same behaviour.
    >2) doing without vlogin and accessing the Exchange server directly works
    >K
    >with gpg or without it
    >

    How can I add debugging to see which IMAP commands are being sent to
    the server?

    This is best done from the side of the IMAP server (enable logging) or use
    a tool like ethereal.

    BTW there's also a CVS version of the gpg-plugin, it might be that some
    problems are already fixed there.

    Thijs

    SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
    from IBM. Find simple to follow Roadmaps, straightforward articles,
    informative Webcasts and more! Get everything you need to get up to
    speed, fast.
  • No.4 | | 399 bytes | |

    * Thijs Kinkhorst <kink (AT) squirrelmail (DOT) org>:

    This is best done from the side of the IMAP server (enable logging) or use
    a tool like ethereal.

    Uaaah. It's Exchange. This SUUUUCKS.

    BTW there's also a CVS version of the gpg-plugin, it might be that some
    problems are already fixed there.

    Could be. Hmm, I should try that. Where do I check out?
  • No.5 | | 640 bytes | |

    Tue, July 26, 2005 14:51, Ralf Hildebrandt wrote:
    Uaaah. It's Exchange. This SUUUUCKS.

    Can't you use ethereal to catch the commands while in transit?

    Could be. Hmm, I should try that. Where do I check out?

    Homepage is here:
    http://www.braverock.com/gpg/
    Daily builds:

    CVS:
    cvs -d :ext:anoncvs (AT) braverock (DOT) com:/cvs co gpg

    regards
    Thijs

    SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
    from IBM. Find simple to follow Roadmaps, straightforward articles,
    informative Webcasts and more! Get everything you need to get up to
    speed, fast.
  • No.6 | | 976 bytes | |

    Tue, 2005-07-26 at 14:28 +0200, Ralf Hildebrandt wrote:
    How can I add debugging to see which IMAP commands are being sent to
    the server?

    You could probably add debug statements inside sqimap_run_command(), et
    al, but if a plugin is badly written and uses, for instance, fputs()
    instead of the Squirrelmail interface, that wouldn't do any good.

    example:

    function sqimap_run_command ($imap_stream, $query, $handle_errors, &
    $response,
    &$message, $unique_id = false,$filter=false,
    $outputstream=false,$no_return=false) {
    if ($imap_stream) {
    $sid = sqimap_session_id($unique_id);
    print "<PRE>DEBUG: fputs ($imap_stream, $sid $query )</PRE>";

    Cheers,
    Alexandros

    SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
    from IBM. Find simple to follow Roadmaps, straightforward articles,
    informative Webcasts and more! Get everything you need to get up to
    speed, fast.
  • No.7 | | 1479 bytes | |

    * Alexandros Vellis <avel (AT) noc (DOT) uoa.gr>:

    You could probably add debug statements inside sqimap_run_command(), et
    al, but if a plugin is badly written and uses, for instance, fputs()
    instead of the Squirrelmail interface, that wouldn't do any good.

    That doesn't look too bad, i hope:

    # find . -type f | xargs grep fputs
    /gpg_key_functions.php: fputs($fp, "Key-Type: DSA\n");
    /gpg_key_functions.php: fputs($fp, "Key-Length: 1024\n");
    /gpg_key_functions.php: fputs($fp, "Subkey-Type: ELG-E\n");
    /gpg_key_functions.php: fputs($fp, "Subkey-Length: " . $keylength . "\n");
    /gpg_key_functions.php: fputs($fp, "Name-Real: " . $real_name . "\n");
    /gpg_key_functions.php: fputs($fp, "Name-Comment: " . $comment . "\n");
    /gpg_key_functions.php: fputs($fp, "Name-Email: " . $email . "\n");
    /gpg_key_functions.php: fputs($fp, "Expire-Date: ". $expiredate ."\n");
    /gpg_key_functions.php: fputs($fp, "Passphrase: " . $passphrase . "\n");
    /gpg_key_functions.php: fputs($fp, "Preferences: S2 S7 S3 H2 H3 Z2 Z1\n");
    /gpg_key_functions.php: fputs($fp, "%commit\n");

    example:

    function sqimap_run_command ($imap_stream, $query, $handle_errors, &
    $response,
    &$message, $unique_id = false,$filter=false,
    $outputstream=false,$no_return=false) {
    if ($imap_stream) {
    $sid = sqimap_session_id($unique_id);
    print "<PRE>DEBUG: fputs ($imap_stream, $sid $query )</PRE>";

    K.
  • No.8 | | 1402 bytes | |

    * Alexandros Vellis <avel (AT) noc (DOT) uoa.gr>:

    if ($imap_stream) {
    $sid = sqimap_session_id($unique_id);
    print "<PRE>DEBUG: fputs ($imap_stream, $sid $query )</PRE>";

    Activated that.
    Now I get:

    DEBUG: fputs (Resource id #131, A001 LGIN "username" "password" )
    DEBUG: fputs (Resource id #131, A002 SELECT "Gel&APY-schte " )
    DEBUG: fputs (Resource id #131, A003 STATUS "Gel&APY-schte " (UIDNEXT UIDVALIDITY) )
    DEBUG: fputs (Resource id #131, A004 UID FETCH 1112 (FLAGS BDYSTRUCTURE) )
    DEBUG: fputs (Resource id #131, A005 UID FETCH 1112 BDY[HEADER] )
    DEBUG: fputs (Resource id #131, A006 UID FETCH 1112 BDY[1] )

    and then below that where the body of the message should be:

    DEBUG: fputs (Resource id #131, A007 UID FETCH 1112 (FLAGS BDYSTRUCTURE) )
    DEBUG: fputs (Resource id #131, A008 UID FETCH 1112 BDY[HEADER] )
    DEBUG: fputs (Resource id #131, A009 FETCH 1112 BDY[] )

    Betreff: Unzustellbar:Test
    Von: "Systemadministrator" <postmaster (AT) charite (DOT) de>
    Datum: Di, Juli 26, 2005 02:27
    An: "Hildebrandt, Ralf" <ralf.hildebrandt (AT) charite (DOT) de>

    ERRR:
    ERRR: Could not complete request.
    Query: FETCH 1112 BDY[]
    Reason Given: The specified message set is invalid.

    Hmmmmm, It's "FETCH 1112 BDY[1]" at the beginning and only "FETCH 1112 BDY[]" further down.
  • No.9 | | 2342 bytes | |

    * Ralf Hildebrandt <Ralf.Hildebrandt (AT) charite (DOT) de>:

    Activated that.
    Now I get:

    DEBUG: fputs (Resource id #131, A001 LGIN "username" "password" )
    DEBUG: fputs (Resource id #131, A002 SELECT "Gel&APY-schte " )
    DEBUG: fputs (Resource id #131, A003 STATUS "Gel&APY-schte " (UIDNEXT UIDVALIDITY) )
    DEBUG: fputs (Resource id #131, A004 UID FETCH 1112 (FLAGS BDYSTRUCTURE) )
    DEBUG: fputs (Resource id #131, A005 UID FETCH 1112 BDY[HEADER] )
    DEBUG: fputs (Resource id #131, A006 UID FETCH 1112 BDY[1] )

    and then below that where the body of the message should be:

    DEBUG: fputs (Resource id #131, A007 UID FETCH 1112 (FLAGS BDYSTRUCTURE) )
    DEBUG: fputs (Resource id #131, A008 UID FETCH 1112 BDY[HEADER] )
    DEBUG: fputs (Resource id #131, A009 FETCH 1112 BDY[] )

    Betreff: Unzustellbar:Test
    Von: "Systemadministrator" <postmaster (AT) charite (DOT) de>
    Datum: Di, Juli 26, 2005 02:27
    An: "Hildebrandt, Ralf" <ralf.hildebrandt (AT) charite (DOT) de>

    ERRR:
    ERRR: Could not complete request.
    Query: FETCH 1112 BDY[]
    Reason Given: The specified message set is invalid.

    And if I deactivate the vlogin plugin I get:

    DEBUG: fputs (Resource id #122, A001 LGIN "username" "password" )
    DEBUG: fputs (Resource id #122, A002 SELECT "Gel&APY-schte " )
    DEBUG: fputs (Resource id #122, A003 STATUS "Gel&APY-schte " (UIDNEXT UIDVALIDITY) )
    DEBUG: fputs (Resource id #122, A004 UID FETCH 1112 (FLAGS BDYSTRUCTURE) )
    DEBUG: fputs (Resource id #122, A005 UID FETCH 1112 BDY[HEADER] )
    DEBUG: fputs (Resource id #122, A006 UID FETCH 1112 BDY[1] )

    DEBUG: fputs (Resource id #122, A007 UID FETCH 1112 (FLAGS BDYSTRUCTURE) )
    DEBUG: fputs (Resource id #122, A008 UID FETCH 1112 BDY[HEADER] )
    DEBUG: fputs (Resource id #122, A009 UID FETCH 1112 BDY[] )

    Betreff: Unzustellbar:Test
    Von: "Systemadministrator" <postmaster (AT) charite (DOT) de>
    Datum: Di, Juli 26, 2005 02:27
    An: "Hildebrandt, Ralf" <ralf.hildebrandt (AT) charite (DOT) de>
    Signatur: Unsigniert

    AHA! The difference is this:

    with vlogin:
    DEBUG: fputs (Resource id #131, A009 FETCH 1112 BDY[] )
    without vlogin:
    DEBUG: fputs (Resource id #122, A009 UID FETCH 1112 BDY[] )

    Hmm, where did the UID stuff go?
  • No.10 | | 448 bytes | |

    * Ralf Hildebrandt <Ralf.Hildebrandt (AT) charite (DOT) de>:

    AHA! The difference is this:

    with vlogin:
    DEBUG: fputs (Resource id #131, A009 FETCH 1112 BDY[] )
    without vlogin:
    DEBUG: fputs (Resource id #122, A009 UID FETCH 1112 BDY[] )

    Hmm, where did the UID stuff go?

    I found it! The vlogin plugin has:
    uid_support=false
    for every account on the Exchangeserver. I get rid of it,
    everything works.
  • No.11 | | 1044 bytes | |

    * Ralf Hildebrandt <Ralf.Hildebrandt (AT) charite (DOT) de>:
    >
    >AHA! The difference is this:
    >>

    >with vlogin:
    >DEBUG: fputs (Resource id #131, A009 FETCH 1112 BDY[] )
    >without vlogin:
    >DEBUG: fputs (Resource id #122, A009 UID FETCH 1112 BDY[] )
    >>

    >Hmm, where did the UID stuff go?
    >

    I found it! The vlogin plugin has:
    uid_support=false
    for every account on the Exchangeserver. I get rid of it,
    everything works.

    You mean your vlogin configuration does, right? I don't think the
    plugin's code itself contains such a thing, but please let me know if
    that's the case.

    Nice sleuthing.

    -Paul

    SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
    from IBM. Find simple to follow Roadmaps, straightforward articles,
    informative Webcasts and more! Get everything you need to get up to
    speed, fast. 492&op=click
  • No.12 | | 669 bytes | |

    * Paul Lesneiwski <paul (AT) squirrelmail (DOT) org>:

    I found it! The vlogin plugin has:
    uid_support=false
    for every account on the Exchangeserver. I get rid of it,
    everything works.

    You mean your vlogin configuration does, right?

    Indeed. All the lines for users on exchange had ",uid_support=false",
    because I read that this setting MUST be used for Exchange (found that
    in the Wiki). Well, it's wrong.

    I don't think the plugin's code itself contains such a thing, but
    please let me know if that's the case.

    Nope.

    Nice sleuthing.

    SM would really benefit for such a debug mode
  • No.13 | | 582 bytes | |

    * Ralf Hildebrandt <Ralf.Hildebrandt (AT) charite (DOT) de>:

    You mean your vlogin configuration does, right?

    Indeed. All the lines for users on exchange had ",uid_support=false",
    because I read that this setting MUST be used for Exchange (found that
    in the Wiki). Well, it's wrong.

    Can't edit the WIKI:

    Warning: mysql_connect(): User squirrelmail@ has already more than
    'max_user_connections' active connections in
    / on line 15
    Error connecting to database.

    Please contact the administrator for assistance.
  • No.14 | | 1203 bytes | |

    PGP SIGNED MESSAGE
    Hash: SHA1

    Hello Ralf Hildebrandt,
    Wednesday, August 03, 2005, you wrote:

    * Ralf Hildebrandt <Ralf.Hildebrandt (AT) charite (DOT) de>:

    >You mean your vlogin configuration does, right?
    >>

    >Indeed. All the lines for users on exchange had ",uid_support=false",
    >because I read that this setting MUST be used for Exchange (found that
    >in the Wiki). Well, it's wrong.


    Can't edit the WIKI:

    Warning: mysql_connect(): User squirrelmail@ has already more than
    'max_user_connections' active connections in
    / on line 15
    Error connecting to database.

    Already reported this issue to sf.net, repeatedly *sighs*.
    - --
    Jonathan Angliss
    <jon (AT) squirrelmail (DOT) org>
    PGP SIGNATURE
    Version: GnuPG v1.4.1 (MingW32)

    /ss3yJ0rGNd1R2sD/2wP96A=
    =xiB5
    PGP SIGNATURE

    SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
    from IBM. Find simple to follow Roadmaps, straightforward articles,
    informative Webcasts and more! Get everything you need to get up to
    speed, fast.

Re: The abysmal gpg plugin


max 4000 letters.
Your nickname that display:
In order to stop the spam: 9 + 8 =
QUESTION ON "Networking"

EMSDN.COM