Postfix配置Step By Step(完成篇)

时间:2021-08-17 22:14:31
安装extmail

   1:安装extmail

[root@redhat tmp]# tar zxvf extmail-1.0.3.tar.gz
[root@redhat tmp]# mv extmail-1.0.3 /var/www/extsuite/extmail


   2:安装extman

[root@redhat tmp]# tar zxvf extman-0.2.3.tar.gz[root@redhat tmp]# mv extman-0.2.3 /var/www/extsuite/extman


   3:设置extmail

[root@redhat tmp]# cd /var/www/extsuite/extmail/[root@redhat extmail]# cp webmail.cf.default webmail.cfSYS_CONFIG = /var/www/extsuite/extmail/SYS_LANGDIR = /var/www/extsuite/extmail/langSYS_TEMPLDIR = /var/www/extsuite/extmail/htmlSYS_SHOW_WARN = 0SYS_PERMIT_NOQUOTA = 1SYS_SESS_DIR = /tmp/SYS_LOG_ON = 1SYS_LOG_TYPE = syslogSYS_LOG_FILE = /var/log/extmail.logSYS_CAPTCHA_ON = 1SYS_CAPTCHA_KEY = r3s9b6a7SYS_CAPTCHA_LEN = 6SYS_SESS_TIMEOUT = 0SYS_SESS_COOKIE_ONLY = 1SYS_USER_PSIZE = 10SYS_USER_SCREEN = autoSYS_USER_LANG = zh_CNSYS_APP_TYPE = WebMailSYS_USER_TEMPLATE = defaultSYS_USER_CHARSET = utf-8SYS_USER_TRYLOCAL = 1SYS_USER_TIMEZONE = +0800SYS_USER_SHOW_HTML = 1SYS_USER_ADDR2ABOOK = 1SYS_MESSAGE_SIZE_LIMIT = 5242880SYS_MIN_PASS_LEN = 2SYS_MFILTER_ON = 1SYS_NETDISK_ON = 1SYS_SHOW_SIGNUP = 1SYS_DEBUG_ON = 1SYS_AUTH_TYPE = mysqlSYS_MAILDIR_BASE = /var/mailboxSYS_AUTH_SCHEMA = virtualSYS_CRYPT_TYPE = md5cryptSYS_MYSQL_USER = extmailSYS_MYSQL_PASS = extmailSYS_MYSQL_DB = extmailSYS_MYSQL_HOST = localhostSYS_MYSQL_SOCKET = /tmp/mysql.sockSYS_MYSQL_TABLE = mailboxSYS_MYSQL_ATTR_USERNAME = usernameSYS_MYSQL_ATTR_DOMAIN = domainSYS_MYSQL_ATTR_PASSWD = passwordSYS_MYSQL_ATTR_CLEARPW = clearpwdSYS_MYSQL_ATTR_QUOTA = quotaSYS_MYSQL_ATTR_NDQUOTA = netdiskquotaSYS_MYSQL_ATTR_HOME = homedirSYS_MYSQL_ATTR_MAILDIR = maildirSYS_MYSQL_ATTR_DISABLEWEBMAIL = disablewebmailSYS_MYSQL_ATTR_DISABLENETDISK = disablenetdiskSYS_MYSQL_ATTR_DISABLEPWDCHANGE = disablepwdchangeSYS_MYSQL_ATTR_ACTIVE = activeSYS_AUTHLIB_SOCKET = /usr/local/authlib/var/spool/authdaemon/socketSYS_G_ABOOK_TYPE = fileSYS_G_ABOOK_FILE_PATH = /var/www/extsuite/extmail/globabook.cfSYS_G_ABOOK_FILE_LOCK = 1SYS_G_ABOOK_FILE_CONVERT = 0SYS_G_ABOOK_FILE_CHARSET = utf-8


   4:设置extman

[root@redhat extmail]# cd ../extman[root@redhat extman]# vi webman.cfSYS_CONFIG = /var/www/extsuite/extman/SYS_LANGDIR = /var/www/extsuite/extman/langSYS_TEMPLDIR = /var/www/extsuite/extman/htmlSYS_MAILDIR_BASE = /var/mailboxSYS_SHOW_WARN = 0SYS_SESS_DIR = /tmp/extmanSYS_CAPTCHA_ON = 1 //如果不能正确显示验证码,请将这个值设为0 SYS_CAPTCHA_KEY = r3s9b6a7SYS_CAPTCHA_LEN = 6SYS_PSIZE = 10SYS_APP_TYPE = ExtManSYS_TEMPLATE_NAME = defaultSYS_DEFAULT_EXPIRE = 1ySYS_GROUPMAIL_SENDER = postmaster@linux.comSYS_DEFAULT_SERVICES = webmail,smtpd,smtp,pop3,netdiskSYS_ISP_MODE = noSYS_DOMAIN_HASHDIR = yesSYS_DOMAIN_HASHDIR_DEPTH = 2x2SYS_USER_HASHDIR = yesSYS_USER_HASHDIR_DEPTH = 2x2SYS_MIN_UID = 500SYS_MIN_GID = 100SYS_DEFAULT_UID = 1001SYS_DEFAULT_GID = 1001SYS_QUOTA_MULTIPLIER = 1048576SYS_QUOTA_TYPE = courierSYS_DEFAULT_MAXQUOTA = 500SYS_DEFAULT_MAXALIAS = 100SYS_DEFAULT_MAXUSERS = 100SYS_DEFAULT_MAXNDQUOTA = 500SYS_USER_DEFAULT_QUOTA = 5SYS_USER_DEFAULT_NDQUOTA = 5SYS_USER_DEFAULT_EXPIRE = 1ySYS_BACKEND_TYPE = mysqlSYS_CRYPT_TYPE = md5cryptSYS_MYSQL_USER = webmanSYS_MYSQL_PASS = webmanSYS_MYSQL_DB = extmailSYS_MYSQL_HOST = localhostSYS_MYSQL_SOCKET = /tmp/mysql.sockSYS_MYSQL_TABLE = managerSYS_MYSQL_ATTR_USERNAME = usernameSYS_MYSQL_ATTR_PASSWD = passwordSYS_RRD_DATADIR = /var/libSYS_RRD_TMPDIR = /tmp/viewlogSYS_RRD_QUEUE_ON = yes


   5:导入extman数据

[root@redhat extsuite]# mkdir /tmp/extman[root@redhat extsuite]# chown -R vmail:vmail /tmp/extman[root@redhat tmp]# chown -R vmail:vmail /var/www/extsuite/extmail[root@redhat tmp]# chown -R vmail:vmail /var/www/extsuite/extman//在初始化数据库时,请更改init.sql中extmail.org的名称为自已域名[root@redhat var]# cd www/extsuite/extman/docs/ [root@redhat docs]# export PATH=$PATH:/usr/local/mysql/bin[root@redhat docs]# mysql -u root -p < ./extmail.sqlEnter password:[root@redhat docs]# mysql -u root -p < ./init.sql Enter password:[root@redhat docs]#


   6:建立maildrop日志文件

[root@redhat extmail]# touch /var/log/maildrop.log[root@redhat extmail]# chown vmail.vmail /var/log/maildrop.log


   7:更改extmail及extman的模板文件,使显示更加人性化

[root@redhat ~]# vi /var/www/extsuite/extmail/html/default/index.html <INPUT TYPE="text" class="input_n" NAME="domain">将161行的内容改为如下<select name="domain" size="1" class="input_select"><option value="linux.com">linux.com</option></select>[root@redhat ~]# vi /var/www/extsuite/extman/html/default/index.html<input name=username value=root@test.com class=login_input>//第114行


安装图形日志显示支持    1:安装libart
[root@redhat rrdtool]# tar zxvf libart_lgpl-2.3.17.tar.gz[root@redhat rrdtool]# cd libart_lgpl-2.3.17[root@redhat libart_lgpl-2.3.17]# ./configure[root@redhat libart_lgpl-2.3.17]# make[root@redhat libart_lgpl-2.3.17]# make install
   2:安装TCL支持
[root@redhat rrdtool-1.2.26]# rpm -qa |grep tcltcl-8.4.7-2tclx-8.3.5-4[root@redhat tmp]# rpm -ivh tcl-devel-8.4.7-2.i386.rpmwarning: tcl-devel-8.4.7-2.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60ePreparing... ########################################### [100%]1:tcl-devel ########################################### [100%]
   3:安装rrdtool
[root@redhat ~]# cp /usr/local/lib/pkgconfig/libart-2.0.pc /usr/lib/pkgconfig/ [root@redhat rrdtool]# tar zxvf rrdtool-1.2.26.tar.gz[root@redhat rrdtool]# cd rrdtool-1.2.26[root@redhat rrdtool-1.2.26]# ./configure --perfix=/usr/local/rrdtool[root@redhat rrdtool-1.2.26]# make[root@redhat rrdtool-1.2.26]# make install
   4:启动图形日志
[root@redhat tmp]# cp -r /var/www/extsuite/extman/addon/mailgraph_ext/        /usr/local/mailgraph_ext/[root@redhat tmp]# /usr/local/mailgraph_ext/mailgraph-init startStarting mail statistics grapher: mailgraph_ext[root@redhat tmp]# /usr/local/mailgraph_ext/qmonitor-init startStarting queue statistics grapher: qmonitor[root@redhat ~]# echo "/usr/local/mailgraph_ext/mailgraph-init start"        >> /etc/rc.d/rc.local[root@redhat ~]# echo "/usr/local/mailgraph_ext/qmonitor-init        start" >> /etc/rc.d/rc.local
进入web页管理
   1:重新启动服务
[root@redhat tmp]# /usr/local/httpd/bin/apachectl stop[root@redhat tmp]# /usr/local/httpd/bin/apachectl start[root@redhat 5.8.5]# postfix stop[root@redhat 5.8.5]# postfix start
   2:在浏览器中输入[url]http://redhat.test.com[/url]如图:应先建立postmaster用户,否则在/var/mailbox下不会生成目录,但网页却会提示成功.
Postfix配置Step By Step(完成篇)
Postfix配置Step By Step(完成篇)
Postfix配置Step By Step(完成篇)
Postfix配置Step By Step(完成篇)
Postfix配置Step By Step(完成篇)
Postfix配置Step By Step(完成篇)
Postfix配置Step By Step(完成篇)
Postfix配置Step By Step(完成篇)
Postfix配置Step By Step(完成篇)
Postfix配置Step By Step(完成篇)
  到这里为止,邮件架设差不多完成了,我会在下一篇中再列出一些常见的错误及排错的方法.希望能有点作用,相关的配置文件我放在附件中吧,有需要的可以参考一下.

本文出自 “虚拟的现实” 博客,转载请与作者联系!