[Web-cyradm] using short login names with web-cyradm-svn-0.5.5

Leon Kolchinsky leonk at construct.haifa.ac.il
Thu Nov 1 09:24:05 CET 2007


Hello All,


I'm using web-cyradm 0.5.4 for quite a long time with the following hack in
newaccount.php, so I could use short logins (leon instead of
leon.mydomain.com for example). This is the hack I used (Thanks to Michael
Muenz). I'm using $DOMAIN_AS_PREFIX = 1:

In newaccount.php I'm using "$username = $username;" instead of "$username =
$username . "." . $domain;" - 
if ($DOMAIN_AS_PREFIX){
                                $prefix         = $domain;
                                $username       = $email;
                                if ($freenames!="YES") {
                                    // $username = $username . "." .
$domain;
                                      $username = $username;

Now I've installed a new mail server with web-cyradm-svn-0.5.5 (moved mysql
DB from the old server and upgraded with upgrade-0.5.4-to-0.5.5_mysql.sql).

On a new server I've edited newaccount.php. Replaced "$username =
$_POST['email'].".".$_POST['domain'];" with "$username = $_POST['email'];" :

                        if ($DOMAIN_AS_PREFIX){
                                if ($FQUN) {
                                        $username =
$_POST['email']."@".$_POST['domain'];
                                } else {
                                        // This is the change I've made to
make usernames look in the old-fashioned way
                                        // $username =
$_POST['email'].".".$_POST['domain'];
                                        $username = $_POST['email'];
                                }
                                $separator = '/';
                        } else {
                                $username = $_POST['username'];
                                $separator = '.';
                        }


The account created in Mysql DB but not in Cyrus DB :(


What's wrong with this hack? Any ideas?


Best Regards,
Leon Kolchinsky





More information about the Web-cyradm mailing list