Inhaltsverzeichnis
Cyrus web-cyradm
web-cyradm ist eine Web-Basierte GUI für das gleichnamigen Werkzeug unter Cyrus mit dem Namen cyradm
.
Cyrus web-cyradm herunterladen
Bevor mit der Installation von web-cyradm begonnen werden kann, sollte eine „stabile“ Version von Cyrus web-cyradm Download heruntergeladen werden.
Die hier verwendete und besprochene Version ist die Version web-cyradm-svn-0.5.5.tar.gz
.
Folgende Abhängigkeiten müssen ebenfalls noch aufgelöst werden, sprich Komponente die nachfolgende beschrieben sind ebenfalls heruntergeladen werden:
Nach Möglichkeit sollte auf die Installation über ein RPM-Paket zurückgegriffen werden. Unter folgendem Link kann ein entsprechendes RPM-Paket heruntergeladen werden:
Folgende PHP-Module sind zur Ausführung von web-cyradm notwendig:
- php-pear
- php-pear-db
Cyrus web-cyradm installieren
Unter CentOS besteht die Möglichkeit eine Installation über folgende Befehle durchzuführen, ausgehend davon das sich die RPM-Pakete im Verzeichnis /tmp
befinden:
# yum install php-pear
# yum localinstall --nogpgcheck /tmp/php-pear-db-1.7.13-2.el5.rf.noarch.rpm
HINWEIS - Falls erforderluch und noch nicht installiert, auch nachfolgendes Paket!
# yum install php-mysql
Nach der Installation, kann z.B. mit folgendem Befehl zusätzlich überprüft werden, was alles im Paket php-pear.noarch
enthalten ist:
# rpm -qil php-pear.noarch | more Name : php-pear Relocations: (not relocatable) Version : 1.4.9 Vendor: CentOS Release : 4.el5.1 Build Date: Sat 24 May 2008 04:28:34 PM CEST Install Date: Fri 16 Jan 2009 04:48:56 PM CET Build Host: builder10.centos.org Group : System Source RPM: php-pear-1.4.9-4.el5.1.src.rpm Size : 1911916 License: The PHP License 3.0 Signature : DSA/SHA1, Sun 15 Jun 2008 01:39:57 AM CEST, Key ID a8a447dce8562897 URL : http://pear.php.net/package/PEAR Summary : PHP Extension and Application Repository framework Description : PEAR is a framework and distribution system for reusable PHP components. This package contains the basic PEAR components. /etc/pear.conf /etc/rpm/macros.pear /usr/bin/pear /usr/bin/peardev /usr/bin/pecl /usr/share/doc/php-pear-1.4.9 /usr/share/doc/php-pear-1.4.9/LICENSE /usr/share/pear /usr/share/pear/.channels /usr/share/pear/.channels/.alias /usr/share/pear/.channels/.alias/pear.txt /usr/share/pear/.channels/.alias/pecl.txt /usr/share/pear/.channels/__uri.reg /usr/share/pear/.channels/pear.php.net.reg /usr/share/pear/.channels/pecl.php.net.reg /usr/share/pear/.depdb /usr/share/pear/.depdblock /usr/share/pear/.filemap /usr/share/pear/.lock /usr/share/pear/.pkgxml /usr/share/pear/.registry /usr/share/pear/.registry/.channel.__uri /usr/share/pear/.registry/.channel.pecl.php.net /usr/share/pear/.registry/archive_tar.reg /usr/share/pear/.registry/console_getopt.reg /usr/share/pear/.registry/pear.reg /usr/share/pear/.registry/xml_rpc.reg /usr/share/pear/Archive /usr/share/pear/Archive/Tar.php /usr/share/pear/Console /usr/share/pear/Console/Getopt.php /usr/share/pear/OS /usr/share/pear/OS/Guess.php /usr/share/pear/PEAR /usr/share/pear/PEAR.php /usr/share/pear/PEAR/Autoloader.php /usr/share/pear/PEAR/Builder.php /usr/share/pear/PEAR/ChannelFile /usr/share/pear/PEAR/ChannelFile.php /usr/share/pear/PEAR/ChannelFile/Parser.php /usr/share/pear/PEAR/Command /usr/share/pear/PEAR/Command.php /usr/share/pear/PEAR/Command/Auth.php /usr/share/pear/PEAR/Command/Auth.xml /usr/share/pear/PEAR/Command/Build.php /usr/share/pear/PEAR/Command/Build.xml /usr/share/pear/PEAR/Command/Channels.php /usr/share/pear/PEAR/Command/Channels.xml /usr/share/pear/PEAR/Command/Common.php /usr/share/pear/PEAR/Command/Config.php /usr/share/pear/PEAR/Command/Config.xml /usr/share/pear/PEAR/Command/Install.php /usr/share/pear/PEAR/Command/Install.xml /usr/share/pear/PEAR/Command/Mirror.php /usr/share/pear/PEAR/Command/Mirror.xml /usr/share/pear/PEAR/Command/Package.php /usr/share/pear/PEAR/Command/Package.xml /usr/share/pear/PEAR/Command/Pickle.php /usr/share/pear/PEAR/Command/Pickle.xml /usr/share/pear/PEAR/Command/Registry.php /usr/share/pear/PEAR/Command/Registry.xml /usr/share/pear/PEAR/Command/Remote.php /usr/share/pear/PEAR/Command/Remote.xml /usr/share/pear/PEAR/Command/Test.php /usr/share/pear/PEAR/Command/Test.xml /usr/share/pear/PEAR/Common.php /usr/share/pear/PEAR/Config.php /usr/share/pear/PEAR/Dependency.php /usr/share/pear/PEAR/Dependency2.php /usr/share/pear/PEAR/DependencyDB.php /usr/share/pear/PEAR/Downloader /usr/share/pear/PEAR/Downloader.php /usr/share/pear/PEAR/Downloader/Package.php /usr/share/pear/PEAR/ErrorStack.php /usr/share/pear/PEAR/Exception.php /usr/share/pear/PEAR/Frontend /usr/share/pear/PEAR/Frontend.php /usr/share/pear/PEAR/Frontend/CLI.php /usr/share/pear/PEAR/Installer /usr/share/pear/PEAR/Installer.php /usr/share/pear/PEAR/Installer/Role /usr/share/pear/PEAR/Installer/Role.php /usr/share/pear/PEAR/Installer/Role/Common.php /usr/share/pear/PEAR/Installer/Role/Data.php /usr/share/pear/PEAR/Installer/Role/Data.xml /usr/share/pear/PEAR/Installer/Role/Doc.php /usr/share/pear/PEAR/Installer/Role/Doc.xml /usr/share/pear/PEAR/Installer/Role/Ext.php /usr/share/pear/PEAR/Installer/Role/Ext.xml /usr/share/pear/PEAR/Installer/Role/Php.php /usr/share/pear/PEAR/Installer/Role/Php.xml /usr/share/pear/PEAR/Installer/Role/Script.php /usr/share/pear/PEAR/Installer/Role/Script.xml /usr/share/pear/PEAR/Installer/Role/Src.php /usr/share/pear/PEAR/Installer/Role/Src.xml /usr/share/pear/PEAR/Installer/Role/Test.php /usr/share/pear/PEAR/Installer/Role/Test.xml /usr/share/pear/PEAR/PackageFile /usr/share/pear/PEAR/PackageFile.php /usr/share/pear/PEAR/PackageFile/Generator /usr/share/pear/PEAR/PackageFile/Generator/v1.php /usr/share/pear/PEAR/PackageFile/Generator/v2.php /usr/share/pear/PEAR/PackageFile/Parser /usr/share/pear/PEAR/PackageFile/Parser/v1.php /usr/share/pear/PEAR/PackageFile/Parser/v2.php /usr/share/pear/PEAR/PackageFile/v1.php /usr/share/pear/PEAR/PackageFile/v2 /usr/share/pear/PEAR/PackageFile/v2.php /usr/share/pear/PEAR/PackageFile/v2/Validator.php /usr/share/pear/PEAR/PackageFile/v2/rw.php /usr/share/pear/PEAR/Packager.php /usr/share/pear/PEAR/REST /usr/share/pear/PEAR/REST.php /usr/share/pear/PEAR/REST/10.php /usr/share/pear/PEAR/REST/11.php /usr/share/pear/PEAR/Registry.php /usr/share/pear/PEAR/Remote.php /usr/share/pear/PEAR/RunTest.php /usr/share/pear/PEAR/Task /usr/share/pear/PEAR/Task/Common.php /usr/share/pear/PEAR/Task/Postinstallscript /usr/share/pear/PEAR/Task/Postinstallscript.php /usr/share/pear/PEAR/Task/Postinstallscript/rw.php /usr/share/pear/PEAR/Task/Replace /usr/share/pear/PEAR/Task/Replace.php /usr/share/pear/PEAR/Task/Replace/rw.php /usr/share/pear/PEAR/Task/Unixeol /usr/share/pear/PEAR/Task/Unixeol.php /usr/share/pear/PEAR/Task/Unixeol/rw.php /usr/share/pear/PEAR/Task/Windowseol /usr/share/pear/PEAR/Task/Windowseol.php /usr/share/pear/PEAR/Task/Windowseol/rw.php /usr/share/pear/PEAR/Validate.php /usr/share/pear/PEAR/Validator /usr/share/pear/PEAR/Validator/PECL.php /usr/share/pear/PEAR/XMLParser.php /usr/share/pear/System.php /usr/share/pear/XML /usr/share/pear/XML/RPC /usr/share/pear/XML/RPC.php /usr/share/pear/XML/RPC/Dump.php /usr/share/pear/XML/RPC/Server.php /usr/share/pear/data /usr/share/pear/data/PEAR /usr/share/pear/data/PEAR/package.dtd /usr/share/pear/data/PEAR/template.spec /usr/share/pear/doc /usr/share/pear/doc/Archive_Tar /usr/share/pear/doc/Archive_Tar/docs /usr/share/pear/doc/Archive_Tar/docs/Archive_Tar.txt /usr/share/pear/pearcmd.php /usr/share/pear/peclcmd.php /usr/share/pear/test /usr/share/pear/test/XML_RPC /usr/share/pear/test/XML_RPC/tests /usr/share/pear/test/XML_RPC/tests/allgot.inc /usr/share/pear/test/XML_RPC/tests/empty-value-struct.php /usr/share/pear/test/XML_RPC/tests/empty-value.php /usr/share/pear/test/XML_RPC/tests/extra-lines.php /usr/share/pear/test/XML_RPC/tests/protoport.php /usr/share/pear/test/XML_RPC/tests/test_Dump.php /usr/share/pear/test/XML_RPC/tests/types.php /var/cache/php-pear
Nach der Installation, kann z.B. mit folgendem Befehl zusätzlich überprüft werden, was alles im Paket php-pear-db.noarch
enthalten ist:
# rpm -qil php-pear-db.noarch | more Name : php-pear-db Relocations: (not relocatable) Version : 1.7.13 Vendor: Dag Apt Repository, http://dag.wieers.com/apt/ Release : 2.el5.rf Build Date: Wed 30 Jul 2008 01:27:26 AM CEST Install Date: Fri 16 Jan 2009 04:50:31 PM CET Build Host: lisse.leuven.wieers.com Group : Development/Libraries Source RPM: php-pear-db-1.7.13-2.el5.rf.src.rpm Size : 692647 License: PHP Signature : DSA/SHA1, Wed 30 Jul 2008 03:31:32 AM CEST, Key ID a20e52146b8d79e6 Packager : Dag Wieers <dag@wieers.com> URL : http://pear.php.net/package/DB Summary : PEAR: Database Abstraction Layer Description : DB is a database abstraction layer providing: * an OO-style query API * portability features that make programs written for one DBMS work with other DBMS's * a DSN (data source name) format for specifying database servers * prepare/execute (bind) emulation for databases that don't support it natively * a result object for each query response * portable error codes * sequence emulation * sequential and non-sequential row fetching as well as bulk fetching * formats fetched rows as associative arrays, ordered arrays or objects * row limit support * transactions support * table information interface * DocBook and phpDocumentor API documentation DB layers itself on top of PHP's existing database extensions. /usr/share/pear/DB /usr/share/pear/DB.php /usr/share/pear/DB/common.php /usr/share/pear/DB/dbase.php /usr/share/pear/DB/fbsql.php /usr/share/pear/DB/ibase.php /usr/share/pear/DB/ifx.php /usr/share/pear/DB/msql.php /usr/share/pear/DB/mssql.php /usr/share/pear/DB/mysql.php /usr/share/pear/DB/mysqli.php /usr/share/pear/DB/oci8.php /usr/share/pear/DB/odbc.php /usr/share/pear/DB/pgsql.php /usr/share/pear/DB/sqlite.php /usr/share/pear/DB/storage.php /usr/share/pear/DB/sybase.php /usr/share/pear/doc/DB /usr/share/pear/doc/DB/doc /usr/share/pear/doc/DB/doc/IDEAS /usr/share/pear/doc/DB/doc/MAINTAINERS /usr/share/pear/doc/DB/doc/STATUS /usr/share/pear/doc/DB/doc/TESTERS /usr/share/pear/test/DB /usr/share/pear/test/DB/tests /usr/share/pear/test/DB/tests/db_error.phpt /usr/share/pear/test/DB/tests/db_error2.phpt /usr/share/pear/test/DB/tests/db_factory.phpt /usr/share/pear/test/DB/tests/db_ismanip.phpt /usr/share/pear/test/DB/tests/db_parsedsn.phpt /usr/share/pear/test/DB/tests/driver /usr/share/pear/test/DB/tests/driver/01connect.phpt /usr/share/pear/test/DB/tests/driver/02fetch.phpt /usr/share/pear/test/DB/tests/driver/03simplequery.phpt /usr/share/pear/test/DB/tests/driver/04numcols.phpt /usr/share/pear/test/DB/tests/driver/05sequences.phpt /usr/share/pear/test/DB/tests/driver/06prepexec.phpt /usr/share/pear/test/DB/tests/driver/08affectedrows.phpt /usr/share/pear/test/DB/tests/driver/09numrows.phpt /usr/share/pear/test/DB/tests/driver/10errormap.phpt /usr/share/pear/test/DB/tests/driver/11transactions.phpt /usr/share/pear/test/DB/tests/driver/13limit.phpt /usr/share/pear/test/DB/tests/driver/14fetchmode_object.phpt /usr/share/pear/test/DB/tests/driver/15quote.phpt /usr/share/pear/test/DB/tests/driver/16tableinfo.phpt /usr/share/pear/test/DB/tests/driver/17query.phpt /usr/share/pear/test/DB/tests/driver/18get.phpt /usr/share/pear/test/DB/tests/driver/19getlistof.phpt /usr/share/pear/test/DB/tests/driver/20locale.phpt /usr/share/pear/test/DB/tests/driver/21freeResult.phpt /usr/share/pear/test/DB/tests/driver/connect.inc /usr/share/pear/test/DB/tests/driver/droptable.inc /usr/share/pear/test/DB/tests/driver/mktable.inc /usr/share/pear/test/DB/tests/driver/multiconnect.php /usr/share/pear/test/DB/tests/driver/run.cvs /usr/share/pear/test/DB/tests/driver/setup.inc.cvs /usr/share/pear/test/DB/tests/driver/skipif.inc /usr/share/pear/test/DB/tests/errors.inc /usr/share/pear/test/DB/tests/fetchmode_object.inc /usr/share/pear/test/DB/tests/fetchmodes.inc /usr/share/pear/test/DB/tests/include.inc /usr/share/pear/test/DB/tests/limit.inc /usr/share/pear/test/DB/tests/numcols.inc /usr/share/pear/test/DB/tests/numrows.inc /usr/share/pear/test/DB/tests/prepexe.inc /usr/share/pear/test/DB/tests/run.cvs /usr/share/pear/test/DB/tests/sequences.inc /usr/share/pear/test/DB/tests/simplequery.inc /usr/share/pear/test/DB/tests/skipif.inc /usr/share/pear/test/DB/tests/transactions.inc
Nach dem herunterladen einer Version von web-cyradm in z.B. das Verzeichnis /tmp
auf den lokalen Rechner, sollte sich folgende Datei
web-cyradm-svn-0.5.5.tar.gz
im Verzeichnis /tmp
befinden.
Das heruntergeladene Archiv mit dem Namen web-cyradm-svn-0.5.5.tar.gz
kann mit folgendem Befehl entpackt werden:
$ tar xvfz web-cyradm-svn-0.5.5.tar.gz
Anschließend sollte sich ein Verzeichnis mit dem Namen web-cyradm-svn-0.5.5.tar.gz
im Verzeichnis /tmp
befinden:
# ll /tmp/ ... drwxr-xr-x 5 1000 1000 4096 Jul 3 2008 web-cyradm-svn-0.5.5 -rw-r--r-- 1 root root 63849 Jul 3 2008 web-cyradm-svn-0.5.5.tar.gz ...
Abschliessend kann das heruntergeladene Archiv web-cyradm-svn-0.5.5.tar.gz
mit folgendem Befehl gelöscht werden:
$ rm /tmp/web-cyradm-svn-0.5.5.tar.gz
Ab hier werden root
-Rechte zur Ausführung der nachfolgenden Befehle benötigt. Um root
zu werden geben Sie bitte folgenden Befehl ein:
$ su - Password:
Cyrus web-cyradm Konfiguration Webserver
Hier soll die Konfiguration eines virtuellen Host für den Apache HTTP Server beschrieben werden. Der Aufruf von web-cyradm soll über die URL
ermöglicht werden.
Falls Sie noch keine Erfahrungen mit virtuellen Hosts in Verbindung mit dem Apache HTTP Server haben sollten, lesen Sie bitte die Dokumentation des Apache HTTP Server Projektes, da hier nur die grundlegenden Schritte erläutert werden.
Falls noch nicht geschehen wird im Verzeichnis /etc/httpd/conf.d
eine Datei mit dem Namen vhosts.conf
erstellt. Der Inhalt dieser Datei sollte minimal für einen virtuellen Host für web-cyradm wie folgt aussehen:
# This configuration file enables the vhosts to this # Server # NameVirtualHost *:80 # # webcyradm.tachtler.net # <VirtualHost *:80> ServerAdmin webmaster@tachtler.net ServerName webcyradm.tachtler.net ServerAlias www.webcyradm.tachtler.net ServerPath / DocumentRoot "/var/www/html/webcyradm" <Directory "/var/www/html/webcyradm"> AllowOverride AuthConfig Order allow,deny Allow from all </Directory> DirectoryIndex index.php ErrorLog logs/webcyradm_error.log CustomLog logs/webcyradm_access.log combined </VirtualHost>
Anschließend wird das Verzeichnis /tmp/web-cyradm-svn-0.5.5
nach /var/www/html/webcyradm
mit folgendem Befehl kopiert und gleichzeitig umbenannt:
# mv /tmp/web-cyradm-svn-0.5.5 /var/www/html/webcyradm
Die Besitzrechte für das Verzeichnis /var/www/html/webcyradm
müssen noch korrigiert werden, was mit folgendem Befehl durchgeführt wird:
# chown -R root.apache /var/www/html/webcyradm
Die Zugriffsrechte müssen ebenfalls noch für das Verzeichnis /var/www/html/webcyradm
noch korrigiert werden, was mit folgenden Befehlen durchgeführt wird:
# cd /var/www/html/webcyradm
# chmod -R o-rx *
Ein erneuter oder erster Start des Apache HTTP Server mit folgenden Befehl für eine erstmaligen Start
# service httpd start
oder einen erneuten Start des Apache HTTP Server mit folgendem Befehl
# service httpd restart
macht die oben beschriebenen Konfigurationen für den Apache HTTP Server wirksam.
Cyrus web-cyradm konfigurieren
/var/www/html/webcyradm/config/conf.php
Zuerst muss die Standard-Konfigurationsdatei /var/www/html/webcyradm/config/conf.php.dist
mit folgendem Befehl kopiert und in /var/www/html/webcyradm/config/conf.php
umbenannt werden:
# cp /var/www/html/webcyradm/config/conf.php.dist /var/www/html/webcyradm/config/conf.php
Anschließend müssen die Besitzrechte noch mit nachfolgendem Befehl wie folgt korrigiert werden:
# chown root.apache /var/www/html/webcyradm/config/conf.php
Um die Konfigurationsdatei /var/www/html/webcyradm/config/conf.php
bearbeiten zu können, müssen die Dateizugriffsrechte temporär wie folgt mit nachfolgendem Befehl angepasst werden:
# chmod 640 /var/www/html/webcyradm/config/conf.php
Die relevanten Änderung gegenüber der Standard-Konfigurationsdatei, sind mit folgendem Kommentar
# Tachtler
versehen.
Hier die komplette Konfigurationsdatei /var/www/html/webcyradm/config/conf.php
:
<?php ######################################################################################## # # This is web-cyradm Version 0.5.4 CVS # # ######################################################################################### // Set Default language # Tachtler # default: $DEFAULTLANG = "en_EN"; $DEFAULTLANG = "de_DE"; # The Cyrus login stuff $CYRUS = array( # Tachtler # default: 'HOST' => 'localhost', 'HOST' => 'mx1.tachtler.net', 'PORT' => 143, # Tachtler # default: 'ADMIN' => 'cyrus', 'ADMIN' => 'meinuser', # Tachtler # default: 'PASS' => 'secret' 'PASS' => 'geheim' ); /* DB_TYPE Possible Values are: o mysql o pgsql To operate a mailsystem with postgreSQL you will need a patch for Postfix. Other Databases need to be supported by PAM and postfix */ $DB = array( 'TYPE' => 'mysql', # Tachtler # default: 'USER' => 'mail', 'USER' => 'myuser', # Tachtler # default: 'PASS' => 'secret', 'PASS' => 'geheim', 'PROTO' => 'unix', // set to "tcp" for TCP/IP # Tachtler # default: 'HOST' => 'localhost', 'HOST' => 'mx1.tachtler.net', 'NAME' => 'mail' ); $DB['DSN'] = sprintf('%s://%s:%s@%s+%s/%s', $DB['TYPE'], $DB['USER'], $DB['PASS'], $DB['PROTO'], $DB['HOST'], $DB['NAME']); # Where should web-cyradm write its log to? $LOG_DIR = "/var/log/web-cyradm/"; /* Log level Possible values are (from quiet to verbose): ERR - only internal errors WARN - failed login, security violation INFO - all login and logout DEBUG - all possible information */ $LOG_LEVEL = "INFO"; # The default timeout in seconds for a session, after that you have to login again $SESS_TIMEOUT = 1000; # The default quota sets the default quota for new accounts $DEFAULT_QUOTA = 20000; # The default domain quota sets the quota for new domains # 0 = No quota $DEFAULT_DOMAIN_QUOTA = 0; # On what quota level mark accounts on accounts list (in %) $QUOTA_WARN_LEVEL = 90; # Defines if passwords are encrypted or not. # Valid Values: # - plain 0 No encription is used # - crypt 1 (shadow compatible encription) # - mysql 2 (MySQL PASSWORD function) # - md5 3 (MD5 digest) $CRYPT = "crypt"; # web-cyradm is compatible with cyrus-imapd-2.0.16 (and earlier?) # however, if you are using 2.1.x and wish to use email addresses # with .'s in them such as 'john.doe@mydomain.com' you can set this # option DOMAIN_AS_PREFIX to '1'. NOTE: you also have to add this # line to your imapd.conf file: #### imapd.conf: #### # unixhierarchysep: yes #### $DOMAIN_AS_PREFIX = 0; # EXPERIMENTAL # If you are using cyrus imap 2.2.x and wish to use usernames like # email addresses you can set option DOMAIN_AS_PREFIX to '1' and # FQUN to '1'. NOTE: you also have to add this lines to your # imapd.conf file: #### imapd.conf: #### # unixhierarchysep: yes # virtdomains: yes #### $FQUN = 0; # At the moment, web-cyradm supports two methods of password change: # - through sql # - poppassd # sql is the default $PASSWORD_CHANGE_METHOD = "sql"; # Turn up error reporting level. This overrides settings in your php.ini # # E_ALL - All errors and warnings # E_ERROR - fatal run-time errors # E_WARNING - run-time warnings (non-fatal errors) # E_PARSE - compile-time parse errors # E_NOTICE - run-time notices (these are warnings which often result # from a bug in your code, but it's possible that it was # intentional (e.g., using an uninitialized variable and # relying on the fact it's automatically initialized to an # empty string) # E_CORE_ERROR - fatal errors that occur during PHP's initial startup # E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's # initial startup # E_COMPILE_ERROR - fatal compile-time errors # E_COMPILE_WARNING - compile-time warnings (non-fatal errors) # E_USER_ERROR - user-generated error message # E_USER_WARNING - user-generated warning message # E_USER_NOTICE - user-generated notice message error_reporting(E_ERROR); $VERSION="0.5.5-Beta1"; # Define reserved Emailadresses (Separated by comma): # Tachtler # default: $RESERVED="postmaster,root"; $RESERVED="postmaster,abuse,webmaster,root"; $TEMPLATE[0]="default"; $TEMPLATE[1]="green";
Zum Abschluss der Bearbeitung der Konfigurationsdatei /var/www/html/webcyradm/config/conf.php
, müssen die Dateizugriffsrechte mit folgendem Befehl wieder zurückgesetzt werden:
# chmod 440 /var/www/html/webcyradm/config/conf.php
/var/www/html/webcyradm/scripts
Zum anlegen der Datenbanken/Tabellen usw. in MySQL müssen die im Verzeichnis /var/www/html/webcyradm/scripts
beiden mitgelieferten Scripte
/var/www/html/webcyradm/scripts/insertuser_mysql.sql
/var/www/html/webcyradm/scripts/create_mysql.sql
angepasst werden.
Um die beiden Scipt-Dateien bearbeiten zu können, müssen die Dateizugriffsrechte temporär wie folgt mit nachfolgendem Befehl angepasst werden:
# chmod 640 /var/www/html/webcyradm/scripts/*mysql.sql
Zum Abschluss der Bearbeitung der Scipr-Dateien , müssen die Dateizugriffsrechte mit folgendem Befehl wieder zurückgesetzt werden:
# chmod 440 var/www/html/webcyradm/scripts/*mysql.sql
insertuser_mysql.sql
Hier die komplette Scipt-Datei /var/www/html/webcyradm/scripts/insertuser_mysql.sql
:
connect mysql; INSERT INTO user (Host, User, Password, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv) VALUES ('localhost', 'myuser', PASSWORD('geheim'), 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N'); INSERT INTO db (Host, Db, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Grant_priv, References_priv, Index_priv, Alter_priv) VALUES ('localhost', 'mail', 'myuser', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y '); flush privileges; create database mail;
Zum Import der SQL-Anweisungen aus /var/www/html/webcyradm/scripts/insertuser_mysql.sql
nach MySQL ist folgender Befehl notwendig:
/usr/bin/mysql -u root -p < /var/www/html/webcyradm/scripts/insertuser_mysql.sql
create_mysql.sql
Hier die komplette Scipt-Datei /var/www/html/webcyradm/scripts/create_mysql.sql
:
# phpMyAdmin MySQL-Dump # version 2.2.6 # http://phpwizard.net/phpMyAdmin/ # http://www.phpmyadmin.net/ (download page) # # Host: localhost # Generation Time: Nov 04, 2002 at 01:44 AM # Server version: 3.23.52 # PHP Version: 4.2.3 # Database : `mail` # -------------------------------------------------------- # Tachtler - new - use mail; # # Table structure for table `accountuser` # CREATE TABLE accountuser ( username varchar(255) binary NOT NULL default '', password varchar(50) binary NOT NULL default '', prefix varchar(50) NOT NULL default '', domain_name varchar(255) NOT NULL default '', imap int(10) NOT NULL default '1', pop int(10) NOT NULL default '1', sieve int(10) NOT NULL default '1', smtpauth int(10) NOT NULL default '1', UNIQUE KEY username (username) ) TYPE=MyISAM; # -------------------------------------------------------- # # Table structure for table `adminuser` # CREATE TABLE adminuser ( username varchar(50) binary NOT NULL default '', password varchar(50) binary NOT NULL default '', type int(11) NOT NULL default '0', SID varchar(255) NOT NULL default '', home varchar(255) NOT NULL default '', PRIMARY KEY (username) ) TYPE=MyISAM; # -------------------------------------------------------- # # Table structure for table `settings` # CREATE TABLE settings ( `username` varchar(50) binary NOT NULL default '', `style` varchar(50) NOT NULL default 'default', `maxdisplay` int(4) NOT NULL default '15', `warnlevel` int(3) NOT NULL default '90', PRIMARY KEY (username) ) TYPE=MyISAM; # -------------------------------------------------------- # # Table structure for table `alias` # CREATE TABLE alias ( alias varchar(255) NOT NULL default '', dest longtext, username varchar(50) NOT NULL default '', status int(11) NOT NULL default '1', PRIMARY KEY (alias) ) TYPE=MyISAM; # -------------------------------------------------------- # # Table structure for table `domain` # CREATE TABLE domain ( domain_name varchar(255) NOT NULL default '', prefix varchar(50) NOT NULL default '', maxaccounts int(11) NOT NULL default '20', quota int(10) NOT NULL default '20000', domainquota int(10) NOT NULL default '0', transport varchar(255) NOT NULL default 'cyrus', freenames enum('YES','NO') NOT NULL default 'NO', freeaddress enum('YES','NO') NOT NULL default 'NO', folders varchar(255) NOT NULL default '', PRIMARY KEY (domain_name), UNIQUE KEY prefix (prefix) ) TYPE=MyISAM; # -------------------------------------------------------- # # Table structure for table `domainadmin` # CREATE TABLE domainadmin ( domain_name varchar(255) NOT NULL default '', adminuser varchar(255) NOT NULL default '' ) TYPE=MyISAM; # -------------------------------------------------------- # # Table structure for table `search` # CREATE TABLE search ( search_id varchar(255) NOT NULL default '', search_sql text NOT NULL, perpage int(11) NOT NULL default '0', timestamp timestamp(14) NOT NULL, PRIMARY KEY (search_id), KEY search_id (search_id) ) TYPE=MyISAM; # -------------------------------------------------------- # # Table structure for table `virtual` # CREATE TABLE virtual ( alias varchar(255) NOT NULL default '', dest longtext, username varchar(50) NOT NULL default '', status int(11) NOT NULL default '1', KEY alias (alias) ) TYPE=MyISAM; CREATE TABLE log ( id int(11) NOT NULL auto_increment, msg text NOT NULL, user varchar(255) NOT NULL default '', host varchar(255) NOT NULL default '', time datetime NOT NULL default '2000-00-00 00:00:00', pid varchar(255) NOT NULL default '', PRIMARY KEY (id) ) TYPE=MyISAM; # Tachtler # default: INSERT INTO adminuser (username, password) VALUES ('admin', ENCRYPT('test')); INSERT INTO adminuser (username, password) VALUES ('admin', ENCRYPT('nochgeheimer')); INSERT INTO domainadmin (domain_name,adminuser) VALUES ('*','admin'); # Tachtler # default: INSERT INTO accountuser (username, password) VALUES ('cyrus', ENCRYPT('secret')); INSERT INTO accountuser (username, password) VALUES ('cyrus', ENCRYPT('geheim')); INSERT INTO `settings` ( `username` , `style` , `maxdisplay` , `warnlevel` ) VALUES ( 'admin', 'default', '15', '90'); ALTER TABLE `log` ADD INDEX `idx_log_user` ( `user` );
Zum Import der SQL-Anweisungen aus /var/www/html/webcyradm/scripts/create_mysql.sql
nach MySQL ist folgender Befehl notwendig:
/usr/bin/mysql -u myuser -p < /var/www/html/webcyradm/scripts/create_mysql.sql
/var/log/web-cyradm/web-cyradm-login.log
Nachfolgendes Verzeichnis und die darin enthaltene LOG-Datei müssen manuell angelegt werden, was mit nachfolgendem Befehlen durchgeführt werden kann:
# mkdir /var/log/web-cyradm
und
# touch /var/log/web-cyradm/web-cyradm-login.log
Anschließend sollten noch die Dateirechte und die Besitzrechte mit nachfolgenden Befehlen wie folgt angepasst werden:
# chmod 664 /var/log/web-cyradm/web-cyradm-login.log
und
# chown root.apache /var/log/web-cyradm/web-cyradm-login.log