aBit

阿比特

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

 

 

Install

Linux Email Server

 

Part 1)           Table of content

Part 1)    Table of content 1

Part 2)    Why use qmail 3

Part 3)    Resource. 3

Part 4)    Install 3

### 1. ### Uninstall old Email Server 4

# 1.1 Uninstall qmail 4

# 1.2 Uninstall old version vpopmail 4

### 2. ### Prepare Install qmail 5

# 2.1 Install apache. 5

# 2.2 Install mysql and change password. 5

# 2.3 Firewall 5

# 2.4 Disable SElinux. 5

# 2.5 Check system component 5

# 2.6 Service Configuration. 6

# 2.7 DNS Setting. 6

### 3. ### Install qmail 6

# 3.1. make qmail directory. 6

# 3.2 install user and group. 6

# 3.3, make some patch and install 7

# 3.4. change 451 to 553 at "straynewline" function. 7

# 3.5. computer full name. 7

# 3.6. add alias user 7

# 3.7. Stop sendmail / postfix if it work. 8

### 4. ### Install vpopmail 8

# 4.1 Add user & group. 8

# 4.2. create vpopmail database to mysql 8

# 4.3. Install ucspi-tcp. 9

# 4.4. Setup crontab for --enable-roaming-users (default is disabled) 9

# 4.5. Install vpopmail 9

# 4.6. add domain & use to vpopmail database & directory. 10

### 5. ### Install other component and Test Send/Receive. 10

# 5.1 Install cmd5checkpw. 10

# 5.2 Install daemontools. 10

# 5.3 Install relay-ctrl 11

# 5.4 make start shell 12

### 6. ### Install qmailAdmin. 12

# 6.1. Install autorespond. 12

# 6.2. Install ezmlm-idx. 12

# 6.3. Install qmailadmin. 13

# 6.4. Test qmailAdmin. 13

### 7. ### Install vQadmin. 13

# 7.1 Install vqadmin. 13

# 7.2 Setting apache. 13

# 7.3 Set vqadmin permission. 14

# 7.4. Test and View. 14

### 8. ### Install horde. 14

# 8.0. UnInstall old version Horde. 14

# 8.1. Install PEAR. 15

# 8.2. Install Horde. 15

# 8.3. Install IMP. 16

# 8.4. Install Turba. 18

# 8.5. Install wvWare. 20

### 9. ### SSL setting. 20

# 9.1. Generate SSL files. 20

# 9.2. Configuring SSL. 21

# 9.3. Optional Method 1. 21

# 9.4. Optional Method 2. 21

### 10.### Security. 22

Part 5)    ######## Appendix ########. 23

A ).     FAQ for horde. 23

B ).     Mysql devel directory. 23

C ).     Mysql password. 24

D ).     ApachePHP. 26

E ).     Fire wall 27

F ).     DNS. 27

G ).     Download Component URL. 29


 

Part 2)           Why use qmail

Here’s a quick comparison of qmail with some of the most common UNIX MTA's.

MTA

Maturity

Security

Features

Performance

Sendmailish

Modular

qmail

medium

high

high

high

addons

yes

Sendmail

high

low

high

low

x

no

Postfix

medium

high

medium

high

yes

yes

exim

medium

low

high

medium

yes

no

Courier

low

medium

high

medium

optional

yes

Part 3)           Resource

Excellent Life with qmail is a good guide to tour us how to install, also following have more install guide:

qmail Notes

qmail Documentation collection

qmail使用系统用户作为邮件账户的安装与配置

Redhat9.0Qmail完全安装笔记

Redhat9.0下安装qmail+igenus实录

Part 4)           Install

# Download emailServer.tar.gz to ‘/root’ and execute

tar zxvf emailServer.tar.gz

cd /root/ emailServer

ls

 

# Open an install guide book is a good way to get start. (COPY & PASTE THE COMMAND)

# start -> run program…

gedit /root/emailServer/Install.txt

Before install, Replace password “aBitpswd” to “youpass”.

 

### 1. ### Uninstall old Email Server

# 1.1 Uninstall qmail

 /etc/rc.d/init.d/qmail stop

 rm -rf /root/emailServer/qmail-1.03

 rm -rf /var/qmail

 

 # Delete group & User

 /usr/sbin/userdel qmaild

 /usr/sbin/userdel qmaill

 /usr/sbin/userdel qmailp

 /usr/sbin/userdel qmailq

 /usr/sbin/userdel qmailr

 /usr/sbin/userdel qmails

 /usr/sbin/userdel alias

 

 /usr/sbin/groupdel qmail

 /usr/sbin/groupdel nofiles

 

# 1.2 Uninstall old version vpopmail

 # Delete group & User

 /usr/sbin/userdel vpopmail

 /usr/sbin/groupdel  vchkpw

 

 rm -rf /var/qmail/control/virt*

 rm -rf /var/qmail/control/rcpt*

 rm -rf /var/qmail/control/more*

 rm -rf /var/qmail/control/locals 

 rm -rf /var/qmail/users/*

 

 rm -rf /home/vpopmail/*

 

# drop database vpopmail;

 mysql -u root -paBitpswd

 drop database vpopmail;

 quit

 

### 2. ### Prepare Install qmail

# 2.1 Install apache

if http://localhost can work normal, that's ok. If not:

install apache and php,

 

# start apache

 service httpd restart

 

# 2.2 Install mysql and change password

# add the password for root user

 service mysqld restart

 mysqladmin password 'aBitpswd'

 

# Test mysql visite states:

 mysql -u root -paBitpswd

 show databases;

 exit

 

# if you want to change password, format as:

 mysqladmin -uroot -paBitpswd password "testpswd"

# 2.3 Firewall

1) Execute command system-config-securitylevel

2) Open SMTP 25 and pop3 110 port.

# 2.4 Disable SElinux

1) Execute command system-config-securitylevel

2) if SElinux is enable,pls set it disable.

 

# 2.5 Check system component

(Applications->System Settings->Add/Remove Applications)

Server

       Server configuration Tools (install all)

       Web server  (install all)

       Mail server (not change)       

       Windows File Server (install all)

       DNS Name Server (install all)

       FTP Server  (not change)    

       PostgreSQL Database (not change)

       MySQL Database (install all)

       News Server  (not change)

       Network Servers  (not change)

       Legacy Network Server

              telnet-server (append it)

 

# 2.6 Service Configuration

(Applications->System Settings->Server Settings ->Services)

Select checkbox (to make it auto start app when system start)

       httpd

       mysqld

       named

      

       qmail (after install)

 

And save change. (file->save changes)

 

# 2.7 DNS Setting

# DNS Setting guide is

gedit /root/emailServer/dns/Install.txt

 

### 3. ### Install qmail

# 3.1. make qmail directory

 mkdir /var/qmail 

 mkdir /var/qmail/alias

 

# 3.2 install user and group

 /usr/sbin/groupadd nofiles 

 /usr/sbin/groupadd qmail 

 /usr/sbin/useradd alias -g nofiles -d /var/qmail/alias -s /nonexistent 

 /usr/sbin/useradd qmaild -g nofiles -d /var/qmail -s /nonexistent 

 /usr/sbin/useradd qmaill -g nofiles -d /var/qmail -s /nonexistent 

 /usr/sbin/useradd qmailp -g nofiles -d /var/qmail -s /nonexistent 

 /usr/sbin/useradd qmailq -g qmail -d /var/qmail -s /nonexistent 

 /usr/sbin/useradd qmailr -g qmail -d /var/qmail -s /nonexistent 

 /usr/sbin/useradd qmails -g qmail -d /var/qmail -s /nonexistent 

 

# 3.3, make some patch and install

 cd /root/emailServer

 tar zxvf qmail-1.03.tar.gz

 tar zxvf qmail-smtpd-auth-0.31.tar.gz

 

# make a "smtp-auth" patch to support smtp authentication.

 cp qmail-smtpd-auth-0.31/base64.* qmail-1.03 

 

 patch -d qmail-1.03 < qmail-smtpd-auth-0.31/auth.patch

 cd qmail-1.03

 patch -p1 < ../qmail-103.patch

 patch -p1 < ../qmailqueue-patch

 patch -p1 < ../qmail-maildir++.patch

 

 patch -p1 < ../qmail-1.03.errno.patch

 patch -p1 < ../qmail-1.03.qmail_local.patch

 

# 3.4. change 451 to 553 at "straynewline" function.

 vi qmail-smtpd.c 

 make setup check 

# 3.5. computer full name

 cd /root/emailServer/qmail-1.03

 ./config-fast mail.orocare.com  # NEED MODIFY

 ./config

# 3.6. add alias user

 touch /var/qmail/alias/.qmail-root 

 touch /var/qmail/alias/.qmail-postmaster 

 touch /var/qmail/alias/.qmail-mailer-daemon 

 

# 3.7. Stop sendmail / postfix if it work

 /etc/rc.d/init.d/sendmail stop 

 cp /var/qmail/bin/sendmail /usr/sbin/qmail.sendmail 

 

 rm -f /etc/alternatives/mta 

 ln -s /usr/sbin/qmail.sendmail /etc/alternatives/mta 

 

 rm -f /usr/lib/sendmail 

 ln -s /var/qmail/bin/sendmail /usr/lib/sendmail 

 

 rm -f /usr/sbin/sendmail 

 ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail 

 chmod 777 /usr/sbin/sendmail

 

### 4. ### Install vpopmail

# 4.1 Add user & group

 /usr/sbin/groupadd vchkpw

 /usr/sbin/useradd vpopmail -g vchkpw

# 4.2. create vpopmail database to mysql

 mysql -u root --password=aBitpswd

 create database vpopmail;

 grant all on vpopmail.* to vpop_aBitusnm@localhost identified by "vpop_aBitpswd";

 quit

 

# Create the configuration file that vpopmail will use

#   * Login with username vpopmail

#   * Login with password aBitpswd

#   * Use the database called vpopmail

#

 mkdir ~vpopmail/etc

 echo "localhost|0|vpop_aBitusnm|vpop_aBitpswd|vpopmail" > ~vpopmail/etc/vpopmail.mysql

 chown vpopmail.vchkpw ~vpopmail/etc/vpopmail.mysql

 chmod 6755 ~vpopmail/etc/vpopmail.mysql

# 4.3. Install ucspi-tcp

 cd /root/emailServer/

 tar zxvf ucspi-tcp-0.88.tar.gz

 cd ucspi-tcp-0.88

 patch -p1 < ../ucspi-tcp-0.88.a_record.patch

 patch -p1 < ../ucspi-tcp-0.88.errno.patch

 patch -p1 < ../ucspi-tcp-0.88.nobase.patch

 make

 make setup check

# 4.4. Setup crontab for --enable-roaming-users (default is disabled)

 su

 crontab -e

------------ edit ---------------

40 * * * * /home/vpopmail/bin/clearopensmtp 2>&1 > /dev/null

------------ edit ---------------

# 4.5. Install vpopmail

 cd /root/emailServer/

 wget http://heanet.dl.sourceforge.net/sourceforge/vpopmail/vpopmail-5.4.10.tar.gz

 tar zxvf vpopmail-5.4.10.tar.gz

 

 cd /root/emailServer/vpopmail-5.4.10

 

# switch the setting by enable/disable

 ./configure \

  --enable-roaming-users \

  --enable-logging=p \

  --enable-ip-alias-domains=y \

  --disable-passwd \

  --enable-clear-passwd \

  --disable-domain-quotas \

  --enable-auth-module=mysql\

  --disable-many-domains \

  --enable-auth-logging \

  --enable-sql-logging \

  --enable-valias \

  --disable-mysql-limits

 make

 make install-strip

 

 # --enable-ip-alias-domains

 # Support ip reverse parse to domains function

 

 # Set default

 echo "orocare.com" > ~vpopmail/etc/defaultdomain

 echo postmaster@orocare.com > /var/qmail/control/bouncefrom

 

 chmod 6755  /home/vpopmail/bin/vchkpw

# 4.6. add domain & use to vpopmail database & directory

 /home/vpopmail/bin/vadddomain orocare.com aBitpswd

 /home/vpopmail/bin/vadduser xie@orocare.com aBitpswd

 /home/vpopmail/bin/vadduser abit@orocare.com aBitpswd

### 5. ### Install other component and Test Send/Receive

# 5.1 Install cmd5checkpw

 cd /root/emailServer

 tar zxvf cmd5checkpw-0.22.tar.gz

 cd cmd5checkpw-0.22

 make

 make install

 

# If would have an error as bellow, skip it, go ahead. ("man" is just a help file)

# cp: cannot create regular file `/usr/man/man8/cmd5checkpw.8': No such file or directory

# 5.2 Install daemontools

 mkdir -p /package

 chmod 1755 /package

 cd /package

 cp /root/emailServer/daemontools-0.76.errno.patch /package

 

 wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz

 tar -zxvf daemontools-0.76.tar.gz

 

 cd admin/daemontools-0.76/src

 patch < /package/daemontools-0.76.errno.patch

 

# Compile and set up the daemontools programs:

 cd /package/admin/daemontools-0.76/

 package/install

# 5.3 Install relay-ctrl

# 5.3.1 Install

 cd /root/emailServer

 rm -rf /root/emailServer/relay-ctrl-3.1.1

 tar -zxvf relay-ctrl-3.1.1.tar.gz

 cd relay-ctrl-3.1.1

 vi conf-man

# change "/usr/local/man" to "/usr/share/man"

 

 make

 ./installer

# 5.3.2 Create directory

 mkdir /var/spool/relay-ctrl

 mkdir /var/spool/relay-ctrl/allow

 chmod 700 /var/spool/relay-ctrl

 chmod 777 /var/spool/relay-ctrl/allow

 

# 5.3.3 Configuration

 mkdir /etc/relay-ctrl

 echo /var/spool/relay-ctrl/allow > /etc/relay-ctrl/RELAY_CTRL_DIR

 chown vpopmail:vchkpw /home/vpopmail/etc

 

# CHANGE tcprules (tcp.smtp.cdb) execute SEQUENCE!

 echo '127.0.0.1:allow,RELAYCLIENT=""' > /home/vpopmail/etc/tcp.smtp

 

 cd /home/vpopmail/etc

 tcprules tcp.smtp.cdb tcp.smtp.tmp < tcp.smtp

 chown vpopmail:vchkpw tcp.smtp.cdb

 

 

# 5.3.4 Make cron job

 vi /etc/crontab

 # add the following cron job to your system

------------------edit--------------

* * * * * root /usr/local/bin/envdir /etc/relay-ctrl /usr/local/bin/relay-ctrl-age

------------------edit--------------

 

# 5.4 make start shell

 cp /root/emailServer/copy/rc /var/qmail/

 cp /root/emailServer/copy/smtp /var/qmail/

 cp /root/emailServer/copy/pop3 /var/qmail/

 

# make a self start shell

 cp /root/emailServer/copy/qmail /etc/rc.d/init.d/qmail

 

 /sbin/chkconfig --add qmail

 /sbin/chkconfig --del sendmail

 

# Start / stop qmail

 /etc/rc.d/init.d/qmail start

#/etc/rc.d/init.d/qmail stop

# ps -ax | grep qmail

 

# now you can Test Send/Receive by outlook or other email clinet tool.

### 6. ### Install qmailAdmin

# 6.1. Install autorespond

 cd /root/emailServer

 tar -zxvf autorespond-2.0.4.tar.gz

 mv autorespond-2.0.4 autorespond

 cd autorespond

 make

 make install

# 6.2. Install ezmlm-idx

 cd /root/emailServer

 wget http://www.inter7.com/devel/ezmlm-0.53-idx-0.41.tar.gz

 tar -zxvf ezmlm-0.53-idx-0.41.tar.gz

 mv ezmlm-0.53-idx-0.41 ezmlm-idx

 cd ezmlm-idx

 make

 make install

# 6.3. Install qmailadmin

 cd /root/emailServer

 wget http://jaist.dl.sourceforge.net/sourceforge/qmailadmin/qmailadmin-1.2.7.tar.gz

 tar xvfz qmailadmin-1.2.7.tar.gz

 cd qmailadmin-1.2.7

 ./configure --enable-cgibindir=/var/www/cgi-bin --enable-htmldir=/var/www/html --enable-ezmlmdir=/root/emailServer/ezmlm-idx 

 

 make

 make install-strip

# 6.4. Test qmailAdmin

http://localhost/cgi-bin/qmailadmin

### 7. ### Install vQadmin

# 7.1 Install vqadmin

 cd /root/emailServer

 tar zxf vqadmin-2.3.2.tar.gz

 cd vqadmin-2.3.2

 ./configure

 make

 make install-strip

 

# 7.2 Setting apache

 vi /etc/httpd/conf/httpd.conf

 

# after DocumentRoot "/var/www/html" ,pls insert

------------------edit--------------

  <Directory "/var/www/cgi-bin/vqadmin">

    deny from all

    Options ExecCGI

    AllowOverride AuthConfig

    Order deny,allow

  </Directory>

------------------edit--------------

# 7.3 Set vqadmin permission

 cd /var/www/cgi-bin/vqadmin

 

 # Set the access control if want

 # vi vqadmin.acl

 

 # Set vqadmin.passwd

 vi .htaccess

------------------edit--------------

  AuthType Basic

  AuthUserFile /var/www/cgi-bin/vqadmin/vqadmin.passwd

  AuthName vQadmin

  require valid-user

  satisfy any

------------------edit--------------

# Replace you username & password

 /usr/bin/htpasswd -bc /var/www/cgi-bin/vqadmin/vqadmin.passwd admin aBitpswd

 

 chown apache vqadmin.passwd

 chmod 644 vqadmin.passwd

 

 /usr/sbin/apachectl stop

 /usr/sbin/apachectl start

# 7.4. Test and View

link: http://localhost/cgi-bin/vqadmin/vqadmin.cgi

and enter username & password (admin & aBitpswd)

### 8. ### Install horde

# 8.0. UnInstall old version Horde

 # remove horde folder

 rm -rf /var/www/html/horde

 

 # drop horde database

 mysql -h localhost -D horde -u horde --password=aBitpswd

 drop database horde;

 exit

# 8.1. Install PEAR

 cd /root/emailServer

 wget ftp://ftp.horde.org/pub/pear/pear-1.3.tar.gz

 cd /usr/share

 mv pear pear_backup

 tar xzf /root/emailServer/pear-1.3.tar.gz -C /usr/share

 chown root.root -R pear

# 8.2. Install Horde

# 8.2.1. Download and install Horde

 cd /root/emailServer

 wget ftp://ftp.horde.org/pub/horde/horde-3.0.4.tar.gz

 cd /var/www/html

 tar zxf /root/emailServer/horde-3.0.4.tar.gz

 mv horde-3.0.4 horde

# 8.2.2. Configuration

# Copy config files

 cd /var/www/html/horde/config

 for foo in *.dist; do cp -v $foo `basename $foo .dist`; done

 

# Set pemission for ftp

 cd /var/www/html/horde/config

 touch conf.php conf.php.bak

 chown apache:apache conf.php*

 

# 8.2.3. Create the horde database:

 cd /var/www/html/horde/scripts/sql

 vi create.mysql.sql

------------ edit ---------------

 # change PASSWORD('horde') -> PASSWORD('aBitpswd')  // replace you password

------------ edit ---------------

 

 # create the tables

 mysql --user=root --password=aBitpswd < create.mysql.sql

 

 # restart the mysql server

 mysqladmin --user=root --password=aBitpswd reload 

 

 # Test to see if you can connect to the database:

 mysql -h localhost -D horde -u horde --password=aBitpswd

 show tables;

 exit

# 8.3. Install IMP

# 8.3.1. Download and install IMP

 cd /root/emailServer

# download imp (Size=2.9M)

 wget http://ftp.horde.org/pub/imp/imp-h3-4.0.3.tar.gz

 tar xzf imp-h3-4.0.3.tar.gz -C /var/www/html/horde

 cd /var/www/html/horde

 mv imp-h3-4.0.3 imp

 

# 8.3.2. Configuration

# Copy config files

 cd /var/www/html/horde/imp/config

 for foo in *.dist; do cp -v $foo `basename $foo .dist`; done

 

# Set pemission for ftp

 cd /var/www/html/horde/imp/config

 touch conf.php conf.php.bak

 chown apache:apache conf.php*

 

 gedit servers.php

// command ALL the CODE and append following.

------------ edit ---------------

<?php

$servers['pop'] = array(

    'name' => 'POP3 Server',

    'server' => 'localhost.',

    'protocol' => 'pop3',

    'port' => 110,

    'folders' => '',

    'namespace' => '',

    'maildomain' => 'orocare.com',

    'realm' => 'mail.orocare.com',

    'preferred' => ''

);

------------ edit ---------------

 

# 8.3.3 Test IMP

# 1) Check following link

  http://localhost/horde/test.php

# if "PHP Module Capabilities" part have red/yellow color word.

# pls install corrclative package as following:

 

 cd /root/emailServer

 rpm -ivh php-domxml-4.3.9-3.i386.rpm

 rpm -ivh libc-client-2002e-8.i386.rpm

 rpm -ivh php-imap-4.3.9-3.i386.rpm

 rpm -ivh php-gd-4.3.9-3.i386.rpm

 rpm -ivh libmcrypt-2.5.7-3.i386.rpm

 rpm -ivh php-mcrypt-4.3.9-3.2.1.i386.rpm

 

 #2) Now is time to test IMP, browse to:

  http://localhost/horde/

 # type you  username@doname & password

 

# 8.3.4 Configure horde & IMP by WebUI.

1). Administrator (click in the tree) -> Setup -> Horde (horde)

1.1). Database -> Password to connect with (set your horde database password )

 

1.2). Preference System -> What preferences driver... (select SQL  Database) -> The name of the preference table... (set it = horde_prefs)

 

1.3). DataTree -> What backend... (select SQL Database) -> The name of the data table (set it = horde_datatree)

 

1.4). Problem Reporting -> ...where should problem report emails be sent?

 

1.5). Authentication -> The username to authenticate everyone as (set it =User)

 -- it would not show the Administrator item in the tree next time.

 

NOTE: if you want show the Administrator item in the tree.

you can set as:

vi /var/www/html/horde/config/conf.php

------------------------ edit ----------------------------

  $conf['auth']['admins'] = array('Administrator');

  $conf['auth']['params']['username'] = 'Administrator';

------------------------ edit ----------------------------

 

2). Options (click in the tree,IF NOT FUND,refresh tree) -> Edit Options for: (select Horde) -> Display Options -> What app... (select Mail) -> Save options.

 

3). The other is optional, the same as IMP & Turbo...

 

# 8.4. Install Turba

# 8.4.1. Download and install Horde

 cd /root/emailServer

 wget ftp://ftp.horde.org/pub/turba/turba-h3-2.0.2.tar.gz

 tar xzf turba-h3-2.0.2.tar.gz -C /var/www/html/horde

 cd /var/www/html/horde

 mv turba-h3-2.0.2 turba

 

# 8.4.2. Configuration

# Copy config files

 cd /var/www/html/horde/turba/config

 for foo in *.dist; do cp -v $foo `basename $foo .dist`; done

 

# Set pemission for ftp

 cd /var/www/html/horde/turba/config

 touch conf.php conf.php.bak

 chown apache:apache conf.php*

 

# create the tables

 cd /var/www/html/horde/turba/scripts/sql

 mysql --user=root --password=aBitpswd horde < turba_objects.mysql.sql

 

 # restart the mysql server

 mysqladmin --user=root --password=aBitpswd reload 

 

# Configure Turba to use MySQL to store all the contact data

 gedit /var/www/html/horde/turba/config/sources.php

------------ edit ---------------

** STEP 1. pls comment/delete all the code in page sources.php

      

** STEP 2. copy the following code to sources.php (PLS CHANGE THE PASSWORD)

 

** STEP 3. if need more function,you can active it by uncommand it's code.(such as LDAP)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++

<?php

/**

 * A local address book in an SQL database. This implements a per-user

 * address book.

 *

 * Be sure to create a turba_objects table in your Horde database

 * from the schema in turba/scripts/drivers/turba.sql if you use

 * this source.

 */

$cfgSources['localsql'] = array(

    'title' => 'My Addressbook',

    'type' => 'sql',

    'params' => array(

        'phptype' => 'mysql',

        'hostspec' => 'localhost',

        'username' => 'horde',

        'password' => 'aBitpswd', // REPLACE HERE

        'database' => 'horde',

        'table' => 'turba_objects'

    ),

    'map' => array(

        '__key' => 'object_id',

        '__owner' => 'owner_id',

        '__type' => 'object_type',

        '__members' => 'object_members',

        'name' => 'object_name',

        'email' => 'object_email',

        'homeAddress' => 'object_homeaddress',

        'workAddress' => 'object_workaddress',

        'homePhone' => 'object_homephone',

        'workPhone' => 'object_workphone',

        'cellPhone' => 'object_cellphone',

        'fax' => 'object_fax',

        'title' => 'object_title',

        'company' => 'object_company',

        'notes' => 'object_notes'

    ),

    'search' => array(

        'name',

        'email'

    ),

    'strict' => array(

        'object_id'

    ),

    'public' => false,

    'readonly' => false,

    'admin' => array(),

    'export' => true

);

 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++

# Final, you can test it by link

# http://localhost/horde/turba/

 

# 8.5. Install wvWare

# ---- For preview attachment (such as *.Doc; *.PDF)

# ---- wvWare include (wvHtml/ wvLatex/ wvCleanLatex/ wvPS/ wvDVI/ wvPDF/ wvMime/ wvText)

 

 cd /root/emailServer

 wget http://jaist.dl.sourceforge.net/sourceforge/wvware/wv-1.0.3.tar.gz

 tar zxvf wv-1.0.3.tar.gz

 cd wv-1.0.3

 

 ./configure

 make

 make install

 

 gedit /var/www/html/horde/config/mime_drivers.php

------------------edit--------------

$mime_drivers['horde']['msword']['location'] = '/usr/local/bin/wvHtml';

------------------edit--------------

### 9. ### SSL setting

# 9.1. Generate SSL files

 cd /root/emailServer/ssl

 

# 1.1) Generate public key for apache, no pass-phrase (-des3)

 openssl genrsa  -rand file1:file2:file3:file4:file5 -out orocare.key 1024

 

# Think of secure, you can add "-des3". it included pass-phrase.

# openssl genrsa 1024 -des3 > server.key

 

# 1.2) Generate the certificate signing request

 openssl req -new -key orocare.key > orocare.csr

 

# 1.3) Make a self-signed certificate

 openssl x509 -req -days 60 -in orocare.csr -signkey orocare.key > orocare.crt

 

# Change permission, only root can read, but can't write.

 chmod 400 *

 

# 9.2. Configuring SSL

vi /etc/httpd/conf.d/ssl.conf

------------ edit ---------------

   SSLCertificateFile /root/emailServer/ssl/orocare.crt

   SSLCertificateKeyFile /root/emailServer/ssl/orocare.key

------------ edit ---------------

# 9.3. Optional Method 1

vi /etc/httpd/conf/httpd.conf

 

# Append following code

------------ edit ---------------

# Virtual host Default Virtual Host

<VirtualHost *>

#     ServerSignature email

       DirectoryIndex index.php index.html index.htm index.shtml

#     SSLEngine on

       SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt

       SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key

#     SSLCertificateChainFile /etc/httpd/conf/ssl.crt/ca.crt

#     SSLCACertificateFile /etc/httpd/conf/ssl.crt/ca-bundle.crt

      

#       SSLOptions FakeBasicAuth ExportCertData CompatEnvVars StrictRequire OptRenegotiate  

#     LogLevel debug

#     HostNameLookups off

</VirtualHost>

------------ edit ---------------

# 9.4. Optional Method 2

 http://203.194.176.24

 Administrator -> Setup -> IMP

 -> External Utilities and Menu -> The location of the root certificates bundle.


 

 

### 10.### Security

# Confirm that you can NOT browse to this URLs:

      http://localhost/horde/config/

      http://localhost/horde/imp/config/

      http://localhost/horde/turba/config/

 

# if it can open,pls typed

 chmod 711 /var/www/html/horde/config

 chmod 711 /var/www/html/horde/imp/config

 chmod 711 /var/www/html/horde/turba/config

# Original is:

# chmod 755 /var/www/html/horde/config

 

# Set can NOT setting by Web UI.

 chown root:root /var/www/html/horde/config/conf.php*

 chown root:root /var/www/html/horde/imp/config/conf.php*

 chown root:root /var/www/html/horde/turba/config/conf.php*

# Original is:

# chown apache:apache /var/www/html/horde/config/conf.php*


 

              

Part 5)           ######## Appendix ########

A ).         FAQ for horde

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

Q: Any limitation or error when the attachment is Large ?

A: modify /etc/php.ini

 set upload_max_filesize = 6M (the default is 2M)

 memory_limit = 18M ; needs to be 3 times larger than max upload/attach

 Ref: http://www.empiresecurity.com/hello/Article160.htm

 

Q: Can we restricut the attachment size in the email ?

A: yes,can set it in vQadmin

 http://203.194.176.24/cgi-bin/vqadmin/vqadmin.cgi

 Modify Email Account   -> Quota in bytes (6291456=6M)

 

Q: the quota will be applied to every email within that email domain ???

A: the quota will be applied to email within that email domain

 

1)  set the domain quota.

2.1) the quota will be applied to the new email account;

2.2) the quota will be NOT applied to the email account which you added BEFORE.

 

Q: how to delete postfix (as below) when send email by horde?

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

This message was sent using IMP, the Internet Messaging Program.

 

A: It need modify file trailer.txt

 1) vi /var/www/html/horde/imp/config/trailer.txt

 2) update the text as you want.

B ).  Mysql devel directory

# At first, you must install mysql.

# and make sure it have directory "/usr/include/mysql" and  "/usr/lib/mysql"

# if you can't found it, please install follow diagram

<img placeholder>
C ).  Mysql password

# Test mysql

mysql

exit

 

# if have an error string as:

# ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

# it means mysql not start work, you can start it in service manager or type:

service mysqld start

 

# add the password for root user

mysqladmin password 'password'

# if you want to change password, format as:

 mysqladmin -uroot -paBitpswd password "testpswd"

 

# Test mysql visite states:

mysql -u root -ppassword

show databases;

exit

<img placeholder>

D ).  ApachePHP

# if http://localhost can work normally, that’s ok. If not:

install apache and php,

 

# start apache

service httpd restart

<img placeholder> 

E ).  Fire wall

Open SMTP 25 and pop3 110 port.

 

1) Start -> System settings -> Security level

2) select “No firewall” (temporarily)

<img placeholder>
F ).   DNS

# Test ip states

Ping mail.orocare.com # you ip address

 

If it can’t work normal, you need do:

# Start -> System Settings -> Network

<img placeholder>

G ).  Download Component URL

you can download the "emailServer.tar.gz" at

http://us.f1.yahoofs.com/bc/546c93ff/bc/soft/Share/emailServer.tar.gz.gz?bftP_gDBmbYNPOwR

 

and remember you must rename it as "emailServer.tar.gz".

posted on 2005-11-23 11:47  aBit  阅读(1008)  评论(0)    收藏  举报