返回列表 回复 发帖

[讨论] centos5下配置extmail,其中,mysql,php,apache为系统自带

公司的服务器是centos5的,参考了N个文章,配置了centos5下的extmail
其中apache,mysql,php,是按装系统是自带的,其它的是编译的。
http://hi.baidu.com/48238398/blog/item/dcfab0ded34ef35795ee3714.html

以此文章可以复制,粘贴一步步做下来。
目前请只照做到文章中这个提示的位置,由此以下的防病毒和防垃圾邮件系统我还在做第二遍测试
最晚下周六11月11日搞定,我只有周未才有时间搞这个

^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_到这里邮件系统就可以运行了,下边的部分可以选择配置^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^
^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_以下给stfix邮件系统加上防病毒和防垃圾邮件系统^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_

最终目的就是想做一个,从头到尾复制粘贴就可以配置好的邮件系统
另外:extmail中root@extmail.org的密码是extmail*123*,就是说同
http://www.extmail.org/docs/extmail_solution_linux
这个文章上说的密码不一样了,可能是新版本改的。具体可以看下/
extsuite/extman/docs/extmail.sql
extsuite/extman/docs/init.sql两个文件,  这里面有初始化数据库时导入的数据的说明
沙发,支持一下。也在学习中。。。
有没有qmail mail导入extmail的案例呀??

按照你的说明做的,telnet localhsot 25 报这个错误!!!

503 5.5.1 Error: authentication not enabled
这是什么原因呀??
★浪人★
这是日志
tail -n 100 /var/log/maillog
Dec  8 23:40:53 test postfix/master[2353]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Dec  8 23:41:17 test postfix/smtpd[2386]: lost connection after AUTH from localhost.localdomain[127.0.0.1]
Dec  8 23:41:17 test postfix/smtpd[2386]: disconnect from localhost.localdomain[127.0.0.1]
Dec  8 23:41:53 test postfix/trivial-rewrite[2659]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Dec  8 23:41:53 test postfix/trivial-rewrite[2659]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
Dec  8 23:41:54 test postfix/oqmgr[2354]: warning: problem talking to service rewrite: Interrupted system call
Dec  8 23:41:54 test postfix/master[2353]: warning: process /usr/libexec/postfix/trivial-rewrite pid 2659 exit status 1
Dec  8 23:41:54 test postfix/master[2353]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Dec  8 23:43:14 test authdaemond: modules="authmysql authpipe", daemons=5
Dec  8 23:43:14 test authdaemond: Installing libauthmysql
Dec  8 23:43:14 test authdaemond: Installation complete: authmysql
Dec  8 23:43:14 test authdaemond: Installing libauthpipe
Dec  8 23:43:14 test authdaemond: Installation complete: authpipe
Dec  8 23:43:49 test postfix/postfix-script[2457]: starting the Postfix mail system
Dec  8 23:43:49 test postfix/master[2458]: daemon started -- version 2.4.6, configuration /etc/postfix
Dec  8 23:43:49 test postfix/oqmgr[2459]: 74AB94142D4: from=<root@extmai.com>, size=503, nrcpt=1 (queue active)
Dec  8 23:43:49 test postfix/trivial-rewrite[2461]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Dec  8 23:43:49 test postfix/trivial-rewrite[2461]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
Dec  8 23:43:50 test postfix/master[2458]: warning: process /usr/libexec/postfix/trivial-rewrite pid 2461 exit status 1
Dec  8 23:43:50 test postfix/master[2458]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Dec  8 23:43:54 test postfix/smtpd[2463]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Dec  8 23:43:54 test postfix/smtpd[2463]: connect from localhost.localdomain[127.0.0.1]
Dec  8 23:44:50 test postfix/trivial-rewrite[2501]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Dec  8 23:44:50 test postfix/trivial-rewrite[2501]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
Dec  8 23:44:51 test postfix/oqmgr[2459]: warning: problem talking to service rewrite: Success
Dec  8 23:44:51 test postfix/master[2458]: warning: process /usr/libexec/postfix/trivial-rewrite pid 2501 exit status 1
Dec  8 23:44:51 test postfix/master[2458]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Dec  8 23:45:51 test postfix/trivial-rewrite[2507]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Dec  8 23:45:51 test postfix/trivial-rewrite[2507]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
Dec  8 23:45:52 test postfix/oqmgr[2459]: warning: problem talking to service rewrite: Success
Dec  8 23:45:52 test postfix/master[2458]: warning: process /usr/libexec/postfix/trivial-rewrite pid 2507 exit status 1
Dec  8 23:45:52 test postfix/master[2458]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Dec  8 23:46:52 test postfix/trivial-rewrite[2511]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Dec  8 23:46:52 test postfix/trivial-rewrite[2511]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
Dec  8 23:46:53 test postfix/oqmgr[2459]: warning: problem talking to service rewrite: Success
Dec  8 23:46:53 test postfix/master[2458]: warning: process /usr/libexec/postfix/trivial-rewrite pid 2511 exit status 1
Dec  8 23:46:53 test postfix/master[2458]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Dec  8 23:47:53 test postfix/trivial-rewrite[2517]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Dec  8 23:47:53 test postfix/trivial-rewrite[2517]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
Dec  8 23:47:54 test postfix/oqmgr[2459]: warning: problem talking to service rewrite: Success
Dec  8 23:47:54 test postfix/master[2458]: warning: process /usr/libexec/postfix/trivial-rewrite pid 2517 exit status 1
Dec  8 23:47:54 test postfix/master[2458]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Dec  8 23:48:45 test postfix/postfix-script[2521]: stopping the Postfix mail system
Dec  8 23:48:45 test postfix/master[2458]: terminating on signal 15
Dec  8 23:48:54 test postfix/postfix-script[2568]: starting the Postfix mail system
Dec  8 23:48:54 test postfix/master[2569]: daemon started -- version 2.4.6, configuration /etc/postfix
Dec  8 23:48:54 test postfix/qmgr[2570]: 74AB94142D4: from=<root@extmai.com>, size=503, nrcpt=1 (queue active)
Dec  8 23:48:54 test postfix/trivial-rewrite[2572]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Dec  8 23:48:54 test postfix/trivial-rewrite[2572]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
Dec  8 23:48:55 test postfix/master[2569]: warning: process /usr/libexec/postfix/trivial-rewrite pid 2572 exit status 1
Dec  8 23:48:55 test postfix/master[2569]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Dec  8 23:48:57 test postfix/smtpd[2574]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Dec  8 23:48:57 test postfix/smtpd[2574]: connect from localhost.localdomain[127.0.0.1]
Dec  8 23:49:55 test postfix/trivial-rewrite[2578]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Dec  8 23:49:55 test postfix/trivial-rewrite[2578]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
Dec  8 23:49:56 test postfix/master[2569]: warning: process /usr/libexec/postfix/trivial-rewrite pid 2578 exit status 1
Dec  8 23:49:56 test postfix/master[2569]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Dec  8 23:49:56 test postfix/qmgr[2570]: warning: problem talking to service rewrite: Success
Dec  8 23:50:56 test postfix/trivial-rewrite[2581]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Dec  8 23:50:56 test postfix/trivial-rewrite[2581]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
Dec  8 23:50:57 test postfix/qmgr[2570]: warning: problem talking to service rewrite: Success
Dec  8 23:50:57 test postfix/master[2569]: warning: process /usr/libexec/postfix/trivial-rewrite pid 2581 exit status 1
Dec  8 23:50:57 test postfix/master[2569]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Dec  8 23:51:57 test postfix/trivial-rewrite[2584]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Dec  8 23:51:57 test postfix/trivial-rewrite[2584]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
Dec  8 23:51:58 test postfix/qmgr[2570]: warning: problem talking to service rewrite: Success
Dec  8 23:51:58 test postfix/master[2569]: warning: process /usr/libexec/postfix/trivial-rewrite pid 2584 exit status 1
Dec  8 23:51:58 test postfix/master[2569]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Dec  8 23:52:58 test postfix/trivial-rewrite[2589]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Dec  8 23:52:58 test postfix/trivial-rewrite[2589]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
Dec  8 23:52:59 test postfix/qmgr[2570]: warning: problem talking to service rewrite: Success
Dec  8 23:52:59 test postfix/master[2569]: warning: process /usr/libexec/postfix/trivial-rewrite pid 2589 exit status 1
Dec  8 23:52:59 test postfix/master[2569]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Dec  8 23:53:59 test postfix/trivial-rewrite[2593]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Dec  8 23:53:59 test postfix/trivial-rewrite[2593]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
Dec  8 23:54:00 test postfix/qmgr[2570]: warning: problem talking to service rewrite: Success
Dec  8 23:54:00 test postfix/master[2569]: warning: process /usr/libexec/postfix/trivial-rewrite pid 2593 exit status 1
Dec  8 23:54:00 test postfix/master[2569]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Dec  8 23:54:11 test postfix/smtpd[2574]: timeout after AUTH from localhost.localdomain[127.0.0.1]
Dec  8 23:54:11 test postfix/smtpd[2574]: disconnect from localhost.localdomain[127.0.0.1]
Dec  8 23:55:00 test postfix/trivial-rewrite[2596]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Dec  8 23:55:00 test postfix/trivial-rewrite[2596]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
Dec  8 23:55:01 test postfix/qmgr[2570]: warning: problem talking to service rewrite: Interrupted system call
Dec  8 23:55:01 test postfix/master[2569]: warning: process /usr/libexec/postfix/trivial-rewrite pid 2596 exit status 1
Dec  8 23:55:01 test postfix/master[2569]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Dec  8 23:56:01 test postfix/trivial-rewrite[2599]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Dec  8 23:56:01 test postfix/trivial-rewrite[2599]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
Dec  8 23:56:02 test postfix/qmgr[2570]: warning: problem talking to service rewrite: Success
Dec  8 23:56:02 test postfix/master[2569]: warning: process /usr/libexec/postfix/trivial-rewrite pid 2599 exit status 1
Dec  8 23:56:02 test postfix/master[2569]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Dec  8 23:57:02 test postfix/trivial-rewrite[2602]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Dec  8 23:57:02 test postfix/trivial-rewrite[2602]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
Dec  8 23:57:03 test postfix/qmgr[2570]: warning: problem talking to service rewrite: Success
Dec  8 23:57:03 test postfix/master[2569]: warning: process /usr/libexec/postfix/trivial-rewrite pid 2602 exit status 1
Dec  8 23:57:03 test postfix/master[2569]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Dec  8 23:58:03 test postfix/trivial-rewrite[2605]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Dec  8 23:58:03 test postfix/trivial-rewrite[2605]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
Dec  8 23:58:04 test postfix/qmgr[2570]: warning: problem talking to service rewrite: Success
Dec  8 23:58:04 test postfix/master[2569]: warning: process /usr/libexec/postfix/trivial-rewrite pid 2605 exit status 1
Dec  8 23:58:04 test postfix/master[2569]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
★浪人★
这是maildrop配置文件
tail  -n 300 /etc/postfix/master.cf
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd
#submission inet n       -       n       -       -       smtpd
#  -o smtpd_enforce_tls=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps     inet  n       -       n       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#628      inet  n       -       n       -       -       qmqpd
pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       n       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       n       -       -       smtp
        -o fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop  unix  -       n       n       -       -       pipe
  #flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
  flags=DRhu user=vuser argv=maildrop -w 90 -d ${user}@${nexthop} ${recipient} ${user} ${extension} {nexthop}
#
# ====================================================================
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
#old-cyrus unix  -       n       n       -       -       pipe
#  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus     unix  -       n       n       -       -       pipe
#  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
#uucp      unix  -       n       n       -       -       pipe
#  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# ====================================================================
#
# Other external delivery methods.
#
#ifmail    unix  -       n       n       -       -       pipe
#  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
#
#bsmtp     unix  -       n       n       -       -       pipe
#  flags=Fq. user=bsmtp argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
#
#scalemail-backend unix -       n       n       -       2       pipe
#  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
#  ${nexthop} ${user} ${extension}
#
#mailman   unix  -       n       n       -       -       pipe
#  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
#  ${nexthop} ${user}
★浪人★
这是main.cf配置文件
tail  -n 300 /etc/postfix/main.cf
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
unknown_local_recipient_reject_code = 550

# hostname
mynetworks = 127.0.0.1
myhostname = mail.domain.com
mydomain = domain.com
myorigin = $mydomain
mydestination = $mynetworks $myhostname

# banner
mail_name = Postfix - by domain.com
smtpd_banner = $myhostname ESMTP $mail_name

# response immediately
smtpd_error_sleep_time = 0s
unknown_local_recipient_reject_code = 450

# extmail config here
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_transport = maildrop:
maildrop_destination_recipient_limit = 1
★浪人★
楼主帮忙看看是什么原因,急呀!!
★浪人★
Dec  8 23:43:49 test postfix/trivial-rewrite[2461]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
看样子是你连数据库出错

这里你配置了吗?

然后编辑/usr/local/courier-authlib/etc/authlib/authmysqlrc
清空原内容加入

MYSQL_SERVER            localhost
MYSQL_USERNAME          extmail
MYSQL_PASSWORD          extmail
MYSQL_SOCKET            /var/lib/mysql/mysql.sock
MYSQL_PORT              3306
MYSQL_OPT               0
MYSQL_DATABASE          extmail
MYSQL_USER_TABLE        mailbox
MYSQL_CRYPT_PWFIELD     password
MYSQL_UID_FIELD         uidnumber
MYSQL_GID_FIELD         gidnumber
MYSQL_LOGIN_FIELD       username
MYSQL_HOME_FIELD        homedir
MYSQL_NAME_FIELD        name
MYSQL_MAILDIR_FIELD     maildir
MYSQL_QUOTA_FIELD       quota
MYSQL_SELECT_CLAUSE     SELECT username,password,"",uidnumber,gidnumber,\
                        CONCAT('/home/domains/',homedir),               \
                        CONCAT('/home/domains/',maildir),               \
                        quota,                                          \
                        name                                            \
                        FROM mailbox                                    \
                        WHERE username = '$(local_part)@$(domain)'

启动服务
# /usr/local/courier-authlib/sbin/authdaemond start
返回列表