Re: change_sqlpass for qmailtoaster

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

 



Please stop top-posting and quote your replies correctly.  It's the
least you can do for free software and free support.  Have a read of
the mailing list posting guidelines as you should already have done
when you subscribed.

>>> 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
>
> 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

Insufficient permissions does not sound like an error having to do
with wrong table name, but who knows.  You'd better make sure.

> 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.

So fix the blank page.  You probably made a syntax error with your
quoting.  Pay attention to overrides like .htaccess.

> 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

Maybe you need to pay a consultant to help you.  The information you
need to fix the problem has already been provided, now it's on you to
do the right thing with it in your environment.

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

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
-----
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