源码搭建全功能邮件系统(5)

  Maildrop

1.安装

安装maildrop前需要先安装pcre

#./configure

#make

#make install

安装 maildrop

#./configure --prefix=/usr/local/maildrop --enable-sendmail=/usr/sbin/sendmail --enable-trusted-users='root zhousong' --enable-syslog=1 --enable-maildirquota --enable-maildrop-uid=500 --enable-maildrop-gid=500 --with-trashquota --with-dirsync

#make

#make install

# cp /usr/local/maildrop/bin/maildrop /usr/bin

 

2.配置

1# vim /etc/maildroprc

加入如下内容:

logfile "/home/domains/maildrop.log"

to "$HOME/Maildir"

 

2)配置postfix

# vim /etc/postfix/master.cf

添加如下内容:

maildrop   unix  -       n       n       -       -       pipe

  flags=DRhu user=zhousong:zhousong argv=/usr/local/maildrop/bin/maildrop -w 90 -d ${recipient}

注:flags=DRhu前面必须有两个空格

#vim /etc/postfix/main.cf

添加如下内容:

maildrop_destination_recipient_limit = 1

 

     Courier-imap

1. 安装

# ./configure \

--prefix=/usr/local/courier-imap  \

--with-redhat \

--disable-root-check  \

--with-trashquota  \

--with-dirsync \

--with-mysql-libs=/usr/local/mysql/lib/mysql \

--with-mysql-includes=/usr/local/mysql/include/mysql/ \

--with-authmysql \

--with-authmysql=yes

#make

#make install

# make install-configure

 

2.  配置

在此我们只使用pop3

1# cd /usr/local/courier-imap/etc

# cp -rf imapd.dist imapd

# cp -rf pop3d.dist pop3d

#cp -rf imapd-ssl.dist imapd-ssl

# cp -rf pop3d-ssl.dist pop3d-ssl

#vim imapd

IMAPDSTART=NO

 

#vim imapd-ssl

IMAPDSSLSTART=NO

 

#vim pop3d

POP3DSTART=YES

 

# vim pop3d-ssl

POP3DSSLSTART=NO

2)配置启动

#cd /usr/src/courier-imap-4.8.1

# cp courier-imap.sysvinit /etc/init.d/courier-imap

# chmod 755 /etc/init.d/courier-imap

 

 

  ExtMailExtMan

1.  安装

要安装并使用Extmail至少要满足如下的系统条件:
必备Perl模块
          o DB_File(
可到CPAN下载)
          o Fcntl
          o DBI
          o Benchmark

# mv extmail-1.2 /usr/local/apache/htdocs/extmail

#mv extman-1.1 /usr/local/apache/htdocs/extman

2.  配置

1extmail

#cd  /usr/local/apache/htdocs/extmail/

#cp webmail.cf.default webmail.cf

#vim webmail.cf

主要变动的内容见下:

 

 

SYS_MYSQL_USER = extmail

SYS_MYSQL_PASS = extmail

SYS_MYSQL_DB = extmail

 

更新cgi目录权限 由于SuEXEC的需要,必须将extmailcgi目录修改成zhousong:zhousong权限

# chown -R zhousong:zhousong /usr/local/apache/htdocs/extmail/cgi

2extman

# chown -R zhousong:zhousong /usr/local/apache/htdocs/extman/cgi

 

3)初始化数据库

 # vim extmail.sql

uidnumber int(6) NOT NULL default '500',

gidnumber int(6) NOT NULL default '500',

 

#mysql -u root -p < /usr/local/apache/htdocs/extman/docs/extmail.sql

#vim  init.sql

# mysql -u root -p < /usr/local/apache/htdocs/extman/docs/init.sql

 

(1)       配置postfix

#cd  /usr/local/apache/htdocs/extman/docs/

# cp mysql_virtual_alias_maps.cf /etc/postfix/

# cp mysql_virtual_domains_maps.cf /etc/postfix/

# cp mysql_virtual_mailbox_maps.cf /etc/postfix/

# cp mysql_virtual_sender_maps.cf /etc/postfix/

 

# vim /etc/postfix/main.cf

# extmail config here

virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf

virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf

virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf

virtual_transport = maildrop:

 

 

3.  解决extman看不到验证码问题

登陆www.cpan.org下载GD

 # perl Makefile.PL

#make

#make install

 

4#/usr/local/apache/htdocs/extman/addon/mailgraph_ext/mailgraph-init start

解决/usr/local/apache/htdocs/extman/addon/mailgraph_ext/mailgraph-init startRRDs.pm错误问题

安装rrdtool软件包

解决/usr/local/apache/htdocs/extman/addon/mailgraph_ext/mailgraph-init startFile/Tail错误

#cpan File::Tail

 

5# /usr/local/apache/htdocs/extman/daemon/cmdserver -v –d

     功能性测试

解决/var/log/maillog 中报maildrop[24533]: Unable to create log file.错误

修改 /etc/maildroprclogfile "/var/mailbox/maildrop.log"   指定maildrop.log到一个zhousong可写的目录中,如logfile "/home/domains/maildrop.log"

 

解决/var/log/maillog中报maildrop[25192]: Unable to open mailbox.错误

修改/etc/maildroprcto "$HOME/$DEFAULT " 指定为"$HOME/Maildir"

本文出自 “周天琪” 博客,谢绝转载!

你可能感兴趣的:(源码,邮件,职场,休闲,全功能邮件系统)