8. Configuring Web-cyradm

First copy the distributions config file

cp config.inc.php-dist config.inc.php

touch /var/log/web-cyradm-login.log
chown nobody /var/log/web-cyradm-login.log

8.1. Cyrus setup

# The Cyrus login stuff

$CYRUS_HOST="localhost";
$CYRUS_PORT="143";
$CYRUS_USERNAME="cyrus";
$CYRUS_PASSWORD="secret";

This should be self-explanatory. Please note there is no support for SSL connections at the moment, this is especially important for users that what to like to have web-cyradm not on the same server where the cyrus-imapd resides.

8.2. Database setup

Please note: the database related code is now being rewritten to use PEAR as a database abstraction. So in future you will be able to also use PostgreSQL as database engine (with the patch for postfix). In meantime it is needed to setup the database setup twice (only for the CVS versions, release 2002-05-25_xx will just ignore the unused stuff).

The MySQL stuff to be replaced after all files have PEAR implemented

$MYSQL_HOST="localhost";

Put here the name of your mysql-server. Please note that if you use a mysql database on the same host as web-cyradm does, use »localhost« as the hostname if you followed the instructions at Section 4.
$MYSQL_DB="mail";
$MYSQL_USER="mail";
$MYSQL_PASSWD="secret";

This should be self-explanatory

/* DB_TYPE

 Possible Values are:
 o mysql
 o pgsql

 To operate a mailsystem with PostgreSQL you will need a patch for
 Postfix.

 Other Databases needs to be supported by PAM and postfix

*/


$DB_TYPE="mysql";

$DB_HOST="localhost";
$DB_NAME="mail";
$DB_USER="mail";
$DB_PASSWD="secret";

This is the PEAR stuff with is only needed (at the moment) if you work with the CVS versions

$DSN="$DB_TYPE://$DB_USER:$DB_PASSWD@$DB_HOST/$DB_NAME";

And this variable is the final result of the PEAR configuration which is used by web-cyradm, please leave in untouched

8.3. Default Quota

The default quota to be used is set in the Variable »DEFAULT_QUOTA=20000« and is used when creating a new domain

8.4. Crypted passwords

At the moment the handling of crypted passwords will be supported beginning at release 0.5.2. Check the variable $CRYPT in config.inc.php value 0 means no encryption, 1 means Shadow compatible encryption, 2 means MySQL encryption.

8.5. Usernames

There are two schemas of usernames supported with are defined in the variable »DOMAIN_AS_PREFIX«. The default is to have a defined prefix ($DOMAIN_AS_PREFIX=0), i.e. »test« for the domain »expample.com«. With this scheme, the first user gets the username test0001, the second test0002 and incrementing.

The other one is to have usernames like »hans.mueller.example.com«. If that case set $DOMAIN_AS_PREFIX=1

At the moment you can not mix both schemas, evaluate carefully with scheme matches your needs best

If you choose to have $DOMAIN_AS_PREFIX=1, be sure you uncomment the option »unixhierarchysep: yes« like described in Section 7.1.2