Some minor correction and enhancements from user-input, updated software mentioned in the HOWTO

This commit is contained in:
delouw 2003-03-24 20:31:09 +00:00
parent 04e34047f1
commit 207df91225
1 changed files with 113 additions and 97 deletions

View File

@ -22,6 +22,15 @@
<revhistory>
<revision>
<revnumber>1.2.3</revnumber>
<date>2003-03-24</date>
<authorinitials>ldl</authorinitials>
<revremark>
Some minor correction and enhancements from user-input, updated software mentioned in the HOWTO
</revremark>
</revision>
<revision>
<revnumber>1.2.2</revnumber>
<date>2003-02-14</date>
@ -541,8 +550,11 @@
<para>Web-cyradm is the webinterface that allows you to perform the administrative tasks to your mailsystem.
This screenshot shows the domain administration part of Web-cyradm.</para>
<para>Web-cyradm is written in PHP, which is often installed on webservers.
Time to set up Web-cyradm takes just a few minutes.</para>
<para>Web-cyradm is written in PHP, the most sophisticated html-preprocessor language.
If you don't have a webserver with php installed, I would like to refer to my
<ulink url="http://www.delouw.ch/linux/apache.phtml">Apache-Compile-HOWTO</ulink>.
This document describes how to set up Apache with PHP and other modules</para>
<para>Web-cyradm is under active development from people around the globe. The list of features grows
with each release. If you like to contribute to web-cyradm, or you have a nice idea, feel free to contact
@ -625,8 +637,6 @@
Cyrus by yourself. SuSE does not ship a MySQL enabled Postifx.
</para>
<para>Redhat ships no cyrus-IMAP, but sasl1 is included (useless for this setup)</para>
<para>Please let me know about other distributions, especially Debian.</para>
<!-- Section2: Mysql -->
@ -643,8 +653,8 @@
<sect3><title>Building and installing</title>
<screen>
cd /usr/local
tar -xvzf mysql-3.23.55.tar.gz
cd mysql-3.23.55
tar -xvzf mysql-3.23.56.tar.gz
cd mysql-3.23.56
./configure \
--prefix=/usr/local/mysql \
@ -667,10 +677,6 @@ ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql
<screen>
chown -R mysql /usr/local/mysql/var
</screen>
<para>and change the line <option>user=root</option> to <option>user=mysql</option> in the file
<filename>/usr/local/mysql/bin/safe_mysqld</filename>
</para>
<para>
You may wish to start MySQL automatically at boottime, copy
<filename>/usr/local/mysql/share/mysql/mysql.server</filename> to <filename>/etc/init.d/</filename>
@ -729,7 +735,6 @@ make
make install
echo /usr/local/bdb/lib >> /etc/ld.so.conf
ldconfig
</screen>
@ -751,9 +756,9 @@ ldconfig
<screen>
cd /usr/local
tar -xvzf openssl-0.9.7.tar.gz
tar -xvzf openssl-0.9.7a.tar.gz
cd openssl-0.9.7
cd openssl-0.9.7a
./config shared
@ -798,6 +803,18 @@ Search for <option>-m486</option> and replace it i.e with <option>-march=athlon<
</sect3>
<sect3><title>Create the cyrus user</title>
<para>
On most systems there is no cyrus user and mailgroup per default. Check for a free UID, usually daemons are running with UID
less that 100. As example I'm using UID 96 like SuSE has in the default <filename>/etc/passwd</filename>.
</para>
<screen>
groupadd mail
useradd -u 96 -d /usr/cyrus -g mail cyrus
passwd cyrus
</screen>
<sect3><title>Building and installing Cyrus SASL</title>
<screen>
@ -814,7 +831,7 @@ cd cyrus-sasl-2.1.12
--with-dblib=berkeley \
--with-bdb-libdir=/usr/local/bdb/lib \
--with-bdb-incdir=/usr/local/bdb/include \
--with-openssl-dir=/usr/local/ssl \
--with-openssl=/usr/local/ssl \
--with-plugindir=/usr/local/lib/sasl2
@ -851,9 +868,11 @@ export CPPFLAGS="-I/usr/include/et"
--with-sasl=/usr/local/lib \
--with-perl \
--with-auth=unix \
--with-dbdir=/usr/local/bdb \
--with-bdb-libdir=/usr/local/bdb/lib \
--with-bdb-incdir=/usr/local/bdb/include \
--with-openssl=/usr/local/ssl \
--without-ucdsnmp \
--with-dbdir=/usr/local/bdb
make depend
make
@ -918,8 +937,6 @@ ln -s /etc/rc.d/init.d/cyrus /etc/rc.d/rc3.d/S20cyrus
ln -s /etc/rc.d/init.d/cyrus /etc/rc.d/rc3.d/K10cyrus
</screen>
<para>Attn the distributors: W H E N will all distributors use the same paths for the init script? thanks!</para>
</sect3>
@ -980,14 +997,15 @@ useradd -u 33333 -g 33333 -d /dev/null -s /bin/false postfix
<screen>
tar -xvzf postfix-2.0.3.tar.gz
tar -xvzf postfix-2.0.7.tar.gz
cd postfix-2.0.3
cd postfix-2.0.7
make makefiles 'CCARGS=-DHAS_MYSQL \
-I/usr/local/mysql/include/mysql -DUSE_SASL_AUTH \
-I/usr/local/include/sasl' 'AUXLIBS=-L/usr/local/mysql/lib/mysql \
-lmysqlclient -lz -lm -L/usr/local/lib -lsasl2'
-I/usr/local/include/sasl -I/usr/local/bdb/include' \
'AUXLIBS=-L/usr/local/mysql/lib/mysql \
-lmysqlclient -lz -lm -L/usr/local/lib -lsasl2 -L/usr/local/bdb/lib'
make
make install
</screen>
@ -1086,32 +1104,9 @@ ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
Origin-Site: <ulink url="http://www.web-cyradm.org">http://www.web-cyradm.org</ulink>
</para>
</sect3>
<sect3><title>Installing</title>
<para>Web-cyradm is written in PHP, the most sophisticated html-preprocessor language.
If you don't have a webserver with php installed, I would like to refer to my
<ulink url="http://www.delouw.ch/linux/apache.phtml">Apache-Compile-HOWTO</ulink>.
This document describes how to set up Apache with PHP and other modules</para>
<tip><title>php.ini</title>
<para>Since web-cyradm is under heavy development, it maybe does not work properly with
PHP 4.2.1 or newer. In such a case, please edit your <filename>/usr/local/lib/php.ini</filename>
and set <varname>register_globals=On</varname>. Please report any bugs on
<ulink url="http://bugs.web-cyradm.org/bugzilla">
http://bugs.web-cyradm.org/bugzilla</ulink> </para></tip>
<para>Web-cyradm 0.5.3 is considered stable, and is released on 2003-03-05</para>
<para>Since web-cyradm uses PEAR for its database abstraction layer, you also need a recent
copy of PEAR. This is included in recent PHP Versions. I strongly suggest to update PHP
to 4.3.0, because a lot of important bugs have been fixed.
</para>
<para>An often mistake is to forget to touch the logfile and change the owner to the
UID that Apache use. This is usually »nobody« or »wwwrun«.</para>
<screen>
cd /usr/local/apache/htdocs
@ -1120,12 +1115,77 @@ tar -xvzf web-cyradm-0.5.3.tar.gz
touch /var/log/web-cyradm.log
chown nobody /var/log/web-cyradm.log
</screen>
<para>After unpacking web-cyradm, move it to a place in your webservers DocumentRoot</para>
<para>Thats all. Now you need to configure the whole bunch of software.</para>
<para>After unpacking web-cyradm, move it to a place in your webservers DocumentRoot</para>
<para>Thats all. Now you need to configure the whole bunch of software.</para>
<para>Web-cyradm 0.5.3 is considered stable, and was released on 2003-03-24</para>
<para>Since web-cyradm uses PEAR for its database abstraction layer, you also need a recent
copy of PEAR. This is included in recent PHP Versions. I strongly suggest to update PHP
to 4.3.1, because a lot of important bugs have been fixed.
</para>
<para>An often mistake is to forget to touch the logfile and change the owner to the
UID that Apache use. This is usually »nobody« or »wwwrun«.</para>
</sect3>
</sect2>
<sect3 id="mysql-create-db">
<title>Create the databases and tables</title>
<para>Now we need to create the database and tables for Postfix and Web-cyradm and add a user to the
database.</para>
<para>
Web-cyradm comes with three MySQL scripts: <filename>insertuser_mysql.sql</filename> and
<filename>create_mysql.sql</filename>.
The first inserts the Database user to the database »mysql« and creates the database »mail«. The
second creates the needed tables and populates the database with an initial admin-user and the
cyrus user.</para>
<para>The third script is used for upgrading from Web-cyradm 0.5.2 to 0.5.3.</para>
<para>The password for the database user »mail« in this example is »secret«. Please insert whatever
user and password you like.</para>
<para>The username for the initial superuser is »admin« with the password »test«.</para>
<caution><title>Change the default password!</title>
<para>If a malicious user wants to gain unauthorized access to a system, the first try is always
the default username and password supplied by the vendor. It is IMPORTANT that you are changing them
in the scripts before applying them.</para></caution>
<para>After customizing the username and password, apply the scripts:</para>
<screen>
/usr/local/mysql/bin/mysql -u root -p &lt; \
/usr/local/apache/htdocs/web-cyradm/scripts/insertuser_mysql.sql
/usr/local/mysql/bin/mysql mail -u mail -p &lt; \
/usr/local/apache/htdocs/web-cyradm/scripts/create_mysql.sql
</screen>
</sect3>
<sect3 id="web-cyradm-update"><title>Upgrading from 0.5.2 to 0.5.3</title>
<para>In version 0.5.3 there us a small Database enhancement done. You can upgrade your Database by
issuing the MySQL script that commes with the distribution.</para>
<screen>
mysql mail -u mail -p &lt; \
scripts/upgrade-0.5.2-to-0.5.3_mysql.sql
</screen>
<para>
Since Version 0.5.3 web-cyradm does have full support for DES crypted passwords. You can use the php-script
<filename>migrate.php</filename> to convert the users passwords from plain to unix compatible crypt (DES).
</para>
<caution><title>Migration from plain to crypt cannot be undone</title>
<para>Be sure to have a recent backup of your database before doing anything with the migration script.
</para></caution>
</sect3>
</sect2>
</sect1>
@ -1200,51 +1260,6 @@ allow 192.168.0.100
is attempting a connection, it is forwared to 127.0.0.1:3306. All other hosts are rejected. </para>
</sect2>
<sect2 id="mysql-create-db">
<title>Create the databases and tables</title>
<para>Now we need to create the database and tables for Postfix and Web-cyradm and add a user to the
database.</para>
<para>
Web-cyradm comes with three MySQL scripts: <filename>insertuser_mysql.sql</filename> and
<filename>create_mysql.sql</filename>.
The first inserts the Database user to the database »mysql« and creates the database »mail«. The
second creates the needed tables and populates the database with an initial admin-user and the
cyrus user.</para>
<para>The third script is used for upgrading from Web-cyradm 0.5.2 to 0.5.3.</para>
<para>The password for the database user »mail« in this example is »secret«. Please insert whatever
user and password you like.</para>
<para>The username for the initial superuser is »admin« with the password »test«.</para>
<caution><title>Change the default password!</title>
<para>If a malicious user wants to gain unauthorized access to a system, the first try is always
the default username and password supplied by the vendor. It is IMPORTANT that you are changing them
in the scripts before applying them.</para></caution>
<para>After customizing the username and password, apply the scripts:</para>
<screen>
/usr/local/mysql/bin/mysql mail -u mail -p &lt; \
/usr/local/apache/htdocs/web-cyradm/scripts/insertuser_mysql.sql
/usr/local/mysql/bin/mysql mail -u mail -p &lt; \
/usr/local/apache/htdocs/web-cyradm/scripts/create_mysql.sql
</screen>
<tip><title>Compatiblity to Replex</title>
<para>Please note, this setup for Web-cyradm is fully compatible with Replex, another project.
Please see <ulink url="http://www.replex.org">http://www.replex.org</ulink>
for more details.</para></tip>
</sect2>
</sect1>
<sect1 id="pam-config">
@ -1255,11 +1270,11 @@ allow 192.168.0.100
<para>You have to create the file <filename>/etc/pam.d/imap</filename> with the following entries:</para>
<screen>
auth sufficient pam_mysql.so user=mail passwd=secret host=localhost db=mail table=accountuser usercolumn=username passwdcolumn=password crypt=0
auth sufficient pam_mysql.so user=mail passwd=secret host=localhost db=mail table=accountuser usercolumn=username passwdcolumn=password crypt=1
auth sufficient pam_unix_auth.so
account required pam_mysql.so user=mail passwd=secret host=localhost db=mail table=accountuser usercolumn=username passwdcolumn=password crypt=0
account required pam_mysql.so user=mail passwd=secret host=localhost db=mail table=accountuser usercolumn=username passwdcolumn=password crypt=1
account sufficient pam_unix_acct.so
</screen>
@ -1305,7 +1320,7 @@ flags= user=cyrus argv=/usr/cyrus/bin/deliver -r ${sender} -m ${extension} ${use
</para>
<para>
A look to the cyrus man-pages <command>man deliver</command>clears that issue:
A look to the cyrus man-pages <command>man deliver </command>clears that issue:
</para>
<para>
@ -1843,7 +1858,8 @@ First you have to (re-)start all the daemons affected </para>
</listitem>
</itemizedlist>
<para>Hopefully all daemons started without any complaints...</para>
<para>Hopefully all daemons started without any complaints. Note that this is assuming saslauthd is started
in the cyrus startup script.</para>
<para>Now you can verify if the daemons are running properly by issuing
<command>netstat -an|grep LISTEN</command></para>