¡¡¡¡2£®2¡¢ÉèÖÃÊý¾Ý¿â
¡¡¡¡
¡¡¡¡2.2.1¡¢Ìí¼ÓmysqlÓû§£º
¡¡¡¡
¡¡¡¡1¡¢Ê¹ÓÃwebmin£>mysqlÊý¾Ý¿â·þÎñÆ÷£>Óû§È¨ÏÞ£¬Ìí¼ÓÓû§postfix£¬ÃÜÂëpostfix£¬Ö÷»úlocalhost£¬²¢ÉèÖÃÓµÓÐÏàÓ¦µÄȨÏÞ¡£
¡¡¡¡
¡¡¡¡2¡¢Ê¹ÓÃSQLÓï¾äÌí¼ÓÓû§£º
¡¡¡¡#cd /usr/local/bin
¡¡¡¡#./mysql ¨CD mysql ¨Cp
¡¡¡¡Password:
¡¡¡¡mysql>INSERT INTO user (host,user,password)
¡¡¡¡->VALUES (¡®localhost¡¯,¡®postfix¡¯,¡¯¡¯);
¡¡¡¡Query OK. I row affected (0.00 sec)
¡¡¡¡mysql>UPDATA user SET password=password(¡®postfix¡¯)
¡¡¡¡->WHERE user=¡¯postfix¡¯;
¡¡¡¡Rows matched: 1 Changed: 1 Warnings: 0
¡¡¡¡mysql>FLUSH PRIVILEGES;
¡¡¡¡Query OK. 0 rows affected (0.01 sec)
¡¡¡¡mysql>GRANT select,insert,update on mail.* TO postfix
¡¡¡¡Query OK. 0 rows affected (0.01 sec)
¡¡¡¡mysql>exit
¡¡¡¡
¡¡¡¡2.2.2¡¢ÏòÊý¾Ý¿âÖÐÌí¼Ó±í
¡¡¡¡
¡¡¡¡#cd /usr/local/bin/
¡¡¡¡#ee postfix.sql
¡¡¡¡
¡¡¡¡CREATE DATABASE;
¡¡¡¡GRANT ALL ON mail.* mail@localhost IDENTIFIED BY ¡°postfix¡±;
¡¡¡¡FLUSH PRIVILEGES;
¡¡¡¡use mail;
¡¡¡¡CREATE TABLE forward (
¡¡¡¡username varchar(255) NOT NULL default ¡®¡¯, //±¾»úµØÖ·
¡¡¡¡forward_addr varchar(255) default NULL, //ת·¢µØÖ·
¡¡¡¡PRIMARY KEY (username)
¡¡¡¡) TYPE=MyISAM;
¡¡¡¡CREATE TABLE transport (
¡¡¡¡domain varchar(255) NOT NULL default ¡®¡¯, //ÓʼþÓò
¡¡¡¡transport varchar(icon_cool.gif default NULL, //´¦Àí·½Ê½
¡¡¡¡PRIMARY KEY (domain)
¡¡¡¡) TYPE=MyISAM;
¡¡¡¡CREATE TABLE users (
¡¡¡¡username varchar(128) NOT NULL default ¡®¡¯, //Óû§Ãû
¡¡¡¡domain varchar(128) NOT NULL default ¡®¡¯, //ÓʼþÓò
¡¡¡¡address varchar(128) NOT NULL default ¡®¡¯, //ÓʼþµØÖ·
¡¡¡¡password varchar(128) NOT NULL default ¡®¡¯, //Óû§ÃÜÂ루Ã÷ÎÄ£©
¡¡¡¡uid int(6) NOT NULL default ¡®1024¡¯, //uid
¡¡¡¡gid int(6) NOT NULL default ¡®1024¡¯£¬ //gid
¡¡¡¡home varchar(255) NOT NULL default ¡®/¡¯, //homeĿ¼
¡¡¡¡maildir varchar(255) NOT NULL default ¡®¡¯, //maildirĿ¼
¡¡¡¡quota varchar(255) NOT NULL default ¡®¡¯, //ÓÊÏäÈÝÁ¿
¡¡¡¡mailok tinyint(3) NOT NULL default ¡®1¡¯,
¡¡¡¡bool1 tinyint(3) NOT NULL default ¡®1¡¯,
¡¡¡¡bool2 tinyint(3) NOT NULL default ¡®1¡¯,
¡¡¡¡PRIMARY KEY (address),
¡¡¡¡UNIQUE KEY address (address),
¡¡¡¡KEY address_2 (address)
¡¡¡¡) TYPE=MyISAM;
¡¡¡¡
¡¡¡¡ÊäÈëÍê±Ïºó±£´æÍ˳ö¡£
¡¡¡¡#./mysql ¨Cu postfix ¨Cp < postfix.sql
¡¡¡¡#password£ºpostfix
¡¡¡¡
¡¡¡¡2.2.3¡¢Ïò±íÖÐÌí¼ÓÊý¾Ý
¡¡¡¡
¡¡¡¡#/usr/local/bin
¡¡¡¡#./mysql ¨Cu postfix ¨Cp
¡¡¡¡password:******
¡¡¡¡mysql>use mail
¡¡¡¡mysql>INSERT INTO transport (domain,transport)
¡¡¡¡->VALUES (¡¯localhost.com¡¯,¡¯virtual:¡¯);
¡¡¡¡mysql>INSERT INTO users (username,domain,address,password,uid,gid,
¡¡¡¡home,maildir,quota,mailok,bool1,bool2)
¡¡¡¡->VALUES (¡®test¡¯,¡¯localhost.com¡¯,¡¯test.localhost.com¡¯,
¡¡¡¡¡¯test¡¯,¡¯1024¡¯,¡¯1024¡¯,¡¯/¡¯,
¡¡¡¡¡¯/var/postfix_mail/test/Maildir/¡¯,¡¯5000000¡¯,¡¯1¡¯,¡¯1¡¯,¡¯1¡¯);
¡¡¡¡mysql>exit
¡¡¡¡
¡¡¡¡3£®°²×°CYRUS-SASL
¡¡¡¡
¡¡¡¡#tar ¨Czxvf cyrus-sasl-1.5.27
¡¡¡¡#cd cyrus-sasl-1.5.27
¡¡¡¡#./configure --with-pwcheck=/var/pwcheck --enable-login
¡¡¡¡--enable-plain
¡¡¡¡#make
¡¡¡¡#make install
¡¡¡¡
¡¡¡¡#echo /usr/local/lib/ >> /etc/ld.so.conf
¡¡¡¡#echo /usr/local/lib/mysql/ >> /etc/ld.so.conf
¡¡¡¡#ldconfig
¡¡¡¡
¡¡¡¡#cp /usr/local/include/* /usr/include
¡¡¡¡#cp /usr/local/lib/lib*.* /usr/lib
¡¡¡¡
¡¡¡¡#ln ¨Cs /usr/local/lib/sasl /usr/lib/sasl
¡¡¡¡#ln ¨Cs /usr/local/include/mysql /usr/include/mysql
¡¡¡¡#ln ¨Cs /usr/local/lib/mysql /usr/lib/mysql
¡¡¡¡
¡¡¡¡ÔÚ/usr/local/lib/saslϽ¨Á¢Îļþsmtpd.conf,Ìí¼ÓÒ»ÏÂÄÚÈÝ£º
¡¡¡¡pwcheck_method:mysql
¡¡¡¡mysql_user:postfix
¡¡¡¡mysql_passwd:postfix
¡¡¡¡mysql_host:localhost
¡¡¡¡mysql_database:mail
¡¡¡¡mysql_table:users
¡¡¡¡mysql_uidcol:address
¡¡¡¡mysql_pwdcol:password
¡¡¡¡
¡¡¡¡4.°²×°ºÍÉèÖÃpostfix
¡¡¡¡
¡¡¡¡4£®1¡¢°²×°postfix
¡¡¡¡
¡¡¡¡4.4.1¡¢±àÒë/etc/rc.conf,ÉèÖÃsendmail_enable=¡±NO¡±
¡¡¡¡
¡¡¡¡#mv /usr/bin/newaliases /usr/bin/newaliases.OFF
¡¡¡¡#mv /usr/bin/mailq /usr/bin/mailq.OFF
¡¡¡¡#mv /usr/sbin/sendmail /usr/sbin/sendmail.OFF
¡¡¡¡#pw groupadd postfix ¨Cg 1024
¡¡¡¡#pw groupadd postdrop ¨Cg 1025
¡¡¡¡#pw useradd postfix ¨Cu 1024 ¨Cg postfix
¡¡¡¡#echo ¡®postfix:root¡¯ >> /etc/aliases
¡¡¡¡
¡¡¡¡4.4.2¡¢°²×°postfixºÍÏàÓ¦µÄquota²¹¶¡
¡¡¡¡
¡¡¡¡#tar zxvf postfix-1.1.11.tar.gz
¡¡¡¡#patch < postfix-1.1.11_quota_maildirsize.patch
¡¡¡¡#make ¨Cf Makefile.init makefiles ¡®CCARGS=-DUSE_SASL_AUTH ¨CDHAS_MYSQL ¨CI/usr/include/mysql¡¯ ¡®AUXLIBS=-L/usr/lib/mysql ¨Clmysqlclient ¨Clasal ¨Clz ¨Clm¡¯
¡¡¡¡#make
¡¡¡¡#make install °´ÕÕĬÈÏ·¾¶Ò»Â·»Ø³µ¾Í¿ÉÒÔ°²×°³É¹¦postfix£¬Èç¹û³ö´í£¬ÔÚÌáʾ¡°tempdir¡±Ê±ÊäÈ룺/tmp£¬ÕâÑùÒ»°ã¾Í¿ÉÒÔͨ¹ý¡£
¡¡¡¡
¡¡¡¡4£®2¡¢ÉèÖÃpostfix
¡¡¡¡
¡¡¡¡postfixĬÈϰ²×°µ½/etc/postfixĿ¼Ï£¬ÉèÖÃÎļþÒ²ÔÚÕâ
¡¡¡¡#cd /etc/postfix
¡¡¡¡
¡¡¡¡4.2.1¡¢±àÒëÖ÷ÅäÖÃÎļþmain.cf
¡¡¡¡
¡¡¡¡#ee main.cf Ìí¼ÓÈçÏÂÄÚÈÝ
¡¡¡¡
¡¡¡¡#Base configure
¡¡¡¡myhostname = mail.localhost.com //±¾»úµÄ»úÆ÷Ãû
¡¡¡¡mydomain = local.com //ÓòÃû
¡¡¡¡mynetworks = 127.0.0.0/8 192.168.0.0/16 //ÔÊÐí²»¾smtpÈÏÖ¤ÄÜ·¢ÐŵÄip¶Î
¡¡¡¡home_mailbox = Maildir/ //ʹÓõÄÓÊÏä¸ñʽΪMaildir/
¡¡¡¡smtpd_banner = Welcome to localhost.com mail system! //smtpµÄ»¶ÓÐÅÏ¢
¡¡¡¡
¡¡¡¡#Mysql configure
¡¡¡¡transport_maps = mysql:/etc/postfix/transport.cf //Ö¸¶¨ÄÇЩÓòµÄÓʼþ¿ÉÒÔ±»postfixÊÕÏÂÀ´
¡¡¡¡virtual_mailbox_base =/ //Ö¸¶¨Óû§ÓÊÏäËùÔڵĸùĿ¼
¡¡¡¡virtual_uid_maps = mysql:/etc/postfix/ids.cf //Ö¸¶¨postfixÕʺŵÄID
¡¡¡¡virtual_gid_maps = mysql:/etc/postfix/gds.cf //Ö¸¶¨postfix×éµÄID
¡¡¡¡virtual_mailbox_maps = mysql:/etc/postfix/users.cf //Ö¸¶¨Óû§ÓÊÏäµÄĿ¼
¡¡¡¡virtual_maps = mysql:/etc/postfix/forward.cf //Ö¸¶¨×Ô¶¯×ª·¢ÓʼþµÄÉèÖÃ
¡¡¡¡#Quota configure
¡¡¡¡message_size_limit = 5000000 //µ¥¸öÓʼþ´óСµÄÏÞÖÆ
¡¡¡¡virtual_mailbox_limit = 5000000 //ĬÈϵÄÓÊÏä´óС
¡¡¡¡virtual_mailbox_limit_maps = mysql:/etc/postfix/quota.cf //ÿ¸öÓû§µÄÓÊÏä´óС
¡¡¡¡virtual_mailbox_limit_override = yes //ÊÇ·ñÔÊÐí¸²¸ÇĬÈϵÄÓÊÏä´óС
¡¡¡¡
¡¡¡¡#smtp configure
¡¡¡¡smtpd_sasl_auth_enable = yes
¡¡¡¡smtpd_sasl_local_domain = $myhostname
¡¡¡¡smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated permit_auth_destination reject
¡¡¡¡smtpd_sasl_security_options = noanonymous
¡¡¡¡smtpd_client_restrictions = permit_sasl_authenticated
¡¡¡¡
¡¡¡¡inet_interfaces = all //¼àÌýËùÓж˿Ú
¡¡¡¡inet_interfaces = 192.168.80.21 //ÊÇÍâÃæµÄÓû§Ò²¿ÉÒÔ·¢ËÍÓʼþ
¡¡¡¡
¡¡¡¡4.2.2¡¢²é¿´master.cfÎļþ±ØÐë°üº¬ÏÂÃæÒ»ÐÐ
¡¡¡¡
¡¡¡¡virtual unix - n n - - virtual
¡¡¡¡
¡¡¡¡4.2.3¡¢±àÒëtransport.cf
¡¡¡¡
¡¡¡¡#touch transport.cf
¡¡¡¡#ee transport.cf Ìí¼ÓÈçÏÂÄÚÈÝ
¡¡¡¡user = postfix
¡¡¡¡password = postfix
¡¡¡¡dbname = mail
¡¡¡¡table = transport
¡¡¡¡select_field = transport
¡¡¡¡where_field = domain
¡¡¡¡hosts = localhost
¡¡¡¡
¡¡¡¡4.2.4¡¢±àÒëids.cf
¡¡¡¡
¡¡¡¡#touch ids.cf
¡¡¡¡#ee ids.cf
¡¡¡¡user = postfix
¡¡¡¡password = postfix
¡¡¡¡dbname = mail
¡¡¡¡table = users
¡¡¡¡select_field = uid
¡¡¡¡where_field = address
¡¡¡¡hosts = localhost
¡¡¡¡4.2.5¡¢±àÒëgds.cf
¡¡¡¡
¡¡¡¡#touch gds.cf
¡¡¡¡#ee gds.cf
¡¡¡¡user = postfix
¡¡¡¡password = postfix
¡¡¡¡dbname = mail
¡¡¡¡table = users
¡¡¡¡select_field = gid
¡¡¡¡where_field = address
¡¡¡¡hosts = localhost
¡¡¡¡
¡¡¡¡4.2.6¡¢±àÒëforward.cf
¡¡¡¡
¡¡¡¡#touch forward.cf
¡¡¡¡#ee forward.cf
¡¡¡¡user = postfix
¡¡¡¡password = postfix
¡¡¡¡dbname = mail
¡¡¡¡table = forward
¡¡¡¡select_field = forward_addr
¡¡¡¡where_field = username
¡¡¡¡hosts = localhost
¡¡¡¡
¡¡¡¡4.2.7¡¢±àÒëusers.cf
¡¡¡¡
¡¡¡¡#touch users.cf
¡¡¡¡#ee users.cf
¡¡¡¡user = postfix
¡¡¡¡password = postfix
¡¡¡¡dbname = mail
¡¡¡¡table = users
¡¡¡¡select_field = maildir
¡¡¡¡where_field = address
¡¡¡¡hosts = localhost
¡¡¡¡
¡¡¡¡4.2.8¡¢±àÒëquota.cf
¡¡¡¡
¡¡¡¡#touch quota.cf
¡¡¡¡#ee quota.cf
¡¡¡¡user = postfix
¡¡¡¡password = postfix
¡¡¡¡dbname = mail
¡¡¡¡table = users
¡¡¡¡select_field = quota
¡¡¡¡where_field = address
¡¡¡¡hosts = localhost
¡¡¡¡
¡¡¡¡4.3¡¢Æô¶¯postfix
¡¡¡¡
¡¡¡¡#/usr/sbin/postfix start
¡¡¡¡postfix/postfix-script: starting the Postfix mail system
¡¡¡¡
¡¡¡¡#echo ¡°/usr/sbin/postfix start¡± >> /etc/rc.local
¡¡¡¡
¡¡¡¡#telnet localhost 25
¡¡¡¡Connected to localhost.localhost.com.
¡¡¡¡Escape character is ¡®^]¡¯.
¡¡¡¡220 Welcome to localhost mail system!
¡¡¡¡
¡¡¡¡4.4¡¢²âÊÔpostfix
¡¡¡¡
¡¡¡¡4.4.1¡¢½¨Á¢mailÓʼþ´æ·ÅĿ¼
¡¡¡¡#cd /var
¡¡¡¡#mkdir postfix_mail
¡¡¡¡#chown ¨CR postfix:postfix /var/postfix_mail
¡¡¡¡
¡¡¡¡4.4.2¡¢Ê¹Óÿͻ§¶Ë·¢Óʼþ
¡¡¡¡´Ëʱ¿ÉÒÔʹÓÿͻ§¶ËµÄfoxmail»òÕßoutlookÏòÓû§test.localhost.com·¢ËÍÓʼþ£¬È»ºóµ½/var/postfix/test/Maildir/ϲ鿴Óʼþ£¬Èç¹ûÄÜÊÕµ½ËµÃ÷SMTPÒѾ¹¤×÷Õý³£ÁË£¬Èç¹ûÓÐÎÊÌâ×Ðϸ¼ì²é×Ô¼ºµÄÿ¸ö²½Öè¡£
¡¡¡¡
¡¡¡¡5£®°²×°ÉèÖÃcourier-imap
¡¡¡¡
¡¡¡¡5.1¡¢°²×°courier-imap
¡¡¡¡
¡¡¡¡#cd /usr/ports/mail/courier-imap
¡¡¡¡#make
¡¡¡¡#cd work/courier-imap-1.5.3
¡¡¡¡#./configure ¨Cwith-db=db ¨Cwithout-socks ¨Cdisable-root-check
¡¡¡¡#make
¡¡¡¡#make install
¡¡¡¡#/usr/lib/courier-imap/libexec/authlib/authdaemon start
¡¡¡¡#echo ¡°/usr/lib/courier-imap/libexec/authlib/authdaemon start¡± >> /etc/rc.local
¡¡¡¡
¡¡¡¡5.2¡¢Ìí¼ÓÓû§
¡¡¡¡
¡¡¡¡#cd /usr/local/bin
¡¡¡¡#./mysql ¨CD mysql ¨Cp
¡¡¡¡password:*******
¡¡¡¡mysql>INSERT INTO user (host,user,password)
¡¡¡¡->VALUES (¡®localhost¡¯,¡¯courier¡¯,¡¯¡¯);
¡¡¡¡mysql>UPDATA user SET password=password(¡®haha¡¯)
¡¡¡¡->WHERE user=¡¯courier¡¯;
¡¡¡¡mysql>FLUSH PRIVILEGES;
¡¡¡¡mysql>GRAN select,insert,update on mail.* TO courier;
¡¡¡¡mysql>exit
¡¡¡¡
¡¡¡¡5.3¡¢ÉèÖÃcourier-imap
¡¡¡¡
¡¡¡¡#cd /usr/lib/courier-imap/etc
¡¡¡¡#cp authdaemonrc.dist authdaemonrc
¡¡¡¡#cp authmysqlrc.dist authmysqlrc
¡¡¡¡#cp imapd.dist imapd
¡¡¡¡#cp imapd-ssl.dist imapd-ssl
¡¡¡¡#cp pop3d.dist pop3d
¡¡¡¡#cp pop3d-ssl pop3d-ssl
¡¡¡¡
¡¡¡¡#ee pop3d
¡¡¡¡
¡¡¡¡prefix=/usr/lib/courier-imap
¡¡¡¡exec_prefix=/usr/lib/courier-imap
¡¡¡¡sbindir=¡±/usr/lib/courier-imap/sbin¡±
¡¡¡¡
¡¡¡¡PIDFILE=/var/run/pop3d.pid
¡¡¡¡MAXDAEMONS=40
¡¡¡¡MAXPERIP=4
¡¡¡¡AUTHMODULES=¡±authdaemon¡±
¡¡¡¡AUTHMODULES_ORIG=¡±authdaemon¡±
¡¡¡¡POP3AUTH=¡±¡±
¡¡¡¡POP3AUTH_ORIG=¡±LOGIN CRAM-MD5 CRAM-SHA1¡±
¡¡¡¡POP3AUTH_TLS=¡±¡±
¡¡¡¡POP3AUTH_TLS_ORIG=¡±LOGIN PLAIN¡±
¡¡¡¡PORT=110
¡¡¡¡ADDRESS=0
¡¡¡¡TCPDOPTS=¡±-nodnslookup -noidentlookup¡±
¡¡¡¡POP3DSTART=YES
¡¡¡¡
¡¡¡¡#ee imapd
¡¡¡¡
¡¡¡¡IMAPDSTART=YES
¡¡¡¡
¡¡¡¡#ee authdaemonrc
¡¡¡¡authmodulelist=¡±authmysql authpam¡±
¡¡¡¡authmodulelistorig=¡±authcustom authcram authuserdb authmysql authpam¡±
¡¡¡¡daemons=5
¡¡¡¡version=¡±authdaemond.mysql¡±
¡¡¡¡authdaemonvar=¡±/usr/lib/courier-imap/var/authdaemon¡±
¡¡¡¡
¡¡¡¡#ee authmysqlrc
¡¡¡¡MYSQL_SERVER localhost
¡¡¡¡MYSQL_USERNAME courier
¡¡¡¡MYSQL_PASSWORD haha
¡¡¡¡MYSQL_SOCKET /tmp/mysql.sock
¡¡¡¡MYSQL_PORT 3306
¡¡¡¡MYSQL_OPT 0
¡¡¡¡MYSQL_DATABASE mail
¡¡¡¡MYSQL_USER_TABLE users
¡¡¡¡#MYSQL_CRYPT_PWFIELD password
¡¡¡¡MYSQL_CLEAR_PWFIELD password
¡¡¡¡MYSQL_UID_FIELD uid
¡¡¡¡MYSQL_GID_FIELD gid
¡¡¡¡MYSQL_LOGIN_FIELD address
¡¡¡¡MYSQL_HOME_FIELD home
¡¡¡¡MYSQL_NAME_FIELD username
¡¡¡¡MYSQL_MAILDIR_FIELD maildir
¡¡¡¡MYSQL_QUOTA_FIELD quota
¡¡¡¡MYSQL_WHERE_CLAUSE mailok=1
¡¡¡¡
¡¡¡¡#cd ..
¡¡¡¡#ln -s /usr/lib/courier-imap/libexec/imapd.rc imapd
¡¡¡¡#ln -s /usr/lib/courier-imap/libexec/pop3d.rc pop3d
¡¡¡¡#./imapd start
¡¡¡¡#echo ¡°/usr/lib/courier-imap/imap start¡± >> /etc/rc.local
¡¡¡¡#./pop3d start
¡¡¡¡#echo ¡°/usr/lib/courier-imap/pop3 start¡± >> /etc/rc.local
¡¡¡¡#netstat ¨Can | grep LISTEN
¡¡¡¡tcp4 0 0 *:110 *:* LISTEN
¡¡¡¡tcp46 0 0 *:110 *:* LISTEN
¡¡¡¡tcp4 0 0 *:143 *.* LISTEN
¡¡¡¡tcp46 0 0 *.143 *.* LISTEN
¡¡¡¡
¡¡¡¡#telnet localhost 110
¡¡¡¡Trying 127.0.0.1...
¡¡¡¡Connected to localhost.cw-isquare.com.
¡¡¡¡Escape character is ¡®^]¡¯.
¡¡¡¡+OK Hello there
¡¡¡¡#quit
¡¡¡¡
¡¡¡¡#telnet localhost 143
¡¡¡¡*OK Courier-IMAP ready. Copyright 1998-2002 Double Precision, Inc. See COPYING for distribution information.
¡¡¡¡#quit
¡¡¡¡
¡¡¡¡5£®°²×°ÉèÖÃsqwebmail
¡¡¡¡
¡¡¡¡5.1¡¢°²×°sqwebmail-3.5.0-cn.tar.gz
¡¡¡¡
¡¡¡¡#tar zxvf sqwebmail-3.5.0.tar.gz
¡¡¡¡#cd sqwebmail-3.5.0
¡¡¡¡#./configure --without-authpam ¨Cwith-db=db --enable-webpass=no --without-authpwd --without-authshadow
¡¡¡¡#make configure-check
¡¡¡¡#make
¡¡¡¡#make install-strip
¡¡¡¡#make install-configure
¡¡¡¡
¡¡¡¡#/usr/local/share/sqwebmail/libexec/authlib/authdaemond start
¡¡¡¡#echo ¡°/usr/local/share/sqwebmail/libexec/authlib/authdaemond start¡± >> /etc/rc.local
¡¡¡¡
¡¡¡¡5.2¡¢ÅäÖÃsqwebmail-3.5.0
¡¡¡¡
¡¡¡¡5.2.1¡¢°²×°apache
¡¡¡¡#tar apache_1.3.22.tar.gz
¡¡¡¡#cd apache_1.3.22
¡¡¡¡#./configure ¨Cprefix=/usr/local/apache
¡¡¡¡#make
¡¡¡¡#make install
¡¡¡¡
¡¡¡¡5.2.2¡¢ÉèÖÃsqwebmail
¡¡¡¡#cd /usr/local/share/sqwebmail
¡¡¡¡#ee authdaemonrc
¡¡¡¡authmodulelist=¡±authmysql authpam¡±
¡¡¡¡authmodulelistorig=¡±authcustom authcram authuserdb authmysql authpam¡±
¡¡¡¡daemons=5
¡¡¡¡version=¡±authdaemond.mysql¡±
¡¡¡¡authdaemonvar=¡±/usr/local/share/sqwebmail/var/authdaemon¡±
¡¡¡¡
¡¡¡¡#ee authmysqlrc
¡¡¡¡MYSQL_SERVER localhost
¡¡¡¡MYSQL_USERNAME courier
¡¡¡¡MYSQL_PASSWORD haha
¡¡¡¡MYSQL_SOCKET /tmp/mysql.sock
¡¡¡¡MYSQL_PORT 3306
¡¡¡¡MYSQL_OPT 0
¡¡¡¡MYSQL_DATABASE mail
¡¡¡¡MYSQL_USER_TABLE users
¡¡¡¡#MYSQL_CRYPT_PWFIELD password
¡¡¡¡MYSQL_CLEAR_PWFIELD password
¡¡¡¡MYSQL_UID_FIELD uid
¡¡¡¡MYSQL_GID_FIELD gid
¡¡¡¡MYSQL_LOGIN_FIELD address
¡¡¡¡MYSQL_HOME_FIELD home
¡¡¡¡MYSQL_NAME_FIELD username
¡¡¡¡MYSQL_MAILDIR_FIELD maildir
¡¡¡¡MYSQL_QUOTA_FIELD quota
¡¡¡¡MYSQL_WHERE_CLAUSE mailok=1
¡¡¡¡
¡¡¡¡
¡¡¡¡5.2.3¡¢²âÊÔsqwebmail-3.5.0
¡¡¡¡
¡¡¡¡ÔÚ¿Í»§¶ËµÄä¯ÀÀÆ÷µÄµØÖ·À¸ÊäÈë
¡¡¡¡http://mail.localhost.com/cgi-bin/sqwebmail
¡¡¡¡ÊäÈëÓû§ÃûºÍÃÜÂë¾Í¿ÉÒԵǼ½øÈ¥ÊÕ·¢ÓʼþÁË¡£
¡¡¡¡×¢Ò⣺Óû§ÃûÒ»¶¨ÒªÊäÈëÈ«³Æ£¬Ò²¾ÍÊÇÁ¬ÓòÃûÒ»ÆðÊäÈë¡£
¡¡¡¡
¡¡¡¡5.2.4¡¢ÉèÖÃapacheÒ³ÃæÌø×ª
¡¡¡¡
¡¡¡¡#cd /usr/local/apache/htdocs
¡¡¡¡#touch index.html
¡¡¡¡#ee index.html
¡¡¡¡
¡¡¡¡<meta http-equiv=¡±refresh¡± content=¡±0;URL=http://mail.localhost
¡¡¡¡.com/cgi-bin/sqwebmail?index=1¡±>
¡¡¡¡
¡¡¡¡ÏÖÔھͿÉÒÔÖ±½ÓÔÚIEµÄµØÖ·À¸ÊäÈ룺
¡¡¡¡http://mail.localhost.com
¡¡¡¡À´·ÃÎÊsqwebmailÁË
¡¡¡¡
¡¡¡¡ÕâÆªÎÄÕÂûÓмÓÈësmtpÈÏÖ¤£¬ÉÏ´ÎÓиöÅóÓÑÔÚÌû×ÓÀï˵¹ý¼ÓÈÏÖ¤µÄ·½·¨£¬ÓÉÓÚûÓÐʱ¼ä£¬ËùÒÔÎÒ¾ÍûÓÐÊÔ¡£»¹ÓÐûÓÐÓʼþÁбíµÄÎÊÌ⣬ÎÒÕÒ²»µ½½â¾öµÄ·½·¨£¬Èç¹ûÓÐÅóÓÑ¿´µ½ÕâÆªÎÄÕÂÇë°ÑsmtpÈÏÖ¤ºÍÓʼþÁÐ±í¹¦Äܲ¹³äһϣ¬ÕâÒª¾Í±È½ÏÍêÕûÁË¡£ÔÚ´ËÎÒÏȱíʾ¸Ðл¡«
| ×ÔÓÉ¹ã¸æÇø |
| ¡¡ |