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 动态网页支持
结构图(一定要读懂,很关键。)
shell> tar zxvf apr-1.51.tar.gz
shell> cd apr-1.51
shell> ./configure �Cprefix=/data/sw/apr
shell> make && make install
shell> tar zxvf apr-util-1.53.tar.gz
shell> cd apr-util-1.53.tar.gz
shell> ./configure �Cprefix=/data/sw/apr-util �Cwith-apr=/data/sw/apr --enable-suexec
shell> make && make install
shell> tar zxvf pcre-8.33.tar.gz
shell> cd pcre-8.33
shell> ./configure �Cprefix=/data/sw/pcre �Cenable-utf8
shell> make && make install
shell> tar zxvf httpd-2.4.9.tar.gz
shell> cd httpd-2.4.9
shell> ./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> make&& make install
shell> cd /data/sw/httpd/conf
shell> vi httpd.conf
修改Listen 80 à
Listen 0.0.0.0:80
修改#ServerName www.example.com à
ServerName localhost:80
Shell> echo “export PATH=$PATH:/data/sw/httpd/bin” >>/etc/profile
Shell> source /etc/profile
启动httpd
Shell> apachectl start
查看端口
Shell> netstat �Cnlupt
访问http://http-server/
Shell> tar zxvf bison-3.0.tar.gz
Shell> cd bison-3.0
Shell> ./configure �Cprefix=/data/sw/bison
Shell> make && make install
Shell> tar zxvf cmake-2.8.10.2.tar.gz
Shell> cd cmake-2.8.10.2
Shell> ./configure �Cprefix=/data/sw/cmake
Shell> gmake
Shell> make install
Shell> groupadd �Cg 1000 mysql
Shell> useradd �Cg mysql �Cu 1000 �Cd /dev/null �Cs /sbin/nologin mysql
Shell> tar zxvf mysql-5.5.37.tar.gz
Shell> cd mysql -5.5.37
Shell> /data/sw/cmake/bin/cmake �CDCMAKE_INSTALL_PREFIX=/data/sw/mysql �CDDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci
Shell> make && make install
Shell> cd /data/sw/mysql
Shell> cp support-files/my-medium.cf ./my.cnf
Shell> chown �CR mysql:msyql /data/sw/mysql
Shell> cd /data/sw/mysql/scripts/
Shell> ./mysql_install_db --basedir=/data/sw/mysql/ --datadir=/data/sw/mysql/data --user=mysql --collation-server=utf8_general_ci
Shell> echo “export PATH=$PATH:/data/sw/mysql/bin” >> /etc/profile
Shell> source /etc/profile
Shell> echo “/data/sw/mysql/lib” >> /etc/ld.so.conf
Shell> ldconfig �Cv
Shell> mysqld_safe &
Shell> mysqladmin �Curoot password ‘root’
Shell> netstat �Cnlupt
Shell> mysql �Curoot �Cproot �Ce “show databases;”
Shell> tar zxvf DBI-1.631.tar.gz
Shell> cd DBI-1.631
Shell> perl MakeFile.pl
Shell> make && make install
Shell> tar zxvf Test-Deep-0112.tar.gz
Shell> cd Test-Deep-0112
Shell> perl Makefile.PL
Shell> make && make install
Shell> tar zxvf DBD-mysql-4.027.tar.gz
Shell> cd DBD-mysql-4.027
Shell> 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> make
Shell> make test
Shell> make install
Shell> tar zxvf libiconv-1.14.tar.gz
Shell> cd libiconv-1.14
Shell> ./configure �Cprefix=/data/sw/libiconv
Shell> make
Shell> make install
shell> tar xvf libpng-1.6.8.tar.xz
shell> cd libpng-1.6.8
shell> ./configure
shell> make && make install
shell> tar zxvf jpegsrc.v9a.tar.gz
shell> cd jpeg-9a
shell> ./configure �Cmandir=/usr/share/man/man1
shell> make && make install
shell> tar zxvf zlib-1.2.7.tar.gz
shell> cd zlib-1.2.7
shell> ./configure
shell> make && make install
shell> tar xvf freetype-2.4.8.tar.bz2
shell> cd freetype-2.4.8
shell> ./configure
shell> make && make install
shell> tar zxvf fontconfig-2.11.1.tar.gz
shell> cd fontconfig-2.11.1
shell> ln �Cs /usr/local/lib/pkgconfig/freetype2.pc /usr/lib/pkgconfig/freetype2.pc
shell> ./configure
shell> make && make install
shell> tar zxvf gd-2.0.33.tar.gz
shell> cd gd-2.0.33
shell> ./configure
shell> make && make install
shell> tar zxvf GD-2.53.tar.gz
shell> cd GD-2.53
shell> perl MakeFile
shell> make && make install
Shell> tar zxvf php-5.5.12.tar.gz
Shell> cd php-5.5.12
Shell> ./configure �Cprefix=/data/sw/php �Cwith-iconv-dir=/data/sw/libiconv �Cenable-fpm �Cwith-mysql=/data/sw/mysql �Cwith-apxs2=/data/sw/http/bin/apxs
Shell> make
Shell> make test
Shell> make install
Shell> echo “export PATH=$PATH:/data/sw/php/bin:/data/sw/php/sbin” >>/etc/profile
Shell> source /etc/profile
shell> cd php-5.5.12
Shell> cp php.ini-development /data/sw/php/php.ini
Shell> cd /data/sw/php
Shell> cp etc/php-fpm.conf.default etc/php-fpm.conf
Shell> echo “export PATH=$PATH:/data/sw/php/bin” >> /etc/profile
Shell> source /etc/profile
Shell> vi /data/sw/httpd/conf/httpd.conf
Shell> cd /data/sw/httpd/htdocs
Shell> mv index.html index.html.bak
Shell> echo “<?php phpinfo(); ?>” > index.php
Shell> killall httpd
Shell> apachectl
访问http://localhost
参考
http://chengchow.blog.51cto.com/1642666/1209233
也可以不安装,通过修改hosts文件来解析域名和IP地址
shell> tar zxvf tcl8.5.7-src.tar.gz
shell> cd tcl8.5.7/unix
shell> ./configure �Cbindir=/usr/bin �Csbindir=/usr/sbin �Clibdir=/usr/lib �Clibexecdir=/usr/libexec �Cincludedir=/usr/include �Csysconfdir=/usr/local/etc
shell> make && make install
shell>tar zxvf tk8.5.7.tar.gz
shell> cd tk8.5.7/unix
shell> ./configure �Cbindir=/usr/bin �Csbindir=/usr/sbin �Clibdir=/usr/lib �Clibexecdir=/usr/libexec �Cincludedir=/usr/include �Csysconfdir=/usr/local/etc
shell> make && make install
shell> tar zxvf expect-5.44.1.15.tar.gz
shell> cd expect-5.44.1.15
shell> ./configure
shell> make && make install
## extmail修改密码需要
shell> tar zxvf cyrus-sasl-2.1.26.tar.gz
shell> cd cyrus-sasl-2.1.26
shell> cp /data/sw/mysql/include/*.h /usr/include/.
Shell> mkdir �Cp /var/run/cyrus-sasl
Shell> chmod �CR 755 /var/run/cyrus-sasl
shell> ./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 �Clmysqlclient
修改config.status文件
S["LIB_MYSQL"]="-L/data/sw/mysql/lib -Wl,-rpath,/data/sw/mysql/lib -lmysqlclient"
## 这个调参数调了几次都没成功,就手动修改了config.status文件了
shell> make && make install
启动
Shell> ln �Cs /usr/local/lib/sasl2 /usr/lib/sasl2
## 否则telnet时报错mail postfix/smtpd[6777]: fatal: no SASL authentication mechanisms
Shell> echo “export PATH=$PATH:/data/sw/cyrus-sasl/sbin” >>/etc/profile
Shell> source /etc/profile
Shell> saslauthd -a shadow getpwent pam rimap -d &
shell> tar xvf courier-authlib-0.62.4.tar.bz2
shell> cd courier-authlib-0.62.4
shell> mkdir �Cp /var/run/courier-authlib
shell> chmod �CR 755 /var/run/courier-authlib
shell> ./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 �Clocalstatedir=/var/run/courier-authlib
shell> make
shell> make install
Shell> chmod 755 /data/sw/courier-authlib/var/spool/authdaemon
Shell> cd /data/sw
Shell> cp etc/authlib/authdaemonrc.dist etc/authlib/authdaemonrc
Shell> cp etc/authlib/authmysqlrc.dist etc/authlib/authmysqlrc
Shell> vi etc/authlib/authdaemonrc
## DEBUG_LOGIN=2详细日志,调试时用
Shell> vi etc/authlib/authmysqlrc
Shell> mkdir �Cp /home/domains
Shell> chown �CR postfix:postfix /home/domains
shell> echo “export PATH=$PATH:/data/sw/courier-authlib/sbin” >> /etc/profile
shell> source /etc/profile
shell> echo “/data/sw/courier-authlib/lib/courier-authlib” >> /etc/ld.so.conf
shell> ldconfig �Cv
shell> authdaemond start
shell> ps aux | grep authdaemond
shell> tar zxvf dovecot-2.2.13.tar.gz
shell> cd dovecot-2.2.13
shell> ./configure --prefix=/data/sw/dovecot --with-pam --with-mysql --with-zlib --with-ssl=openssl
shell> make && make install
shell> cp �Cr doc/example-config/* /data/sw/dovecot/etc/dovecot/.
Shell> mkdir -p /etc/ssl/certs
Shell> sh doc/mkcert.sh
shell> echo “export PATH=$PATH:/data/sw/dovecot/bin:/data/sw/dovecot/sbin” >> /etc/profile
shell> source /etc/profile
shell> cd /data/sw/dovecot/etc/dovecot
shell> vi dovecot.conf
Shell> vi dovecot-mysql.conf
Shell> doveconf �Cn > dovecot.conf.new
Shell> mv dovecot.conf dovecont.conf.old;mv dovecot.conf.new dovecot.conf
Shell> dovecot
将mysql库文件添加到ld.so.conf中
Shell> echo “/data/sw/mysql/llib” >> /etc/ld.so.conf
Shell> ldconfig �Cv
shell> groupadd -g 1001 postfix
shell> useradd -g postfix -u 1001 -s /sbin/nologin -M postfix
shell> groupadd -g 1002 postdrop
shell> useradd -g postdrop -u 1002 -s /bin/nologin -M postdrop
shell> make makefiles 'CCARGS=-DHAS_MYSQL -I/data/sw/mysql/include -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -DUSE_TLS ' 'AUXLIBS=-L/data/sw/mysql/lib -lmysqlclient -lz -lm -L/usr/lib/sasl2 -lsasl2 -lssl -lcrypto'
shell> make
shell> make install
shell> ln �Cs /etc/postfix/aliases /etc/aliases
shell> newaliases
Shell> 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> ln �Cs /etc/postfix/aliases /etc/aliases
Shell> newaliases
Shell> postfix start
Shell> telnet 127.0.0.1 25
Shell> postconf �Ca
Shell> vi /etc/postfix/main.cf
## 在配置文件最后添加
SASL验证支持,以及一些邮件规则
虚拟邮箱支持
Quota支持
Shell> postfix reload
Shell> telnet 127.0.0.1 25
Saslauthd支持authdaemond
Shell> ln �Cs /data/sw/cyrus-sasl/lib/sasl2 /usr/lib/sasl2
Shell> vi /usr/lib/sasl2/smtpd.conf
## 方框内配置可以不写,不影响使用,但日志会有auxprop的一个警告信息
Shell> tar zxvf extmail -1.2.tar.gz �CC /data/sw/httpd/htdocs
Shell> tar zxvf extman-1.1.tar.gz �CC /data/sw/httpd/htdocs
Shell> cd /data/sw/httpd/htdocs
Shell> mv extmail-1.2 extmail
Shell> mv extman-1.1 extman
Shell> chmod +x �CR extmail/tools extman/tools
Shell> chown �CR postfix:postfix extmail/cgi extman/cgi
Shell> cp extman/docs/mysql* /data/sw/dovecot/etc/dovecot/.
Extman和extmail配置文件,参考附1和附2
导入数据库
Shell> /data/sw/httpd/htdocs/docs
修改extmail.sql中TYPE=MyISAM为ENGINE=MyISAM
Shell> mysql �Curoot �Cproot < extmail.sql
Shell> mysql �Curoot �Cproot < init.sql
Httpd虚拟域配置
修改httpd的用户
Shell> vi /data/sw/httpd/conf/httpd.conf
## 也可以配置虚拟域用户,如上图注销部分,但是需要suexec模块支持
修改extmail/cgi/index.cgi首行
Shell> sed -i '1c\#!/usr/bin/perl -w' /data/sw/httpd/htdocs/extmail/cgi/index.cgi
重启所有服务
Shell> killall saslauthd
Shell> killall mysqld
Shell> killall dovecot
Shell> apachectl stop
Shell> authdaemond stop
Shell> postfix stop
Shell> apachectl start
Shell> mysqld_safe &
Shell> authdaemond start
Shell> saslauthd -a shadow getpwent pam rimap -d &
Shell> postfix start
Shell> dovecot
## extmail日志需要,可以不安装,这里使用syslog-ng,日志都集中发送到/var/log/message
Shell> tar zxvf Unix-Syslog-1.1.tar.gz
Shell> cd Unix-Syslog-1.1
Shell> perl Makefile.PL
Shell> make && make install
http://192.168.254.200/extman/cgi/index.cgi
在extmail里面我们可以创建虚拟域,用户账号
登录mail.zhengzhou.org邮件发送功能
这里可以注册邮箱(需要extman中启用,用户自动注册)
Extmail界面
设置接收和发送邮件服务器,这里可以分别选择pop3和IMAP
测试IMAP,POP3和SMTP
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_MAILDIR_BASE = /home/domains
SYS_SHOW_WARN = 0
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_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 = manager
SYS_MYSQL_ATTR_USERNAME = username
SYS_MYSQL_ATTR_PASSWD = password
SYS_LDAP_BASE = dc=extmail.org
SYS_LDAP_RDN = cn=Manager,dc=extmail.org
SYS_LDAP_PASS = secret
SYS_LDAP_HOST = localhost
SYS_LDAP_ATTR_USERNAME = mail
SYS_LDAP_ATTR_PASSWD = userPassword
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" {
special_use = \Sent
}
mailbox Trash {
special_use = \Trash
}
prefix =
}
passdb {
args = /data/sw/dovecot/etc/dovecot/dovecot-mysql.conf
driver = sql
}
protocols = imap pop3
ssl = no
userdb {
args = /data/sw/dovecot/etc/dovecot/dovecot-mysql.conf
driver = sql
}
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 & 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 =
permit_mynetworks,
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