郵件服務

邏輯概念

MUA

   Mail User Agent,爲郵件用戶提供郵件編輯界面,寫好郵件提交給MTA;同時它也可以把郵件從郵箱裏接受過本地查看。

MTA  

   SMTPD可以調用smtp發送郵件給遠程smtpd,從MUA到MTA是SMTP協議,MTA分檢以後發現時本地郵件通過lmtp協議傳送。如果是遠程郵件,調用本地客戶端smtp向對方服務器端傳送。

MDA  

   對方服務器MTA(smtpd)收到郵件調用MDA(郵件投遞代理)把這封郵件投遞到用戶的郵件。由於郵件路由過程中可能會用到不同的服務器轉發,所以郵件發件人和發送主機沒有必然聯繫

OpenRelay    開放式中繼(一般都關閉開放中繼)

   只要經過MTA就會分檢,非內部郵件就中繼。

MRA  

   Mail Retrival Agent郵件取回代理,使用pop3協議,用戶登陸MRA做身份驗證通過MRA根據身份去檢索相應郵箱並取回傳遞給用戶。當然MUA也可以,只不過每次都需要ssh登陸,所以平時都是使用POP3

WebMail

   開發一個MUA套件,爲用戶提供web界面發送郵件。

LDAP

   Light Directory Access Protocol 輕量級目錄訪問協議,加快身份驗證的速度,隨着用戶增多。適合於一次寫入,多次讀取的應用場所,LDAP目前做的最好的是windowsserver2008,AD本身就是LDAP。

功能組件

MTA

   sendmail    UUCP設計理念有些過時,單體結構,SUID,配置文件語法(m4編寫),不容易理解

   qmail

   postfix    新貴    模塊化設計,避免SUID,安全,跟sendmail兼容性好,投遞效率相當於sendmail的4倍左右。

   Exchange    Windows,異步消息寫作平臺,必須跟AD整合起來.

SASL   認證框架,它並不負責實現認證,還需要專業級認證組件

   cyrus-sasl    默認去/etc/passwd  和 /etc/shadow

   courier-authlib    (此時它變爲服務,停掉cyrus-sasl,只是需要用cyrus-sasl的庫,由此支持虛擬用戶)    SASL --> Mysql

MDA

   procmail

   maildropz

   MRA    郵件取回代理(pop3或者imap4)

   cyrus-imap

   dovecot    自身就可以直接訪問mysql,安裝的時候依賴於mysql的客戶端。

MUA

   Outlook Express, Outlook

   Foxmail

   Thunderbird

   Evolution

   mutt(文件界面)

Webmailweb套件

   Openwebmailperl

   squirrelmailphp

Extmail(Extman)可以訪問mysql 調用dovecot收郵件 調用postfix發郵件  

EMOS, CentOS

發郵件 Postfix + SASL (courier-authlib) + Mysql

收郵件Dovecot + Mysql

webmailExtmail + Extman + httpd

部署過程

DNS

配置文件 /etc/named.rfc1912.zones
zone "soulboy.com" IN {
        type master;
        file  "soulboy.com.zone";
        allow-update { none; };
        allow-transfer { none; };
};
zone "1.168.192.in-addr.arpa" IN {
        type master;
        file  "192.168.1.zone";
        allow-update { none; };
        allow-transfer { none; };
正向區域文件  /var/named/soulboy.com.zone
$TTL 600
@       IN      SOA     ns.soulboy.com. admin.soulboy.com. (
                2013090401
                2H
                10M
                3D
                1D )
        IN      NS      ns
        IN      MX  10  mail
ns      IN      A       192.168.1.30
mail    IN      A       192.168.1.30
反向區域文件  /var/named/192.168.1.zone
$TTL 600
@       IN      SOA     ns.soulboy.com. admin.soulboy.com. (
                2013090401
                2H
                10M
                3D
                1D )
        IN      NS      ns.soulboy.com.
30      IN      PTR     ns.soulboy.com.
30      IN      PTR     mail.soulboy.com.
########修改權限、開機啓動、主機名###################
[root@localhost named]# chgrp named soulboy.com.zone
[root@localhost named]# chgrp named 192.168.1.zone
[root@localhost named]# chmod 640 soulboy.com.zone
[root@localhost named]# chmod 640 192.168.1.zone
[root@localhost named]# chkconfig --add named
[root@localhost named]# chkconfig named on
[root@localhost named]# vim /etc/resolv.conf
nameserver 192.168.1.30
search localdomain
[root@localhost named]# vim /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=mail.soulboy.com
GATEWAY=192.168.1.10
[root@localhost named]# hostname mail.soulboy.com
[root@mail httpd]# vim /etc/hosts
192.168.1.30     mail.soulboy.com
[root@mail httpd]# service httpd start
Starting httpd:                                            [ OK ]
[root@mail httpd]# service named restart
Starting named:                                            [ OK ]

MYSQL

yum install perl-DBD-MySQL   -y
yum install mysql-server    -y
yum install  mysql-devel    -y

POSTFIX

[root@mail httpd]# service sendmail stop
Shutting down sm-client:                                   [ OK ]
Shutting down sendmail:                                    [ OK ]
[root@mail httpd]# chkconfig sendmail off
[root@mail httpd]# groupadd -g 2525 postfix
[root@mail httpd]# useradd -g postfix -u 2525 -s /sbin/nologin -M postfix
[root@mail httpd]# groupadd -g 2526 postdrop
[root@mail httpd]# useradd -g postdrop -u 2526 -s /sbin/nologin -M postdrop
[root@mail httpd]# hwclock –s ##//將硬件時間同步到系統時間
##開始編譯(事先將postfix-2.9.6.tar.gz放入linux中)
[root@mail ~]# cd /usr/local/src
[root@mail src]# tar xf postfix-2.9.6.tar.gz
[root@mail src]# make makefiles 'CCARGS=-DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl  -DUSE_TLS ' 'AUXLIBS=-L/usr/lib/mysql -lmysqlclient -lz -lm -L/usr/lib/sasl2 -lsasl2  -lssl -lcrypto'
[root@mail src]# make && make install
[root@mail src]# vim /etc/rc.d/init.d/postfix
########################腳本如下############################
#!/bin/bash
#
# postfix      Postfix Mail Transfer Agent
#
# chkconfig: 2345 80 30
# description: Postfix is a Mail Transport Agent, which is the program \
#              that moves mail from one machine to another.
# processname: master
# pidfile: /var/spool/postfix/pid/master.pid
# config: /etc/postfix/main.cf
# config: /etc/postfix/master.cf
                                                                                                                                                                                                                                                                            
# Source function library.
. /etc/rc.d/init.d/functions
                                                                                                                                                                                                                                                                            
# Source networking configuration.
. /etc/sysconfig/network
                                                                                                                                                                                                                                                                            
# Check that networking is up.
[ $NETWORKING = "no" ] && exit 3
                                                                                                                                                                                                                                                                            
[ -x /usr/sbin/postfix ] || exit 4
[ -d /etc/postfix ] || exit 5
[ -d /var/spool/postfix ] || exit 6
                                                                                                                                                                                                                                                                            
RETVAL=0
prog="postfix"
                                                                                                                                                                                                                                                                            
start() {
       # Start daemons.
       echo -n $"Starting postfix: "
        /usr/bin/newaliases >/dev/null 2>&1
       /usr/sbin/postfix start 2>/dev/null 1>&2 && success || failure $"$prog
start"
       RETVAL=$?
       [ $RETVAL -eq 0 ] && touch /var/lock/subsys/postfix
        echo
       return $RETVAL
}
                                                                                                                                                                                                                                                                            
stop() {
 # Stop daemons.
       echo -n $"Shutting down postfix: "
       /usr/sbin/postfix stop 2>/dev/null 1>&2 && success || failure $"$prog
stop"
       RETVAL=$?
       [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/postfix
       echo
       return $RETVAL
}
                                                                                                                                                                                                                                                                            
reload() {
       echo -n $"Reloading postfix: "
       /usr/sbin/postfix reload 2>/dev/null 1>&2 && success || failure $"$prog
reload"
       RETVAL=$?
       echo
       return $RETVAL
}
                                                                                                                                                                                                                                                                            
abort() {
       /usr/sbin/postfix abort 2>/dev/null 1>&2 && success || failure $"$prog
abort"
       return $?
}
                                                                                                                                                                                                                                                                            
flush() {
       /usr/sbin/postfix flush 2>/dev/null 1>&2 && success || failure $"$prog
flush"
       return $?
}
                                                                                                                                                                                                                                                                            
check() {
       /usr/sbin/postfix check 2>/dev/null 1>&2 && success || failure $"$prog
check"
       return $?
}
                                                                                                                                                                                                                                                                            
restart() {
       stop
       start
}
                                                                                                                                                                                                                                                                            
# See how we were called.
case "$1" in
 start)
       start
       ;;
 stop)
       stop
       ;;
 restart)
       stop
       start
       ;;
 reload)
       reload
       ;;
 abort)
       abort
       ;;
 flush)
       flush
       ;;
 check)
       check
       ;;
 status)
     status master
       ;;
 condrestart)
       [ -f /var/lock/subsys/postfix ] && restart || :
       ;;
 *)
       echo $"Usage: $0 {start|stop|restart|reload|abort|flush|check|status|
condrestart}"
       exit 1
esac
                                                                                                                                                                                                                                                                            
exit $?
                                                                                                                                                                                                                                                                            
# END
###################修改權限添加服務列表########################
[root@mail src]# chmod +x /etc/rc.d/init.d/postfix
[root@mail src]# chkconfig --add postfix
[root@mail src]# chkconfig postfix on
##################修改postfix配置文件#################
[root@mail ~]# vim /etc/postfix/main.cf
myhostname = mail.soulboy.com ##------指定自己的郵件服務器
myorigin = $mydomain ##------自己創建的域名
mydomain = soulboy.com ##-----定義出站郵件使用的域名
mydestination = $myhostname, localhost.$mydomain, localhost, ns.$mydomain ##定義哪些域接收郵件
mynetworks = 192.168.1.0/24, 127.0.0.0/8   ##--------定義允許中繼的網絡
##################################################################
[root@mail src]# service postfix start
[root@mail src]# useradd hadoop && echo "hadoop" |passwd --stdin hadoop

dovecot  

[root@mail ~]# yum install dovecot -y
[root@mail ~]# chkconfig --add dovecot
[root@mail ~]# chkconfig dovecot on
[root@mail ~]# service dovecot start s

cyrus-sas

[root@mail ~]# vim /etc/sysconfig/saslauthd
MECH=shadow
[root@mail ~]# chkconfig --add saslauthd
[root@mail ~]# chkconfig saslauthd on
[root@mail ~]# service saslauthd start
[root@mail ~]# testsaslauthd -uhadoop -phadoop
[root@mail ~]# vim /usr/lib/sasl2/smtpd.conf
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN
[root@mail ~]# vim /etc/postfix/main.cf
############################CYRUS-SASL############################
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
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpdsmtpd_sasl_path = smtpd
smtpd_banner = Welcome to our $myhostname ESMTP,Warning: Version not Available!
[root@mail ~]# service postfix restart

虛擬域、用戶、webmail、webman

courier-authlib

tar jxvf courier-authlib-0.62.4.tar.bz2
cd courier-authlib-0.62.4
./configure --prefix=/usr/local/courier-authlib \
--sysconfdir=/etc \
--without-authpam \
--without-authshadow \
--without-authvchkpw \
--without-authpgsql \
--with-authmysql \
--with-mysql-libs=/usr/lib/mysql \
--with-mysql-includes=/usr/include/mysql \
--with-redhat \
--with-authmysqlrc=/etc/authmysqlrc \
--with-authdaemonrc=/etc/authdaemonrc \
--with-mailuser=postfix \
--with-mailgroup=postfix \
--with-ltdl-lib=/usr/lib \
--with-ltdl-include=/usr/include
改socket文件的權限
[root@mail ~]# chmod 755 /usr/local/courier-authlib/var/spool/authdaemon
把生成的配置文件重新命名
[root@mail ~]# cp /etc/authdaemonrc.dist /etc/authdaemonrc
[root@mail ~]# cp /etc/authmysqlrc.dist /etc/authmysqlrc
修改/etc/authdaemonrc配置文件
[root@mail ~]# vim /etc/authdaemonrc
authmodulelist="authmysql" -----指明認證的模塊
authmodulelistorig="authmysql" ------保留的原始模塊
daemons=10 ------默認啓動啓動的進程個數(根據需要修改)
DEBUG_LOGIN=2
vim  /etc/authmysqlrc
##配置其通過mysql進行郵件帳號認證
MYSQL_SERVER localhost
MYSQL_PORT 3306                   -----(指定你的mysql監聽的端口,這裏使用默認的3306)
MYSQL_USERNAME extmail     ----- (這時爲後文要用的數據庫的所有者的用戶名)
MYSQL_PASSWORD extmail       ----- (密碼)
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_DATABASE extmail
MYSQL_USER_TABLE mailbox
MYSQL_CRYPT_PWFIELD password -----mysql中哪個字段是用戶密碼
MYSQL_UID_FIELD '2525'
MYSQL_GID_FIELD '2525'
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD concat('/var/mailbox/',homedir) -----用戶賬號的家目錄所在位置,虛擬用戶沒有家目錄,homedir是變量,等同於用戶名稱;concat是mysql內置的函數用於將兩個字符串連接起來
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD concat('/var/mailbox/',maildir)
提供SysV服務腳本,爲服務腳本添加執行權限並且添加到服務列表,設置開機啓動並啓動
[root@mail ~]# cd courier-authlib-0.64.0
[root@mail courier-authlib-0.64.0]# cp courier-authlib.sysvinit /etc/rc.d/init.d/courier-authlib
[root@mail courier-authlib-0.64.0]# chmod 755 /etc/init.d/courier-authlib
[root@mail courier-authlib-0.64.0]# chkconfig --add courier-authlib
[root@mail courier-authlib-0.64.0]# chkconfig --level 2345 courier-authlib on
[root@mail courier-authlib-0.64.0]# echo "/usr/local/courier-authlib/lib/courier-authlib" >> /etc/ld.so.conf.d/courier-authlib.conf
[root@mail courier-authlib-0.64.0]# service courier-authlib start
Starting Courier authentication services: authdaemond

POSTFIX courier-authlib

新建虛擬用戶郵箱所在的目錄,並將其權限賦予postfix用戶
[root@mail ~]# mkdir –pv /var/mailbox
[root@mail ~]# chown -R postfix /var/mailbox
                                                                                                                
接下來重新配置SMTP 認證,編輯 /usr/lib/sasl2/smtpd.conf ,
[root@mail ~]# vim /usr/lib/sasl2/smtpd.conf
##確保其爲以下內容
pwcheck_method: authdaemond
log_level: 3
mech_list: PLAIN LOGIN
authdaemond_path:/usr/local/courier-authlib/var/spool/authdaemon/socket
                                                                                                                
                                                                                                                
讓postfix支持虛擬域和虛擬用戶
編輯/etc/postfix/main.cf,
[root@mail ~]# vim /etc/postfix/main.cf
##//添加如下內容:
########################Virtual Mailbox Settings########################
virtual_mailbox_base = /var/mailbox
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:2525
virtual_gid_maps = static:2525
virtualvirtual_transport = virtual
maildrop_destination_recipient_limit = 1
maildrop_destination_concurrency_limit = 1
##########################QUOTA Settings########################
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 Tidy your mailbox and try again later.
virtual_overquota_bounce = yes
##保存退出
                                                                                                                
使用extman源碼目錄下docs目錄中的extmail.sql和init.sql建立數據庫
                                                                                                                
[root@mail ~]# tar xf extman-1.1.tar.gz ------事先準備~
[root@mail ~]# cd extman-1.1/docs/
[root@mail docs]# mysql -u root -p < extmail.sql -----密碼爲空
Enter password:
[root@mail docs]# mysql -u root -p <init.sql
Enter password:
[root@mail docs]# cp mysql* /etc/postfix/
##//啓動mysql對用戶進行授權
[root@mail docs]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.0.77 Source distribution
                                                                                                                  
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
                                                                                                                  
mysql> GRANT all privileges on extmail.* TO extmail@localhost IDENTIFIED BY 'extmail';
Query OK, 0 rows affected (0.00 sec)
                                                                                                                  
mysql> GRANT all privileges on extmail.* TO [email protected] IDENTIFIED BY 'extmail';
Query OK, 0 rows affected (0.00 sec)

dovecot

[root@mail ~]# vim /etc/dovecot.conf
##修改
mail_location = maildir:/var/mailbox/%d/%n/Maildir
auth default {
    mechanisms = plain
    passdb sql {
        args = /etc/dovecot-mysql.conf
    }
    userdb sql {
        args = /etc/dovecot-mysql.conf
    }
                                                                                                           
                                                                                                           
[root@mail ~]# vim /etc/dovecot-mysql.conf
添加            
driver = mysql
connect = host=localhost dbname=extmail user=extmail password=extmail
default_pass_scheme = CRYPT
password_query = SELECT username AS user,password AS password FROM mailbox WHERE username = '%u'
user_query = SELECT maildir, uidnumber AS uid, gidnumber AS gid FROM mailbox WHERE username = '%u'
                                                                                                         
connect = host=/tmp/mysql.sock dbname=extmail user=extmail password=extmail
                                                                                                         
啓動dovecot服務:
[root@mail ~]# service dovecot restart
Stopping Dovecot Imap:                                     [ OK ]
Starting Dovecot Imap:                                     [ OK ]

Extmail-1.2

說明:如果extmail的放置路徑做了修改,那麼配置文件webmail.cf中的/var/www路徑必須修改爲你所需要的位置。本文使用了默認的/var/www,所以,以下示例中並沒有包含路徑修改的相關內容。
                                                                                              
1、安裝
[root@mail ~]# tar xf extmail-1.2.tar.gz
[root@mail ~ ]# mkdir -pv /var/www/extsuite
mkdir: created directory `/var/www/extsuite'
[root@mail ~]# mv extmail-1.2 /var/www/extsuite/extmail
[root@mail ~]# cp /var/www/extsuite/extmail/webmail.cf.default /var/www/extsuite/extmail/webmail.cf
                                                                                              
2、修改主配置文件
[root@mail ~]# vim /var/www/extsuite/extmail/webmail.cf
                                                                                                
##部分修改選項的說明:
                                                                                                
SYS_MESSAGE_SIZE_LIMIT = 5242880 ##用戶可以發送的最大郵件
                                                                                                
SYS_USER_LANG = en_US
##語言選項,可改作:
SYS_USER_LANG = zh_CN
                                                                                                
SYS_MAILDIR_BASE = /home/domains
##此處即爲您在前文所設置的用戶郵件的存放目錄,可改作:
SYS_MAILDIR_BASE = /var/mailbox
                                                                                                
SYS_MYSQL_USER = db_user
SYS_MYSQL_PASS = db_pass
##以上兩句句用來設置連接數據庫服務器所使用用戶名、密碼和郵件服務器用到的數據庫,這裏修改爲:
SYS_MYSQL_USER = extmail
SYS_MYSQL_PASS = extmail
                                                                                                
                                                                                                
##以上用來指定驗正用戶登錄裏所用到的表,以及用戶名、域名和用戶密碼分別對應的表中列的名稱;這裏默認即可
                                                                                                
SYS_AUTHLIB_SOCKET = /var/spool/authdaemon/socket
##此句用來指明authdaemo socket文件的位置,這裏修改爲:
SYS_AUTHLIB_SOCKET = /usr/local/courier-authlib/var/spool/authdaemon/socket
                                                                                              
                                                                                              
3、apache相關配置
                                                                                              
由於extmail要進行本地郵件的投遞操作,故必須將運行apache服務器用戶的身份修改爲您的郵件投遞代理的用戶;本例中打開了apache服務器的suexec功能,故使用以下方法來實現虛擬主機運行身份的指定。此例中的MDA爲postfix自帶,因此將指定爲postfix用戶:
##首先在/etc/httpd/conf/httpd.conf配置文件中註釋中心主機
#DocumentRoot "/var/www/html"
##然後添加以下內容
<VirtualHost *:80>
ServerName mail.magedu.com
DocumentRoot /var/www/extsuite/extmail/html/
ScriptAlias /extmail/cgi /var/www/extsuite/extmail/cgi
Alias /extmail /var/www/extsuite/extmail/html
</VirtualHost>
##保存退出。
                                                                                                
修改 cgi執行文件屬主爲apache運行身份用戶:
[root@mail ~]# chown -R postfix.postfix /var/www/extsuite/extmail/cgi/
                                                                                                
[root@mail ~]# vim /etc/httpd/httpd.conf
##//添加如下內容
User postfix
Group postfix
[root@mail ~]# vim /etc/httpd/conf/httpd.conf
##//添加如下內容
<VirtualHost *:80>
ServerName mail.magedu.com
DocumentRoot /var/www/extsuite/extmail/html/
ScriptAlias /extmail/cgi /var/www/extsuite/extmail/cgi
Alias /extmail /var/www/extsuite/extmail/html
</VirtualHost>
                                                                                              
4、依賴關係的解決
                                                                                              
extmail將會用到perl的Unix::syslogd功能,您可以去http://search.cpan.org搜索下載原碼包進行安裝。
[root@mail ~]# tar zxvf Unix-Syslog-1.1.tar.gz
[root@mail ~]# cd Unix-Syslog-1.1
[root@mail Unix-Syslog-1.1]# perl Makefile.PL
[root@mail Unix-Syslog-1.1]# make && make install
                                                                                              
5、啓動apache服務
[root@mail Unix-Syslog-1.1]# service httpd restart
Stopping httpd:                                            [ OK ]
Starting httpd:                                            [ OK ]
首先創建webman用戶(在webman.cf配置文件指定的默認用戶)
連接mysql創建webman
[root@mail ~]# mysql
mysql> GRANT ALL PRIVILEGES ON extmail.* TO webman@localhost IDENTIFIED BY 'webman';
mysql> GRANT ALL PRIVILEGES ON extmail.* TO [email protected] IDENTIFIED BY 'webman';
mysql> FLUSH PRIVILEGES;
[root@mail ~]# mv extman-1.1 /var/www/extsuite/extman
[root@mail ~]# cd /var/www/extsuite/extman/
[root@mail extman]# cp /var/www/extsuite/extman/webman.cf.default /var/www/extsuite/extman/webman.cf
編輯extman配置文件
[root@mail extman]# vim /var/www/extsuite/extman/webman.cf
##修改內容
SYS_MAILDIR_BASE = /var/mailbox 修改郵箱位置
SYS_CAPTCHA_ON = 0   關閉驗證碼模塊
SYS_DEFAULT_UID = 2525
SYS_DEFAULT_GID = 2525   ##更改UID與GID(是postfixUID與其組的GID
修改完成,保存退出 創建extman運行時所需的臨時目錄,並修改屬主屬組
[root@mail extman]# mkdir /tmp/extman
[root@mail extman]# chown postfix.postfix /tmp/extman
修改apache配置文件,虛擬主機定義的內容最終修改如下
ScriptAlias /extmail/cgi /var/www/extsuite/extman/cgi
Alias /extman /var/www/extsuite/extmail/html
修改cgi目錄的屬主數組爲postfix
[root@mail extman]# vim /etc/httpd/conf/httpd.conf
[root@mail extman]# chown -R postfix.postfix /var/www/extsuite/extman/cgi
修改完成後保存退出 重新啓動apache服務
[root@mail extman]# service httpd restart

測試


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章