Re: change_sqlpass for qmailtoaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



paul

i tried various options but not able to get it

1) $lookup_password_query = 'SELECT count(*) FROM %3 WHERE pw_name = %2 AND pw_passwd = %4'; --- this works as intended
%3 is replaced with domain name. xxxxx.com in the query below. database error occurs because the table name  xxxxx_com

DATABASE ERROR: could not lookup old password: SELECT count(*) FROM xxxxx.com WHERE pw_name = abc AND pw_passwd = "$1$yfkAbvF9$6ymDsb.crSYktxV80y3OR/"
---- DB Error: insufficient permissions

but what i need is xxxxx_com

2) as advised i tried to implement the replace function -- ie replace dot with underscore in xxxxx.com
$lookup_password_query = 'SELECT count(*) FROM  REPLACE(%3,".","_")  WHERE pw_name = "%2" AND pw_passwd = %4';
 but does not work and shows a blank page.

3) i tried to assign %3 to a variable and tried to use that in sql query but does not work. throws blank page.
Even a simple echo %3; does not work
It should display xxxxx.com but instead throws a blank page.

i enabled allowoverride all in display_errors in php.ini  and modified apache as advised but no error comes up

rajesh



----- Original Message -----
From: Paul Lesniewski [mailto:paul@xxxxxxxxxxxxxxxx]
To: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
Sent: Mon, 19 Jan 2015 11:31:21 -0800
Subject: Re:  change_sqlpass for qmailtoaster

On 1/14/15, Rajesh M <24x7server@xxxxxxxxxxxxxx> wrote:
> hi
>
> i was able to adapt the change_sqlpass plugin to suit vpopmail mysql
> database of qmailtoaster wherein the domains are created as domain_com.
>
> however i got stuck at one specific point
>
> as per the details in the config file the variable : %3 returns the domain
> name as : domainname.com
>
> how do i get domainname.com within a variable so that i can replace dot with
> underscore ie domainname.com with domainname_com

https://dev.mysql.com/doc/refman/5.5/en/string-functions.html#function_replace

You should use this in your FROM clauses also if you intend to serve
users on more than one domain.

> for example i tried to use : $domainname = %3; but php throws a blank page.

http://www.squirrelmail.org/docs/admin/admin-11.html#ss11.1


--
Paul Lesniewski
SquirrelMail Team
Please support Open Source Software by donating to SquirrelMail!
http://squirrelmail.org/donate_paul_lesniewski.php

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

[Index of Archives]     [Video For Linux]     [Yosemite News]     [Yosemite Photos]     [gtk]     [KDE]     [Cyrus SASL]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux