天天看点

Postfix+dovecot+extmail+sasl+mysql源码安装手册

dovecot+postfix+courier-authlib+cyrus-sasl+extmail+extman安装配置

需要软件

Dovecot 客户端收发邮件(110/995/143/993等)

Postfix 邮件发送(25)

Extmail 邮件web页面

Extman exmail管理后台

Cyrus-sasl 邮件验证

Courier-authd 用户验证连接MYSQL程序

Httpd web访问

Mysql 存储用户信息

Php 动态网页支持

结构图(一定要读懂,很关键。)

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623316SdZp.png" target="_blank"></a>

shell&gt; tar zxvf apr-1.51.tar.gz

shell&gt; cd apr-1.51

shell&gt; ./configure –prefix=/data/sw/apr

shell&gt; make &amp;&amp; make install

shell&gt; tar zxvf apr-util-1.53.tar.gz

shell&gt; cd apr-util-1.53.tar.gz

shell&gt; ./configure –prefix=/data/sw/apr-util –with-apr=/data/sw/apr --enable-suexec

shell&gt; tar zxvf pcre-8.33.tar.gz

shell&gt; cd pcre-8.33

shell&gt; ./configure –prefix=/data/sw/pcre –enable-utf8

shell&gt; tar zxvf httpd-2.4.9.tar.gz

shell&gt; cd httpd-2.4.9

shell&gt; ./configure --prefix=/data/sw/httpd --enable-ssl --enable-cgi --enable-vhost-alias --enable-so --with-apr=/data/sw/apr --with-apr-util=/data/sw/apr-util --with-pcre=/data/sw/pcre

shell&gt; make&amp;&amp; make install

shell&gt; cd /data/sw/httpd/conf

shell&gt; vi httpd.conf

修改Listen 80 à

Listen 0.0.0.0:80

ServerName localhost:80

Shell&gt; echo “export PATH=$PATH:/data/sw/httpd/bin” &gt;&gt;/etc/profile

Shell&gt; source /etc/profile

启动httpd

Shell&gt; apachectl start

查看端口

Shell&gt; netstat –nlupt

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623320I1Dy.jpg" target="_blank"></a>

访问http://http-server/

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623320lwHT.png" target="_blank"></a>

Shell&gt; tar zxvf bison-3.0.tar.gz

Shell&gt; cd bison-3.0

Shell&gt; ./configure –prefix=/data/sw/bison

Shell&gt; make &amp;&amp; make install

Shell&gt; tar zxvf cmake-2.8.10.2.tar.gz

Shell&gt; cd cmake-2.8.10.2

Shell&gt; ./configure –prefix=/data/sw/cmake

Shell&gt; gmake

Shell&gt; make install

Shell&gt; groupadd –g 1000 mysql

Shell&gt; useradd –g mysql –u 1000 –d /dev/null –s /sbin/nologin mysql

Shell&gt; tar zxvf mysql-5.5.37.tar.gz

Shell&gt; cd mysql -5.5.37

Shell&gt; /data/sw/cmake/bin/cmake –DCMAKE_INSTALL_PREFIX=/data/sw/mysql –DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci

Shell&gt; cd /data/sw/mysql

Shell&gt; cp support-files/my-medium.cf ./my.cnf

Shell&gt; chown –R mysql:msyql /data/sw/mysql

Shell&gt; cd /data/sw/mysql/scripts/

Shell&gt; ./mysql_install_db --basedir=/data/sw/mysql/ --datadir=/data/sw/mysql/data --user=mysql --collation-server=utf8_general_ci

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623321aNTR.jpg" target="_blank"></a>

Shell&gt; echo “export PATH=$PATH:/data/sw/mysql/bin” &gt;&gt; /etc/profile

Shell&gt; echo “/data/sw/mysql/lib” &gt;&gt; /etc/ld.so.conf

Shell&gt; ldconfig –v

Shell&gt; mysqld_safe &amp;

Shell&gt; mysqladmin –uroot password ‘root’

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623321kxFH.jpg" target="_blank"></a>

Shell&gt; mysql –uroot –proot –e “show databases;”

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_140262332171MK.png" target="_blank"></a>

Shell&gt; tar zxvf DBI-1.631.tar.gz

Shell&gt; cd DBI-1.631

Shell&gt; perl MakeFile.pl

Shell&gt; tar zxvf Test-Deep-0112.tar.gz

Shell&gt; cd Test-Deep-0112

Shell&gt; perl Makefile.PL

Shell&gt; tar zxvf DBD-mysql-4.027.tar.gz

Shell&gt; cd DBD-mysql-4.027

Shell&gt; perl Makefile.PL --mysql_config=/data/sw/mysql/bin/mysql_config --testdb=test --testuser=root --testhost=localhost --testpassword=root --testport=3306 --testsocket=/tmp/mysql.sock

Shell&gt; make

Shell&gt; make test

Shell&gt; tar zxvf libiconv-1.14.tar.gz

Shell&gt; cd libiconv-1.14

Shell&gt; ./configure –prefix=/data/sw/libiconv

shell&gt; tar xvf libpng-1.6.8.tar.xz

shell&gt; cd libpng-1.6.8

shell&gt; ./configure

shell&gt; tar zxvf jpegsrc.v9a.tar.gz

shell&gt; cd jpeg-9a

shell&gt; ./configure –mandir=/usr/share/man/man1

shell&gt; tar zxvf zlib-1.2.7.tar.gz

shell&gt; cd zlib-1.2.7

shell&gt; tar xvf freetype-2.4.8.tar.bz2

shell&gt; cd freetype-2.4.8

shell&gt; tar zxvf fontconfig-2.11.1.tar.gz

shell&gt; cd fontconfig-2.11.1

shell&gt; ln –s /usr/local/lib/pkgconfig/freetype2.pc /usr/lib/pkgconfig/freetype2.pc

shell&gt; tar zxvf gd-2.0.33.tar.gz

shell&gt; cd gd-2.0.33

shell&gt; tar zxvf GD-2.53.tar.gz

shell&gt; cd GD-2.53

shell&gt; perl MakeFile

Shell&gt; tar zxvf php-5.5.12.tar.gz

Shell&gt; cd php-5.5.12

Shell&gt; ./configure –prefix=/data/sw/php –with-iconv-dir=/data/sw/libiconv –enable-fpm –with-mysql=/data/sw/mysql –with-apxs2=/data/sw/http/bin/apxs

Shell&gt; echo “export PATH=$PATH:/data/sw/php/bin:/data/sw/php/sbin” &gt;&gt;/etc/profile

shell&gt; cd php-5.5.12

Shell&gt; cp php.ini-development /data/sw/php/php.ini

Shell&gt; cd /data/sw/php

Shell&gt; cp etc/php-fpm.conf.default etc/php-fpm.conf

Shell&gt; echo “export PATH=$PATH:/data/sw/php/bin” &gt;&gt; /etc/profile

Shell&gt; vi /data/sw/httpd/conf/httpd.conf

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623322Ywlw.png" target="_blank"></a>

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623322kn8E.png" target="_blank"></a>

Shell&gt; cd /data/sw/httpd/htdocs

Shell&gt; mv index.html index.html.bak

Shell&gt; echo “&lt;?php phpinfo(); ?&gt;” &gt; index.php

Shell&gt; killall httpd

Shell&gt; apachectl

参考

<a href="http://chengchow.blog.51cto.com/1642666/1209233" target="_blank">http://chengchow.blog.51cto.com/1642666/1209233</a>

也可以不安装,通过修改hosts文件来解析域名和IP地址

shell&gt; tar zxvf tcl8.5.7-src.tar.gz

shell&gt; cd tcl8.5.7/unix

shell&gt; ./configure –bindir=/usr/bin –sbindir=/usr/sbin –libdir=/usr/lib –libexecdir=/usr/libexec –includedir=/usr/include –sysconfdir=/usr/local/etc

shell&gt;tar zxvf tk8.5.7.tar.gz

shell&gt; cd tk8.5.7/unix

shell&gt; tar zxvf expect-5.44.1.15.tar.gz

shell&gt; cd expect-5.44.1.15

## extmail修改密码需要

shell&gt; tar zxvf cyrus-sasl-2.1.26.tar.gz

shell&gt; cd cyrus-sasl-2.1.26

shell&gt; cp /data/sw/mysql/include/*.h /usr/include/.

Shell&gt; mkdir –p /var/run/cyrus-sasl

Shell&gt; chmod –R 755 /var/run/cyrus-sasl

shell&gt; ./configure --prefix=/data/sw/cyrus-sasl --enable-cram --enable-digest --enable-plain --enable-login --disable-anon --enable-sql --with-authdaemond=/data/sw/courier-authlib/var/spool/authdaemon/ --with-mysql=/data/sw/mysql/include/ --localstatedir=/var/run/cyrus-sasl

安装报错:cannot find –lmysqlclient

修改config.status文件

S["LIB_MYSQL"]="-L/data/sw/mysql/lib -Wl,-rpath,/data/sw/mysql/lib -lmysqlclient"

## 这个调参数调了几次都没成功,就手动修改了config.status文件了

启动

Shell&gt; ln –s /usr/local/lib/sasl2 /usr/lib/sasl2

## 否则telnet时报错mail postfix/smtpd[6777]: fatal: no SASL authentication mechanisms

Shell&gt; echo “export PATH=$PATH:/data/sw/cyrus-sasl/sbin” &gt;&gt;/etc/profile

Shell&gt; saslauthd -a shadow getpwent pam rimap -d &amp;

shell&gt; tar xvf courier-authlib-0.62.4.tar.bz2

shell&gt; cd courier-authlib-0.62.4

shell&gt; mkdir –p /var/run/courier-authlib

shell&gt; chmod –R 755 /var/run/courier-authlib

shell&gt; ./configure --prefix=/data/sw/courier-authlib --with-mailuser=postfix--with-mailgroup=postfix --with-mysql-libs=/data/sw/mysql/lib --with-mysql-includes=/data/sw/mysql/include –localstatedir=/var/run/courier-authlib

shell&gt; make

shell&gt; make install

Shell&gt; chmod 755 /data/sw/courier-authlib/var/spool/authdaemon

Shell&gt; cd /data/sw

Shell&gt; cp etc/authlib/authdaemonrc.dist etc/authlib/authdaemonrc

Shell&gt; cp etc/authlib/authmysqlrc.dist etc/authlib/authmysqlrc

Shell&gt; vi etc/authlib/authdaemonrc

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623322oYRB.jpg" target="_blank"></a>

## DEBUG_LOGIN=2详细日志,调试时用

Shell&gt; vi etc/authlib/authmysqlrc

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623323qSXo.jpg" target="_blank"></a>

Shell&gt; mkdir –p /home/domains

Shell&gt; chown –R postfix:postfix /home/domains

shell&gt; echo “export PATH=$PATH:/data/sw/courier-authlib/sbin” &gt;&gt; /etc/profile

shell&gt; source /etc/profile

shell&gt; echo “/data/sw/courier-authlib/lib/courier-authlib” &gt;&gt; /etc/ld.so.conf

shell&gt; ldconfig –v

shell&gt; authdaemond start

shell&gt; ps aux | grep authdaemond

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_14026233236ZAF.jpg" target="_blank"></a>

shell&gt; tar zxvf dovecot-2.2.13.tar.gz

shell&gt; cd dovecot-2.2.13

shell&gt; cp –r doc/example-config/* /data/sw/dovecot/etc/dovecot/.

Shell&gt; mkdir -p /etc/ssl/certs

Shell&gt; sh doc/mkcert.sh

shell&gt; echo “export PATH=$PATH:/data/sw/dovecot/bin:/data/sw/dovecot/sbin” &gt;&gt; /etc/profile

shell&gt; cd /data/sw/dovecot/etc/dovecot

shell&gt; vi dovecot.conf

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623324zbbs.png" target="_blank"></a>

Shell&gt; vi dovecot-mysql.conf

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623324mXF4.jpg" target="_blank"></a>

Shell&gt; doveconf –n &gt; dovecot.conf.new

Shell&gt; mv dovecot.conf dovecont.conf.old;mv dovecot.conf.new dovecot.conf

Shell&gt; dovecot

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623325cssw.jpg" target="_blank"></a>

将mysql库文件添加到ld.so.conf中

Shell&gt; echo “/data/sw/mysql/llib” &gt;&gt; /etc/ld.so.conf

shell&gt; groupadd -g 1001 postfix

shell&gt; useradd -g postfix -u 1001 -s /sbin/nologin -M postfix

shell&gt; groupadd -g 1002 postdrop

shell&gt; useradd -g postdrop -u 1002 -s /bin/nologin -M postdrop

shell&gt; ln –s /etc/postfix/aliases /etc/aliases

shell&gt; newaliases

Shell&gt; vi /etc/postfix/main.cf

Myhostname = mail.zhengwing.org

Myorigin = zhengwing.org

Mydomain = zhengwing.org

Mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

Mynetworks = 192.168.254.0/24, 127.0.0.1/8

Inet_interfaces = all

alias_maps = hash:/etc/aliases

创建aliases.db文件

Shell&gt; newaliases

Shell&gt; postfix start

Shell&gt; telnet 127.0.0.1 25

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623325OgBt.png" target="_blank"></a>

Shell&gt; postconf –a

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623328Cvum.png" target="_blank"></a>

## 在配置文件最后添加

SASL验证支持,以及一些邮件规则

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623329iLXf.jpg" target="_blank"></a>

虚拟邮箱支持

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623329V4pu.jpg" target="_blank"></a>

Quota支持

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_14026233294VVh.jpg" target="_blank"></a>

Shell&gt; postfix reload

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623330AwoT.png" target="_blank"></a>

Saslauthd支持authdaemond

Shell&gt; ln –s /data/sw/cyrus-sasl/lib/sasl2 /usr/lib/sasl2

Shell&gt; vi /usr/lib/sasl2/smtpd.conf

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623330ekdM.jpg" target="_blank"></a>

## 方框内配置可以不写,不影响使用,但日志会有auxprop的一个警告信息

Shell&gt; tar zxvf extmail -1.2.tar.gz –C /data/sw/httpd/htdocs

Shell&gt; tar zxvf extman-1.1.tar.gz –C /data/sw/httpd/htdocs

Shell&gt; mv extmail-1.2 extmail

Shell&gt; mv extman-1.1 extman

Shell&gt; chmod +x –R extmail/tools extman/tools

Shell&gt; chown –R postfix:postfix extmail/cgi extman/cgi

Shell&gt; cp extman/docs/mysql* /data/sw/dovecot/etc/dovecot/.

Extman和extmail配置文件,参考附1和附2

导入数据库

Shell&gt; /data/sw/httpd/htdocs/docs

修改extmail.sql中TYPE=MyISAM为ENGINE=MyISAM

Shell&gt; mysql –uroot –proot &lt; extmail.sql

Shell&gt; mysql –uroot –proot &lt; init.sql

Httpd虚拟域配置

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623330Rbrs.png" target="_blank"></a>

修改httpd的用户

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623331eYJY.png" target="_blank"></a>

## 也可以配置虚拟域用户,如上图注销部分,但是需要suexec模块支持

修改extmail/cgi/index.cgi首行

Shell&gt; sed -i '1c\#!/usr/bin/perl -w' /data/sw/httpd/htdocs/extmail/cgi/index.cgi

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623331WtJY.png" target="_blank"></a>

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623331B12G.png" target="_blank"></a>

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623331VaLQ.png" target="_blank"></a>

<b>重启所有服务</b>

Shell&gt; killall saslauthd

Shell&gt; killall mysqld

Shell&gt; killall dovecot

Shell&gt; apachectl stop

Shell&gt; authdaemond stop

Shell&gt; postfix stop

Shell&gt; authdaemond start

## extmail日志需要,可以不安装,这里使用syslog-ng,日志都集中发送到/var/log/message

Shell&gt; tar zxvf Unix-Syslog-1.1.tar.gz

Shell&gt; cd Unix-Syslog-1.1

<a href="http://192.168.254.200/extman/cgi/index.cgi" target="_blank">http://192.168.254.200/extman/cgi/index.cgi</a>

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623332VG2H.jpg" target="_blank"></a>

在extmail里面我们可以创建虚拟域,用户账号

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623332YAvt.jpg" target="_blank"></a>

登录mail.zhengzhou.org邮件发送功能

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623333Q9vV.jpg" target="_blank"></a>

这里可以注册邮箱(需要extman中启用,用户自动注册)

Extmail界面

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_14026233332oAW.jpg" target="_blank"></a>

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623333Sd2S.jpg" target="_blank"></a>

设置接收和发送邮件服务器,这里可以分别选择pop3和IMAP

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623334VCke.jpg" target="_blank"></a>

测试IMAP,POP3和SMTP

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623334UEvg.png" target="_blank"></a>

<a href="http://chengchow.blog.51cto.com/attachment/201406/13/1642666_1402623335J4pp.png" target="_blank"></a>

SYS_CONFIG = /data/sw/httpd/htdocs/extmail/

SYS_LANGDIR = /data/sw/httpd/htdocs/extmail/lang

SYS_TEMPLDIR = /data/sw/httpd/htdocs/extmail/html

SYS_HTTP_CACHE = 0

SYS_SMTP_HOST = 192.168.254.200

SYS_SMTP_PORT = 25

SYS_SMTP_TIMEOUT = 5

SYS_SPAM_REPORT_ON = 0

SYS_SPAM_REPORT_TYPE = dspam

SYS_SHOW_WARN = 0

SYS_IP_SECURITY_ON = 1

SYS_PERMIT_NOQUOTA = 1

SYS_SESS_DIR = /tmp

SYS_UPLOAD_TMPDIR = /tmp

SYS_LOG_ON = 1

SYS_LOG_TYPE = syslog

SYS_LOG_FILE = /var/log/extmail.log

SYS_SESS_TIMEOUT = 0

SYS_SESS_COOKIE_ONLY = 1

SYS_USER_PSIZE = 10

SYS_USER_SCREEN = auto

SYS_USER_LANG = zh_CN

SYS_APP_TYPE = WebMail

SYS_USER_TEMPLATE = default

SYS_USER_CHARSET = utf-8

SYS_USER_TRYLOCAL = 1

SYS_USER_TIMEZONE = +0800

SYS_USER_CCSENT = 1

SYS_USER_SHOW_HTML = 1

SYS_USER_COMPOSE_HTML = 1

SYS_USER_CONV_LINK =1

SYS_USER_ADDR2ABOOK = 1

SYS_MESSAGE_SIZE_LIMIT = 5242880

SYS_MIN_PASS_LEN = 2

SYS_MFILTER_ON = 1

SYS_NETDISK_ON = 1

SYS_SHOW_SIGNUP = 1

SYS_DEBUG_ON = 1

SYS_AUTH_TYPE = mysql

SYS_MAILDIR_BASE = /home/domains

SYS_AUTH_SCHEMA = virtual

SYS_CRYPT_TYPE = md5crypt

SYS_MYSQL_USER = extmail

SYS_MYSQL_PASS = extmail

SYS_MYSQL_DB = extmail

SYS_MYSQL_HOST = localhost

SYS_MYSQL_SOCKET = /tmp/mysql.sock

SYS_MYSQL_TABLE = mailbox

SYS_MYSQL_ATTR_USERNAME = username

SYS_MYSQL_ATTR_DOMAIN = domain

SYS_MYSQL_ATTR_PASSWD = password

SYS_MYSQL_ATTR_CLEARPW = clearpwd

SYS_MYSQL_ATTR_QUOTA = quota

SYS_MYSQL_ATTR_NDQUOTA = netdiskquota

SYS_MYSQL_ATTR_HOME = homedir

SYS_MYSQL_ATTR_MAILDIR = maildir

SYS_MYSQL_ATTR_DISABLEWEBMAIL = disablewebmail

SYS_MYSQL_ATTR_DISABLENETDISK = disablenetdisk

SYS_MYSQL_ATTR_DISABLEPWDCHANGE = disablepwdchange

SYS_MYSQL_ATTR_ACTIVE = active

SYS_MYSQL_ATTR_PWD_QUESTION = question

SYS_MYSQL_ATTR_PWD_ANSWER = answer

SYS_LDAP_BASE = o=extmailAccount,dc=example.com

SYS_LDAP_RDN = cn=Manager,dc=example.com

SYS_LDAP_PASS = secret

SYS_LDAP_HOST = localhost

SYS_LDAP_ATTR_USERNAME = mail

SYS_LDAP_ATTR_DOMAIN = virtualDomain

SYS_LDAP_ATTR_PASSWD = userPassword

SYS_LDAP_ATTR_CLEARPW = clearPassword

SYS_LDAP_ATTR_QUOTA = mailQuota

SYS_LDAP_ATTR_NDQUOTA = netdiskQuota

SYS_LDAP_ATTR_HOME = homeDirectory

SYS_LDAP_ATTR_MAILDIR = mailMessageStore

SYS_LDAP_ATTR_DISABLEWEBMAIL = disablewebmail

SYS_LDAP_ATTR_DISABLENETDISK = disablenetdisk

SYS_LDAP_ATTR_DISABLEPWDCHANGE = disablePasswdChange

SYS_LDAP_ATTR_ACTIVE = active

SYS_LDAP_ATTR_PWD_QUESTION = question

SYS_LDAP_ATTR_PWD_ANSWER = answer

SYS_AUTHLIB_SOCKET = /data/sw/courier-authlib/var/spool/authdaemon/socket

SYS_G_ABOOK_TYPE = file

SYS_G_ABOOK_LDAP_HOST = localhost

SYS_G_ABOOK_LDAP_BASE = ou=AddressBook,dc=example.com

SYS_G_ABOOK_LDAP_ROOTDN = cn=Manager,dc=example.com

SYS_G_ABOOK_LDAP_ROOTPW = secret

SYS_G_ABOOK_LDAP_FILTER = objectClass=OfficePerson

SYS_G_ABOOK_FILE_PATH = /data/sw/httpd/htdocs/extmail/globabook.cf

SYS_G_ABOOK_FILE_LOCK = 1

SYS_G_ABOOK_FILE_CONVERT = 0

SYS_G_ABOOK_FILE_CHARSET = utf-8

SYS_CONFIG = /data/sw/httpd/htdocs/extman/

SYS_LANGDIR = /data/sw/httpd/htdocs/extman/lang

SYS_TEMPLDIR = /data/sw/httpd/htdocs/extman/html

SYS_SESS_DIR = /tmp/

SYS_CAPTCHA_ON = 1

SYS_CAPTCHA_KEY = r3s9b6a7

SYS_CAPTCHA_LEN = 6

SYS_PURGE_DATA = 0

SYS_PSIZE = 20

SYS_APP_TYPE = ExtMan

SYS_TEMPLATE_NAME = default

SYS_DEFAULT_EXPIRE = 1y

SYS_GROUPMAIL_SENDER = [email protected]

SYS_DEFAULT_SERVICES = webmail,smtpd,smtp,pop3,netdisk

SYS_ISP_MODE = no

SYS_DOMAIN_HASHDIR = yes

SYS_DOMAIN_HASHDIR_DEPTH = 2x2

SYS_USER_HASHDIR = yes

SYS_USER_HASHDIR_DEPTH = 2x2

SYS_MIN_UID = 500

SYS_MIN_GID = 100

SYS_DEFAULT_UID = 1001

SYS_DEFAULT_GID = 1001

SYS_QUOTA_MULTIPLIER = 1048576

SYS_QUOTA_TYPE = courier

SYS_DEFAULT_MAXQUOTA = 500

SYS_DEFAULT_MAXALIAS = 100

SYS_DEFAULT_MAXUSERS = 100

SYS_DEFAULT_MAXNDQUOTA = 500

SYS_USER_DEFAULT_QUOTA = 5

SYS_USER_DEFAULT_NDQUOTA = 5

SYS_USER_DEFAULT_EXPIRE = 1y

SYS_BACKEND_TYPE = mysql

SYS_MYSQL_TABLE = manager

SYS_LDAP_BASE = dc=extmail.org

SYS_LDAP_RDN = cn=Manager,dc=extmail.org

SYS_RRD_DATADIR = /var/lib

SYS_RRD_TMPDIR = /tmp/viewlog

SYS_RRD_QUEUE_ON = yes

SYS_CMDSERVER_SOCK = /tmp/cmdserver.sock

SYS_CMDSERVER_MAXCONN = 5

SYS_CMDSERVER_PID = /var/run/cmdserver.pid

SYS_CMDSERVER_LOG = /var/log/cmdserver.log

SYS_CMDSERVER_AUTHCODE = your_auth_code_here

SYS_IGNORE_SERVER_LIST = web

# 2.2.13: /data/sw/dovecot/etc/dovecot/dovecot.conf

# OS: Linux 3.8.13-gentoo i686 Gentoo Base System release 2.1 ext3

auth_mechanisms = plain login

disable_plaintext_auth = no

listen = *

mail_location = maildir:/home/domains/%d/%n/Maildir

namespace inbox {

inbox = yes

location =

mailbox Drafts {

special_use = \Drafts

}

mailbox Junk {

special_use = \Junk

mailbox Sent {

special_use = \Sent

mailbox "Sent Messages" {

mailbox Trash {

special_use = \Trash

prefix =

passdb {

args = /data/sw/dovecot/etc/dovecot/dovecot-mysql.conf

driver = sql

protocols = imap pop3

ssl = no

userdb {

queue_directory = /var/spool/postfix

command_directory = /usr/sbin

daemon_directory = /usr/libexec/postfix

data_directory = /var/lib/postfix

mail_owner = postfix

myhostname = mail.zhengwing.org

mydomain = zhengwing.org

myorigin = zhengwing.org

inet_interfaces = all

mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

unknown_local_recipient_reject_code = 550

mynetworks = 192.168.254.0/24,127.0.0.0/8

alias_maps = hash:/etc/postfix/aliases

debug_peer_level = 2

debugger_command =

PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin

ddd $daemon_directory/$process_name $process_id &amp; sleep 5

sendmail_path = /usr/sbin/sendmail

newaliases_path = /usr/bin/newaliases

mailq_path = /usr/bin/mailq

setgid_group = postdrop

html_directory = no

manpage_directory = /usr/local/man

sample_directory = /etc/postfix

readme_directory = no

inet_protocols = ipv4

broken_sasl_auth_clients = yes

smtpd_sasl_auth_enable = yes

smtpd_sasl_local_domain = $myhostname

smtpd_sasl_security_options = noanonymous

smtpd_banner = Welcome to our $myhostname ESMTP,Warning: Version is test!

smtpd_recipient_restrictions=

permit_mynetworks,

permit_sasl_authenticated,

reject_invalid_hostname,

reject_non_fqdn_hostname,

reject_unknown_sender_domain,

reject_non_fqdn_sender,

reject_non_fqdn_recipient,

reject_unknown_recipient_domain,

reject_unauth_pipelining,

reject_unauth_destination

smtpd_sender_restrictions =

reject_sender_login_mismatch,

reject_authenticated_sender_login_mismatch

smtpd_sender_login_maps =

mysql:/etc/postfix/mysql_virtual_sender_maps.cf,

mysql:/etc/postfix/mysql_virtual_alias_maps.cf

virtual_mailbox_base = /home/domains

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

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

virtual_alias_domains =

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

virtual_uid_maps = static:1001

virtual_gid_maps = static:1001

virtual_transport = virtual

本文转自 chengchow 51CTO博客,原文链接:http://blog.51cto.com/chengchow/1425629,如需转载请自行联系原作者