<?php
/*************************************************************
$Id: manual1.php,v 1.5 2001/05/22 09:30:05 jimir Exp $
***************************************************************/
include("include/config.php");
include("lib/user.php");
include("db/class_mysql.php");
# Authenticate current user
$USER = new User;
if (!$USER->HTTPauthenticate($DBCONN)) {
$USER->http_refuse();
}
$activetab=0;
$showtabs=1;
include("manuals1_menu.php");
?>
<span class="headline">Replex manual</span><br><br>
<b>Table of contents</b><br>
<UL>
<LI><a href="#about">About Replex</a>
<LI><a href="#gstarted">Getting started</a>
<UL>
<LI><a href="#installation">Installation</a>
<LI><a href="#configuration">Configuration</a>
</UL>
<LI><a href="#license">License</a>
</UL>
<br>
<b><A NAME="about">About Replex</a></b><br><br>
Replex is an administrative tool for managing email on any Unix-like OS. It can handle multiple domains, users,<br>
mailing lists, etc. without requiring creation of Unix user accounts for mailboxes or authentication.
<br><br>
Replex is written in PHP4 and stores all information in a MySQL database. Replex rely on Postfix for SMTP and <br>
Cyrus for IMAP and POP3 accounts.
<br><br><br>
<b><A NAME="gstarted">Getting started</a></b><br><br>
Follow the instructions in the Installation and Configuration section, and you should be on your way.
<br><br>
Should you encounter any problems please use the forums at: <a href="http://sf.net/projects/replex" target="_blank">http://sf.net/projects/replex</a>
<br><br>
Enjoy yourself ;>
<br><br><br>
<b><A NAME="installation">Installation</a></b><br><br>
<pre>
To install Replex you need:
1. MySQL
2. Postfix MTA
3. Cyrus IMAPD
4. pam_mysql
5. Replex administration module
6. Apache
7. PHP
Here we will describe hot to install Replex on a
freshly installed Redhat 7.1 system. We will also
tell you where to find the RPMS for the software
needed to run Replex.
1. MySQL.
RPMS for mysql are shipped with Redhat 7.1, but are not
installed by default, so you will need to do that manually.
Install packages mysql*.rpm from disk 2.
2. Postfix (compiled with MySQL support).
You can get the rpm at ftp://ftp.proventum.net/pub/replex/RPMS/rh-7.x
Install it by running:
rpm -Uhv postfix-20010228_pl01release-4mysql.i386.rpm
If you get an error because sendmail is installed, just remove that first:
rpm -e sendmail sendmail-doc
3. Cyrus IMAPD
RPMS are available on Powertools CD which is part of
Redhat 7.1 distribution. Install it by running:
rpm -Uhv cyrus-imapd-2.0.9-3.i386.rpm
4. pam_mysql
You can get the rpm at ftp://ftp.proventum.net/pub/replex/RPMS/rh-7.x
Install it by running:
rpm -Uhv pam_mysql-0.4.7-1.i386.rpm
5. Replex administration module
Before we proceed we need to checkout Replex administration
module from the CVS repository (let's assume that you want
it installed in /data/replex):
cd /data
cvs -d:pserver:hide@address.com:/cvsroot/replex login
(when asked for password, just press enter)
cvs -z3 -d:pserver:hide@address.com:/cvsroot/replex co replex
If you do not already have Apache and PHP (with MySQL support)
installed proceed to steps 6 and 7.
6. Apache.
You can download the tarball from http://httpd.apache.org/
Installation:
tar xzvf apache_1.3.19.tar.gz
cd apache_1.3.19
./configure --prefix=/data/replex/apache --enable-shared=max --enable-module=most
make all install
7. PHP
You can download the tarball from http://php.net/
tar xzvf php-4.0.4pl1.tar.gz
cd php-4.0.4pl1
./configure --prefix=/data/php --with-apxs=/data/replex/apache/bin/apxs --with-mysql=/usr/
make all install
</pre>
<br><br><br>
<b><A NAME="configuration">Configuration</a></b><br><br>
<pre>
1. Cyrus IMAPD
Edit /etc/imapd.conf
set sasl_pwcheck_method to pam by making the last
line in the file read:
sasl_pwcheck_method: pam
You do not need to modify /etc/cyrus.conf unless
you want to increase the system performance by
telling cyrus to prefork a certain number of
pop3 and imap daemons.
Now you can start cyrus:
/etc/init.d/cyrus start
2. MySQL
Start MySQL (if not already running)
/etc/init.d/mysqld start
mysql -u[mysqladmin] -p[mysqladminpassword]
create database replex;
use 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 ('%', 'replex', PASSWORD('rpl_pass'), '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 ('%', 'replex', 'replex', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
flush privileges;
exit;
cd /data/replex
mysql -ureplex -prpl_pass replex
\. replex.sql
insert into adminuser (username, password) values ('admin', 'test');
insert into accountuser (username, password) values ('cyrus', 'cyr_pass');
3. Apache
To activate php uncomment the line in httpd.conf file that reads:
AddType application/x-httpd-php .php
Find a line:
DirectoryIndex index.html
and change it to
DirectoryIndex index.html index.php
At the bottom of the file add the following
apache directives:
php_flag asp_tags on
php_value include_path ".:/data/replex"
Alias /mailadmin /data/replex/admin
Start apache by running:
/data/replex/apache/bin/apachectl start
4. Replex administration module
cd /data/replex/include
cp config.edit.this.php config.php
Edit configuration file (config.php). Our test
configuration looks like this so far:
Cyrus Username and Password
$CYRUS_USERNAME="cyrus";
$CYRUS_PASSWORD="cyr_pass";
$CYRUS_HOST="localhost";
$CYRUS_PORT=143;
# MySQL Database, Username and Password
$MYSQL_DB="replex";
$MYSQL_USERNAME="replex";
$MYSQL_PASSWORD="rpl_pass";
$MYSQL_HOST="localhost";
$MYSQL_LOG_ON="0"; //1=ON, 0=OFF
$MYSQL_LOG_PATH="/data/replex/logs"; //e.g. /home/replex/logs
# Specifies minimum account-password length
$ACCOUNT_PASSWORD_LENGTH=8;
# Specifies account_values when creating a new domain
$ACCOUNT_MAXACCOUNT[0]=1;
$ACCOUNT_MAXACCOUNT[1]=10;
$ACCOUNT_MAXACCOUNT[2]=20;
$ACCOUNT_MAXACCOUNT[3]=50;
5. pam_mysql
In /etc/pam.d directory create two files imap and pop with
identical content:
auth required /lib/security/pam_mysql.so user=replex passwd=rpl_pass host=localhost db=replex table=accountuser usercolumn=username passwdcolumn=password crypt=0
account required /lib/security/pam_mysql.so user=replex passwd=rpl_pass host=localhost db=replex table=accountuser usercolumn=username passwdcolumn=password crypt=0
6. Postfix
Edit main.cf file and uncomment line:
mailbox_transport = cyrus
At the bottom of the file add the following two lines:
alias_maps = mysql:/etc/postfix/mysql-alias.cf
virtual_maps = mysql:/etc/postfix/mysql-virtual.cf
Edit master.cf file and chage argv=/cyrus/bin/deliver to
argv=/usr/cyrus/bin/deliver
Create two new configuration files in /etc/postfix directory
==============
mysql-alias.cf
==============
# alias_maps = mysql:/etc/postfix/mysql-alias.cf
#
# mysql config file for alias lookups on postfix
# comments are ok.
#
# the user name and password to log into the mysql server
hosts = replex
user = replex
password = rpl_pass
# the database name on the servers
dbname = replex
# the table name
table = alias
#
select_field = dest
where_field = alias
additional_conditions = and status = '1'
==============
mysql-virtual.cf
==============
#
# mysql config file for alias lookups on postfix
# comments are ok.
#
# the user name and password to log into the mysql server
hosts = replex
user = replex
password = rpl_pass
# the database name on the servers
dbname = replex
# the table name
table = virtual
#
select_field = dest
where_field = alias
additional_conditions = and status = '1'
</pre>
<br><br><br>
<b><A NAME="license">License</a></b><br><br>
Replex Copyright (c) 2001 Jimi Rønberg, Edin Kadribasic<br>
Replex is released under the terms of GNU GPL copy of which is in the COPYING file.
<br><br><br>
<% menu_html_trail() %>