成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

RHEL 4配置Postfix的完美4步

系統(tǒng) Linux
RHEL 4配置Postfix是一個(gè)很重要的過(guò)程,因?yàn)樵贗nternet世界中,大部分的電子郵件都是通過(guò)sendmail來(lái)投遞的,大約有100萬(wàn)用戶使用sendmail,每天投遞上億封郵件。所以RHEL 4配置Postfix是一個(gè)必須的過(guò)程。

Postfix是Wietse Venema在IBM的GPL協(xié)議之下開(kāi)發(fā)的MTA(郵件傳輸代理)軟件。在其應(yīng)該在RHEL 4的過(guò)程中存在著很繁瑣的一個(gè)過(guò)程,所以針對(duì)在RHEL 4配置Postfix的問(wèn)題,在下面的文章中進(jìn)行了詳細(xì)的分析過(guò)程:

1.RHEL 4配置Postfix基本軟件安裝
安裝RHEL 4 U2,使用默認(rèn)安裝,語(yǔ)系為簡(jiǎn)體中文。關(guān)閉SE Linux,配置網(wǎng)卡,使其能訪問(wèn)Internet。進(jìn)入X window,開(kāi)始->系統(tǒng)設(shè)置->添加/刪除應(yīng)用程序,安裝上文中提及“系統(tǒng)自帶”的軟件,包括: 萬(wàn)維網(wǎng)服務(wù)器:mysql & php 相關(guān)的 郵件服務(wù)器:SquirrelMail perl-cyrus SQL 數(shù)據(jù)庫(kù):全部。 下載其它需要的軟件。

2.RHEL 4配置PostfixAdmin、Mysql、Apache
◆[root@localhost tmp]# tar xzf postfixadmin-2.1.0.tgz 
◆[root@localhost tmp]# mv postfixadmin-2.1.0 /var/www/html/pa
◆[root@localhost tmp]# service mysqld start
◆[root@localhost tmp]# mysql -uroot < /var/www/html/pa/DATABASE_MYSQL.TXT 
◆[root@localhost tmp]# cp /var/www/html/pa/config.inc.php.sample  /var/www/html/pa/config.inc.php
◆[root@localhost tmp]# service httpd start

打開(kāi)瀏覽器訪問(wèn) http://localhost/pa,然后按提示增加兩個(gè)虛擬域名d1.com 和 d2.com,增加兩個(gè)虛擬用戶[email]a@d1.com[/email],[email]b@d2.com[/email]。

設(shè)置Mysql和Apache自動(dòng)啟動(dòng)
[root@localhost tmp]# chkconfig --level 35 mysqld on
[root@localhost tmp]# chkconfig --level 35 httpd on

3.RHEL 4配置Postfix編譯、配置Postfix
先刪除sendmail
◆[root@localhost tmp]# rpm –e sendmail –nodeps
◆[root@localhost tmp]# groupadd postfix
◆[root@localhost tmp]# groupadd postdrop
◆[root@localhost tmp]#useradd postfix -g postfix -c "Postfix user" -d /dev/null -s /sbin/nologin
◆[root@localhost tmp]# tar xzf postfix-2.2.7.tar.gz 
◆[root@localhost tmp]# cd postfix-2.2.7
◆[root@localhost postfix-2.2.7]# make -f Makefile.init makefiles 'CCARGS=-DHAS_MYSQL-I/usr/include/mysql-DUSE_TLS-DUSE_SASL_AUTH-I/usr/include/sasl' '
AUXLIBS=-L/usr/lib/mysql -lmysqlclient -lz -lm -L/usr/lib -lssl -lcrypto -lsasl2' 
◆[root@localhost postfix-2.2.7]# make
◆[root@localhost postfix-2.2.7]# make install
注:“make install”命令后的所有問(wèn)題都直接敲回車鍵即可。

編輯/etc/postfix/main.cf 為以下內(nèi)容

myhostname = mail.d1.com
mydomain = d1.com
myorigin = $mydomain
mydestination = $myhostname localhost localhost.$mydomain
mynetworks = 192.168.1.0/24 127.0.0.0/8
inet_interfaces = all
virtual_mailbox_base = /var/spool/mail
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:501
virtual_gid_maps = static:502
virtual_transport = virtual
maildrop_destination_recipient_limit = 1
maildrop_destination_concurrency_limit = 1
message_size_limit = 14336000
virtual_mailbox_limit = 20971520
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.
virtual_overquota_bounce = yes
broken_sasl_auth_clients = yes
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,permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sasl_application_name = smtpd
smtpd_banner=$myhostname ESMTP "Version not Available"
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
html_directory = no
setgid_group = postdrop
command_directory = /usr/sbin
manpage_directory = /usr/local/man
daemon_directory = /usr/libexec/postfix
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
queue_directory = /var/spool/postfix
mail_owner = postfix

編輯/etc/postfix/ mysql_virtual_alias_maps.cf 為以下內(nèi)容
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = alias
select_field = goto
where_field = address

編輯/etc/postfix/ mysql_virtual_domains_maps.cf 為以下內(nèi)容
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = domain
select_field = description
where_field = domain

編輯/etc/postfix/ mysql_virtual_mailbox_limit_maps.cf 為以下內(nèi)容
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = quota
where_field = username

編輯/etc/postfix/ mysql_virtual_mailbox_maps.cf 為以下內(nèi)容
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = maildir
where_field = username

4.RHEL 4配置Postfix要有SMTP 認(rèn)證
編輯 /usr/lib/sasl2/smtpd.conf 為以下內(nèi)容
pwcheck_method: authdaemond 
log_level: 3
mech_list: plain login
authdaemond_path:/usr/local/courier-authlib/var/spool/authdaemon/socket

安裝Courier authentication library
[root@localhost tmp]# tar jxf courier-authlib-0.58.tar.bz2 
[root@localhost tmp]# cd courier-authlib-0.58
[root@localhost courier-authlib-0.58]# ./configure --prefix=/usr/local/courier-authlib --without-authpam --without-authldap --without-authpwd --without-authshadow --without-authvchkpw --without-authpgsql  --with-authmysql --with-mysql-libs=/usr/lib/mysql --with-mysql-includes=/usr/include/mysql --with-redhat  --with-authmysqlrc=/usr/local/courier-authlib/etc/authmysqlrc  --with-authdaemonrc=/usr/local/courier-authlib/etc/authdaemonrc CFLAGS="-march=i686 -O2 -fexpensive-optimizations" CXXFLAGS="-march=i686 -O2 -fexpensive-optimizations"
[root@localhost courier-authlib-0.58]# make
[root@localhost courier-authlib-0.58]# make install
[root@localhost courier-authlib-0.58]# chmod 755 /usr/local/courier-authlib/var/spool/authdaemon
[root@localhost courier-authlib-0.58]# cp /usr/local/courier-authlib/etc/authdaemonrc.dist /usr/local/courier-authlib/etc/authdaemonrc

修改/usr/local/courier-authlib/etc/authdaemonrc 文件
authmodulelist="authmysql"
authmodulelistorig="authmysql"
daemons=10

編輯/usr/local/courier-authlib/etc/authmysqlrc 為以下內(nèi)容,其中501,502 為postfix 用戶的UID和GID。
◆MYSQL_SERVER         localhost
◆MYSQL_USERNAME       postfix
◆MYSQL_PASSWORD       postfix
◆MYSQL_SOCKET         /var/lib/mysql/mysql.sock
◆MYSQL_DATABASE       postfix
◆MYSQL_USER_TABLE     mailbox
◆MYSQL_CRYPT_PWFIELD   password
◆MYSQL_UID_FIELD       '501'
◆MYSQL_GID_FIELD       '502'
◆MYSQL_LOGIN_FIELD     username
◆MYSQL_HOME_FIELD     concat('/var/spool/mail/',maildir)
◆MYSQL_MAILDIR_FIELD   concat('/var/spool/mail/',maildir)
◆MYSQL_NAME_FIELD     name

# cp courier-authlib.sysvinit /etc/init.d/courier-authlib
# chmod 755 /etc/init.d/courier-authlib
# chkconfig --add courier-authlib
# chkconfig --level 35 courier-authlib on

手動(dòng)啟動(dòng)服務(wù):
# service courier-authlib start
此時(shí)你已經(jīng)擁有一臺(tái)帶驗(yàn)證的SMTP 服務(wù)器,用Outlook 、Foxmail測(cè)試一下吧,用戶名采用[email]usename@domainName.com[/email] 形式。

Postfix試圖更快、更容易管理、更安全,同時(shí)還與sendmail保持足夠的兼容性,所以RHEL 4配置Postfix是一個(gè)很重要的工作,在這里筆者對(duì)RHEL 4配置Postfix的過(guò)程用四個(gè)大部分進(jìn)行了詳細(xì)的描敘。

【編輯推薦】

  1. RHEL5 上網(wǎng)配置局域網(wǎng)
  2. 簡(jiǎn)單講述使用RHEL合法
  3. 設(shè)置ORACLE11g隨RHEL5自動(dòng)啟動(dòng)與關(guān)閉
  4. RHEL引導(dǎo)故障解決過(guò)程詳解
  5. RHEL配置NIS網(wǎng)絡(luò)信息服務(wù)實(shí)例(1)
責(zé)任編輯:趙杰 來(lái)源: oschina
相關(guān)推薦

2009-10-12 09:06:45

RHEL 4中配置sa

2010-05-13 16:23:43

DNS服務(wù)器

2010-09-06 13:30:47

無(wú)線網(wǎng)卡

2009-10-12 13:18:55

RHEL 4內(nèi)核

2009-10-09 17:00:35

RHEL配置多網(wǎng)卡

2009-10-12 16:46:33

2011-02-21 13:08:37

postfix配置

2011-01-19 09:16:48

Postfix配置

2011-02-21 11:14:47

Postfix配置

2009-10-10 16:18:08

RHEL 5搭建FTP

2011-01-19 09:55:27

postfix

2009-10-12 16:07:34

RHEL4 DDNS更

2017-02-24 09:00:11

SD-WANMPLSWAN

2009-10-12 12:45:36

RHEL5 Squid

2010-09-15 14:45:30

數(shù)據(jù)保護(hù)

2018-11-02 11:28:19

網(wǎng)絡(luò)故障弱電

2016-09-21 13:17:31

LibreOfficeJava緩沖區(qū)

2010-06-02 17:36:31

postfix概述

2009-10-12 11:11:17

RHEL 5 Xen

2009-09-03 13:39:49

RHEL4Sendmail郵件服務(wù)器
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)

主站蜘蛛池模板: 久久精品中文字幕 | 四虎最新 | 91精品久久久久久久 | 91天堂网| 精品久久香蕉国产线看观看亚洲 | 国产一区二区三区在线 | 91视视频在线观看入口直接观看 | 亚洲综合国产 | 99色综合| 91日韩 | 久久精品色欧美aⅴ一区二区 | 福利av在线 | 久久久久一区二区三区四区 | 国产一区在线视频 | 亚洲最大的成人网 | 毛片黄片 | 成人在线观 | 中文字幕在线观看一区 | 麻豆一区| 国产精品99精品久久免费 | 国产精品久久久久久久久久久久 | 中文av在线播放 | 国产一区免费 | 99精品欧美一区二区蜜桃免费 | 国产线视频精品免费观看视频 | 日韩精品免费在线 | 日韩一区二区在线视频 | 亚洲视频欧美视频 | 日韩在线免费播放 | 欧美精品日韩 | 国产精品一区二区三区久久 | 九热在线 | 亚洲一区二区三区在线 | 久久久久久一区 | 一区二区精品在线 | 美女视频h | 久久国产高清 | 精品久久久网站 | 99久久精品国产麻豆演员表 | 97久久精品午夜一区二区 | 青青草精品 |