[FUGSPBR] Cyrus-imap && Web-cyradm

Carlos Augusto Silva carlos em tvcultura.com.br
Seg Jul 1 12:11:57 BRT 2002


Segue abaixo uma receita de bolo. Não sei se funciona bem no Free, mas vale tentar. :)
Até mais,
Carlos

-----------------------------------------------------------------------------------------------------------------------

Getting and installing the softwarePostfix-Cyrus-Web-cyradm-HOWTO
      PrevNext



3. Getting and installing the software
Most of the software is included in your Linux distribution. SuSE is shipping 
Cyrus as far as I know since 7.1 and Redhat at least since recent time. 
I suggest you to install Cyrus and SASL as binary from rpm. Postfix is needed to 
compile by yourself because the lack of MySQL support by the rpm's from the 
distributors. 
3.1. Getting and installing MySQL
3.1.1. Download
Origin-Site: http://www.mysql.com/downloads/ 
3.1.2. Building and installing
cd /usr/local
tar -xvzf mysql-3.23.49a.tar.gz
cd mysql-3.23.49a

./configure \
--prefix=/usr/local/mysql \
--enable-assembler \
--with-innodb

make
make install

/usr/local/mysql/bin/mysql_install_db
echo /usr/local/mysql/lib/mysql >> /etc/ld.so.conf
ldconfig


For security-improvement add a mysql-user on your system i.e. "mysql", then
chown -R mysql /usr/local/mysql/var


and change the line user=root to user=mysql in the file 
/usr/local/mysql/bin/safe_mysqld 
you may wish to start mysql automatically at boottime, copy 
/usr/local/mysql/share/mysql/mysql.server to /etc/init.d/ for SuSE and Redhat. 
Further you need to add Symlinks to /etc/init.d/rc3.d for SuSE and 
/etc/rc.d/rc3.d 
The following example is for SuSE Linux and should be easily changed for Redhat 
and other Linux distributions and commercial Unixes. 
cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/
ln -s /etc/init.d/mysql.server /etc/init.d/rc3.d/S20mysql
ln -s /etc/init.d/mysql.server /etc/init.d/rc3.d/k08mysql


3.2. Getting and installing Postfix
3.2.1. Download
Origin-Site: http://www.postfix.org/ftp-sites.html 
3.2.2. Creating a User-ID (UID) and Group-ID (GID) for postfix
Before you can build and install postfix you have to be sure a »postfix« and a 
»postdrop« groups and users exists on the System. First check for the groups. 
You can check this by grep postfix /etc/group and grep maildrop /etc/group 
If there are no such groups and users, you just create them. Search for a free 
nummeric UID and GID. In the following example I will use UID and GID 33333 for 
Postfix and 33335 for the maildrop UID and GID. This ID's are corresponding to 
other documents. 
groupadd -g 33333 postfix
groupadd -g 33335 maildrop

useradd -u 33333 -g 33333 -d /dev/null -s /bin/false postfix
useradd -u 33335 -g 33335 -d /dev/null -s /bin/false maildrop


3.2.3. Building and installing
The following screen shows what you have to do, if you installed MySQL from 
source as described above. If you installed MySQL from a binary package such as 
rpm or deb, then you have to change the include and library-flags to 
-I/usr/include/mysql and -L/usr/lib/mysql. 
tar -xvzf postfix-1.1.7.tar.gz

cd postfix-1.1.7

make -f Makefile.init makefiles \
'CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include' \
'AUXLIBS=-L/usr/local/mysql/lib -lmysqlclient -lz -lm'

make install


During make install a few question are asked. Just pressing Enter should match 
your needs. For Redhat users it could be useful to enter /usr/local/share/man
3.3. Getting and installing Cyrus IMAP
3.3.1. Download and installing
Like mentioned above, SuSE and Redhat are shipping Cyrus in their distributions. 
Just use yast or the corresponding tool in Redhat.
  cyrus-imapd-devel-2.0.16-115 
  cyrus-sasl-1.5.24-157 
  cyrus-sasl-gssapi-1.5.24-157 
  cyrus-sasl-devel-1.5.24-157 
  perl-Cyrus-IMAP-2.0.16-115 
  perl-Cyrus-SIEVE-acap-2.0.16-115 
  perl-Cyrus-SIEVE-managesieve-2.0.16-115 
  cyrus-imapd-2.0.16-115 
If you like, you can install it also on the commandline using: rpm -ihv (package-name).rpm


Be sure to use only the lastest available version, so check out the 
downloads-site of your distribution
3.4. Getting and installing pam_mysql
3.4.1. Download
Origin-Site: http://sourceforge.net/projects/pam-mysql/ 
3.4.2. Installing
tar -xvzf pam_mysql-0.4.7.tar.gz

cd pam_mysql

make

cp pam_mysql.so /lib/security


3.5. Getting and installing Web-cyradm
3.5.1. Download
Origin-Site: http://www.delouw.ch/linux/web-cyradm 
3.5.2. Installing
Web-cyradm is written in PHP. If you don't have a webserver with php installed, 
I like to refer to my Apache-Compile-HOWTO. That document describes how to set 
up Apache with PHP and other modules
cd /usr/local/apache/htdocs

tar -xvzf web-cyradm-latest.tar.gz


After unpacking web-cyradm move it to a place in your webservers DocumentRoot
This is all, now we need to configure the whole bunch of software


      PrevHomeNext
      Technologies Configuration


  ----- Original Message ----- 
  From: Luis Nardella 
  To: FUGSPBR 
  Sent: Monday, July 01, 2002 12:06 PM
  Subject: [FUGSPBR] Cyrus-imap && Web-cyradm


  Olá lista...

  Estou estudando para implementar servidores de email visando High Availability, explorando os recursos mais utilizados e requeridos em um mail server como, virtualhosts, virtualusers, etc... e uma boa interface WEB de preferencia em PHP.

  Estive estudando uma solução já pronta chamada Web-cyradm (Interface WEB em PHP) que envolve o MTA Postfix (minha preferência), o cyrus-imapd (IMAP/POP), cyrus-sasl (auth segura fora da base do sistema), pam_mysql (para autenticar no MySQL) e obviamente o MySQL.

  Apesar de tirar boas conclusões do seu funcionamento, estou tendo dificuldades para implementar no FreeBSD, (atualmente uso em meu webserver FreeBSD 4.6 - RELEASE), pq originalmente a solução foi baseada em Linux, mas aparentemente nao teria nenhum impedimento para rodar em outros SOs que tbm tivessem suporte aos softwares envolvidos.

  Gostaria de saber se alguém de vcs já estiveram testando/usando esta solução para compartilharmos experiências.

  Para quem não conheçe e gostaria de conhecer, faço referência ao site do projeto e o Howto que estou consultando.

  Site:  http://www.delouw.ch/linux/
  Howto: http://www.delouw.ch/linux/Postfix-Cyrus-Web-cyradm-HOWTO/html/index.html

  Minha outra alternativa que estou estudando tbm, seria Postfix + Courier-imapd + MySQL e a interface administrativa eu mesmo desenvolveria em PHP. Esta que estou vendo mais futuro, pois o cyrus é muito pouco popular e por isso não tem muita documentação disponível.

  Eu inicialmente nao teria necessidade em estar usando IMAP mas parece que para este tipo de necessidade nao teria como fugir disso. (Me corrigam se estiver errado)

  Se alguém quiser trocar informações, estou a disposição.

  Grato,

  ==
  Luis H. Nardella [NarDvK]
  Unix Systems/Network Administrator 
  e-mail: <nardvk em linuxbr.com.br>
  ICQ: 107985960
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://www.fug.com.br/pipermail/freebsd/attachments/20020701/028f8bb3/attachment.html>


Mais detalhes sobre a lista de discussão freebsd