Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail

Discussion in 'HOWTO-Related Questions' started by laserdot, Oct 17, 2008.

  1. laserdot

    laserdot New Member

    Re: Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.04 LTS)

    First Off, I wish to thank falko for some wonderful How-To's, they have really saved me a lot of time.

    I recently built a mail server and it is working well (the Virtual mail server for Ubuntu 7.10), but there is no user password change facility (without me coding one). When I recently needed to re-build another mail server, I used this how-to and included squirrelmail for the PW change ability. My issue is that SM gives me a blank page after I login. Using IMAP I see the welcome email, so there should be something to display.

    In looking around the SM site, and they have asserted that this is typically a problem with the PHP package. I investigated my setup, and noticed that php -v gives me "PHP 5.2.4-2ubuntu5.3 with Suhosin-Patch 0.9.6.2 (cli) (built: Jul 23 2008 06:44:49)", and the How-To was released on 2008-05-20. I suspect there might be a problem with the updated PHP package, but being only a part time admin, my knowledge is sorely lacking.

    Can anyone with a working setup tell me the versions they are running from the how-to? I will try syncing my packages with a working install first, making sure there are not any package version issues before I get any deeper into troubleshooting this issue.

    Thanks in advance...
     
  2. marchost

    marchost New Member HowtoForge Supporter

    php version

    Hi, I got it working, here is my php -v output

    PHP 5.2.4-2ubuntu5.3 with Suhosin-Patch 0.9.6.2 (cli) (built: Jul 23 2008 06:46:18)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
     
  3. marchost

    marchost New Member HowtoForge Supporter

    I would recommend you to redo the SM part of the tutorial...

    Normally a blank page is because there is a typo somewhere in the PHP files.

    The only modification of php in the tutorial is

    /usr/share/squirrelmail/plugins/change_sqlpass/config.php

    Here is the file without comments :

    ############################
    <?php

    /**
    * SquirrelMail Change SQL Password Plugin
    * Copyright (C) 2001-2002 Tyler Akins
    * 2002 Thijs Kinkhorst <[email protected]>
    * 2002-2005 Paul Lesneiwski <[email protected]>
    * This program is licensed under GPL. See COPYING for details
    *
    * @package plugins
    * @subpackage Change SQL Password
    *
    */


    // Global Variables, don't touch these unless you want to break the plugin
    //
    global $csp_dsn, $password_update_queries, $lookup_password_query,
    $force_change_password_check_query, $password_encryption,
    $csp_salt_query, $csp_salt_static, $csp_secure_port,
    $csp_non_standard_http_port, $csp_delimiter, $csp_debug,
    $min_password_length, $max_password_length, $include_digit_in_password,
    $include_uppercase_letter_in_password, $include_lowercase_letter_in_password,
    $include_nonalphanumeric_in_password;

    $csp_dsn = 'mysql://mail_admin:mail_admin_password@localhost/mail';

    $lookup_password_query = 'SELECT count(*) FROM users WHERE email = "%1" AND password = %4';

    $password_update_queries = array('UPDATE users SET password = %4 WHERE email = "%1"');

    $force_change_password_check_query = '';

    $password_encryption = 'MYSQLENCRYPT';

    $csp_salt_static = 'LEFT(password, 2)';

    $csp_secure_port = 0;

    $csp_non_standard_http_port = 0;

    $min_password_length = 6;
    $max_password_length = 0;
    $include_digit_in_password = 0;
    $include_uppercase_letter_in_password = 0;
    $include_lowercase_letter_in_password = 0;
    $include_nonalphanumeric_in_password = 0;

    $csp_delimiter = '@';

    $csp_debug = 0;

    ?>
    #####################################
     
  4. laserdot

    laserdot New Member

    Thank you for the response marchost...you nailed the problem!

    I decided to review the config.php file for errors first, and I found an extra _'_ in the line
    $csp_salt_static = 'LEFT(password, 2)';

    After I fixed that, squirrelmail now displays properly...Thanks again!
     

Share This Page