1

Topic: Setting up change_sqlpass in squirrelmail

Finally setup iRedMail with Freebsd 8. I setup squireelmail and I am in the process of setting up change-sqlpass. I have some questions about the config.php.sample file.

What do I change this to?
$csp_dsn = 'mysql://user:password@localhost/email_users'

Do I need to change anything here?
$lookup_password_query = 'SELECT count(*) FROM users WHERE username = "%1" AND crypt_password = %4';

Do I need to change anything here?
$password_update_queries = array(
            'UPDATE users SET crypt_password = %4 WHERE username = "%1"'

Do I need to change anything here?
$force_change_password_check_query = '';


Do I need to change anything here?
$password_encryption = 'MYSQLPWD';

Do I need to change anything here?
$csp_salt_static = '';

Do I need to change anything here?
$csp_salt_query = 'SELECT salt FROM users WHERE username = "%1"';

Do I need to change anything here?
$csp_secure_port = 0;


Do I need to change anything here?
$csp_non_standard_http_port = 0;

Do I need to change anything here?
$csp_delimiter = '@';

Do I need to change anything here?
$csp_debug = 0;

Thanks for the help in advance. Gonna go live with the server over the weekend after I get this setup.


Darrell

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Setting up change_sqlpass in squirrelmail

Reference: http://iredmail.googlecode.com/hg/tags/ … relmail.sh

#
# MySQL backend.
#
sm_plugin_change_sqlpass()
{
    cd ${MISC_DIR}
    extract_pkg ${PLUGIN_CHANGE_SQLPASS_TARBALL} ${SM_PLUGIN_DIR}

    chown -R ${HTTPD_USER}:${HTTPD_GROUP} ${SM_PLUGIN_DIR}
    chmod -R 0755 ${SM_PLUGIN_DIR}

    cd ${SM_PLUGIN_DIR}/change_sqlpass/

    ECHO_INFO "Generate configration file: ${SM_PLUGIN_DIR}/change_sqlpass/config.php."
    cat >${PLUGIN_CHANGE_SQLPASS_CONFIG} <<EOF
<?php
   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://${MYSQL_ADMIN_USER}:${MYSQL_ADMIN_PW}@${MYSQL_SERVER}/${VMAIL_DB}";
\$lookup_password_query = 'SELECT count(*) FROM mailbox WHERE username = "%1" AND password = %4';
\$password_update_queries = array('UPDATE mailbox SET password = %4 WHERE username = "%1"');
\$force_change_password_check_query = '';
\$password_encryption = 'MYSQLENCRYPT';
\$csp_salt_static = 'password';
\$csp_salt_query = 'SELECT salt FROM users WHERE username = "%1"';
\$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;
?>
EOF

    chown ${HTTPD_USER}:${HTTPD_GROUP} ${PLUGIN_CHANGE_SQLPASS_CONFIG}
    chmod 644 ${PLUGIN_CHANGE_SQLPASS_CONFIG}

    echo 'export status_sm_plugin_change_sqlpass="DONE"' >> ${STATUS_FILE}
}