首页 > 学技术 > 技术网文 > Mail服务器 > 正文

[精华] 安装postfix的无法创建邮件域目录


来源 chinaunix.net 酷勤网整理

有没有能够回复我在安装了mysql+apache+php+cyrus-sasl 2.1.20+postfix 2.2.3+postfixadmin 2.1.0后测试,
其他的暂时不安装,能后在测试postfix的起动,上面所有的安装和编译都是正确无误的,但是通过postfixadmin的时候却创建了域在数据库中,但是域目录(/var/mailbox/)却无法创建域名文件夹,创建一个新的邮箱名也无法创建一个邮箱文件夹,这是什么问题呢。我在配置文件中都已确定是正确的了。如:
# vi /etc/postfix/main.cf
#=====================BASE========================= 
#主机名称(用 FQDN 的方式来写)
myhostname = www.test.com
#domain 名称
mydomain = test.com
#邮件标头上面的 mail from 的那个地址
myorigin = $mydomain
#可用来收件的主机名称(这里没有使用$mydomain是因为我们将使用virtualhost)
mydestination = $myhostname localhost localhost.$mydomain
#允许不使用smtp发信认证的网段
mynetworks = 127.0.0.0/8
inet_interfaces = all
#使用的邮箱格式 
#home_mailbox = Maildir/
#mailbox_transport = maildrop 

#=====================Vritual Mailbox settings========================= 
# 指定用户邮箱所在的根目录
virtual_mailbox_base = /var/mailbox/
#指定postfix如何去检索邮件用户,这里是采用mysql (用户邮箱的目录)
virtual_mailbox_maps = mysql:/etc/postfix/mysql/mysql_virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql_virtual_domains_maps.cf
virtual_alias_domains = (原创就是这样,我注销后或者是不变都没有影响到postfix提供服务)
virtual_alias_maps = mysql:/etc/postfix/mysql/mysql_virtual_alias_maps.cf
#邮件账号的uid, 使用apache的运行用户
virtual_uid_maps = static:1001
virtual_gid_maps = static:1001
#virtual_uid_maps = mysql:/etc/postfix/mysql/mysql-virtual_uid_maps.cf
#virtual_gid_maps = mysql:/etc/postfix/mysql/mysql-virtual_gid_maps.cf
# use this for virtual delivery(如果没有安装maildrop,则此处为virtual)
#virtual_transport = virtual
#use this for maildrop-delivery (如果有maildrop,则此处为maildrop)
virtual_transport = maildrop
#Maildrop-Options for usage with maildrop
maildrop_destination_recipient_limit = 1
maildrop_destination_concurrency_limit = 1

#/var/mailbox/最后的"/"字符不能省略
#所有的MySQL查询配置文件统一存放在/etc/postfix/mysql中

#====================QUOTA========================
#每封信的最大大小(10M),postfix的默认值是10M, 但这指的是邮件正文和编码后附件的总和, 经过#base64编码,附件的大小会增加35%左右, 因此这里设定可接受邮件的大小为14M 
message_size_limit = 14336000
#邮箱的默认大小(10M) 
virtual_mailbox_limit = 20971520
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
#指定postfix如何获得用户的quota信息(每个用户的邮箱大小)
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql/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

#====================SASL======================== 
broken_sasl_auth_clients = yes
#In order to allow mail relaying by authenticated clients
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"

Go to top.

建立/var/mailbox并设置权限
# mkdir /var/mailbox 
# chown -R vmail:vmail /var/mailbox
# chmod -R ug+rwx,o-rwx /var/mailbox

建立/etc/postfix/mysql文件夹和MySQL查询配置文件
# mkdir /etc/postfix/mysql
1、vi /etc/postfix/mysql/mysql_virtual_alias_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = alias
select_field = goto
where_field = address

2、vi /etc/postfix/mysql/mysql_virtual_domains_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = domain
select_field = description
where_field = domain
#additional_conditions = and backupmx = '0' and active = '1'

3、vi /etc/postfix/mysql/mysql_virtual_mailbox_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = maildir
where_field = username
#additional_conditions = and active = '1'

4、vi /etc/postfix/mysql/mysql_virtual_mailbox_limit_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = quota
where_field = username
#additional_conditions = and active = '1'

Go to top.

配置 /usr/local/lib/sasl2/smtpd.conf
# vi /usr/local/lib/sasl2/smtpd.conf
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: plain login
sql_engine: mysql
sql_hostnames: localhost
sql_user: postfix
sql_passwd: postfix
sql_database: postfix
sql_select: SELECT password FROM mailbox WHERE username='%u@%r' and domain='%r' and active='1'



 xmy 回复于:2005-09-24 21:03:15

一个是文件夹权限、另外一个是编译postfix的时候,是否支持mysql?


 scyzxp 回复于:2005-09-24 22:20:38

可以去http://www.toping.net专业的开源邮件技术论坛postfix版块看一下呢?


 佛光普照 回复于:2005-09-25 15:31:09

文件夹的属性是没有问题的,那么支持mysql的话也支持啊。可以通过postfixadmin管理postfix的。可以创建域,也可以创建邮箱。可以通过该创建的邮箱发送邮件,但是不能收取邮件因为他本来就没有文件夹保存。


 佛光普照 回复于:2005-09-25 15:32:38

引用:原帖由 "scyzxp"]可以去http://www.toping.net专业的开源邮件技术论坛postfix版块看一下呢?
 发表:


上去了,也加了POSTFIX的QQ群组,问过很多人都没有一个能够找到真正的原因。我一直装了就查看postfix的maillog日志,没有出现过错误的提示。


 小虎牙 回复于:2005-09-26 08:03:17

贴上你的日志来看看!

virtual_transport = virtual启动这一项关闭virtual_transport = maildrop 再试试看?


 佛光普照 回复于:2005-09-26 10:02:40

引用:原帖由 "小虎牙" 发表:
贴上你的日志来看看!

virtual_transport = virtual启动这一项关闭virtual_transport = maildrop 再试试看?


我试过了不行,我启动了virtual_transport=virtual
重启postfix后创建一个域,还是不行。我在postfixadmin目录下面创建了一个文件index.php
内容是
<?php mkdir ("/var/mailbox/test.com", 0700);?>;
运行后可以在/var/mailbox下建立了test.com这个目录;
他的用户和组都是apache用户vmail;
现在我把日志也写进来:
Sep 21 20:51:56 PostFix sendmail[1729]: alias database /etc/aliases rebuilt by root
Sep 21 20:51:56 PostFix sendmail[1729]: /etc/aliases: 63 aliases, longest 10 bytes, 625 bytes total
Sep 21 20:51:57 PostFix sendmail[1742]: starting daemon (8.12.8): SMTP+queueing@01:00:00
Sep 21 20:51:57 PostFix sm-msp-queue[1751]: starting daemon (8.12.8): queueing@01:00:00
Sep 21 20:58:14 PostFix sendmail[1714]: alias database /etc/aliases rebuilt by root
Sep 21 20:58:14 PostFix sendmail[1714]: /etc/aliases: 63 aliases, longest 10 bytes, 625 bytes total
Sep 21 20:58:15 PostFix sendmail[1727]: starting daemon (8.12.8): SMTP+queueing@01:00:00
Sep 21 20:58:15 PostFix sm-msp-queue[1736]: starting daemon (8.12.8): queueing@01:00:00
Sep 22 04:02:08 PostFix sendmail[11271]: j8M828L4011271: from=root, size=1269, class=0, nrcpts=1, msgid=<200509220802.j8M828L4011271@localhost.localdomain>;, relay=root@localhost
Sep 22 04:02:09 PostFix sendmail[11274]: j8M829ee011274: from=<root@localhost.localdomain>;, size=1575, class=0, nrcpts=1, msgid=<200509220802.j8M828L4011271@localhost.localdomain>;, proto=ESMTP, daemon=MTA, relay=PostFix [127.0.0.1]
Sep 22 04:02:09 PostFix sendmail[11271]: j8M828L4011271: to=root, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30040, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (j8M829ee011274 Message accepted for delivery)
Sep 22 04:02:10 PostFix sendmail[11275]: j8M829ee011274: to=<root@localhost.localdomain>;, ctladdr=<root@localhost.localdomain>; (0/0), delay=00:00:01, xdelay=00:00:01, mailer=local, pri=31798, dsn=2.0.0, stat=Sent
Sep 23 04:02:09 PostFix sendmail[22201]: j8N829US022201: from=root, size=622, class=0, nrcpts=1, msgid=<200509230802.j8N829US022201@localhost.localdomain>;, relay=root@localhost
Sep 23 04:02:09 PostFix sendmail[22204]: j8N829ee022204: from=<root@localhost.localdomain>;, size=928, class=0, nrcpts=1, msgid=<200509230802.j8N829US022201@localhost.localdomain>;, proto=ESMTP, daemon=MTA, relay=PostFix [127.0.0.1]
Sep 23 04:02:10 PostFix sendmail[22201]: j8N829US022201: to=root, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30040, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (j8N829ee022204 Message accepted for delivery)
Sep 23 04:02:10 PostFix sendmail[22205]: j8N829ee022204: to=<root@localhost.localdomain>;, ctladdr=<root@localhost.localdomain>; (0/0), delay=00:00:01, xdelay=00:00:00, mailer=local, pri=31151, dsn=2.0.0, stat=Sent
Sep 23 15:16:04 PostFix postfix[21156]: warning: My hostname PostFix is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf
Sep 23 15:26:39 PostFix postfix[21180]: warning: My hostname PostFix is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf
Sep 23 15:26:39 PostFix postfix/master[21181]: warning: My hostname PostFix is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf
Sep 23 15:26:40 PostFix postfix/postsuper[21199]: warning: My hostname PostFix is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf
Sep 23 15:26:41 PostFix postfix/postfix-script: warning: My hostname PostFix is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf
Sep 23 15:26:41 PostFix postfix/postfix-script: starting the Postfix mail system
Sep 23 15:26:41 PostFix postfix/master[21225]: warning: My hostname PostFix is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf
Sep 23 15:26:41 PostFix postfix/master[21225]: daemon started -- version 2.2.3, configuration /etc/postfix
Sep 23 15:26:41 PostFix postfix/pickup[21226]: warning: My hostname PostFix is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf
Sep 23 15:26:41 PostFix postfix/qmgr[21227]: warning: My hostname PostFix is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf
Sep 23 15:27:28 PostFix postfix/smtpd[21230]: warning: My hostname PostFix is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf
Sep 23 15:27:28 PostFix postfix/proxymap[21231]: warning: My hostname PostFix is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf
Sep 23 15:27:28 PostFix postfix/smtpd[21230]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 23 15:27:28 PostFix postfix/smtpd[21230]: connect from unknown[192.168.3.185]
Sep 23 15:27:32 PostFix postfix/smtpd[21230]: disconnect from unknown[192.168.3.185]
Sep 23 15:51:30 PostFix postfix[21278]: warning: My hostname PostFix is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf
Sep 23 15:51:30 PostFix postfix/master[21279]: warning: My hostname PostFix is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf
Sep 23 15:51:30 PostFix postfix/postfix-script: warning: My hostname PostFix is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf
Sep 23 15:51:30 PostFix postfix/postfix-script: stopping the Postfix mail system
Sep 23 15:51:30 PostFix postfix/master[21225]: terminating on signal 15
Sep 23 16:04:45 PostFix postfix/postfix-script: starting the Postfix mail system
Sep 23 16:04:45 PostFix postfix/master[21413]: daemon started -- version 2.2.3, configuration /etc/postfix
Sep 23 17:19:27 PostFix postfix/postfix-script: refreshing the Postfix mail system
Sep 23 17:19:27 PostFix postfix/master[21413]: reload configuration /etc/postfix
Sep 23 17:19:33 PostFix postfix/postfix-script: stopping the Postfix mail system
Sep 23 17:19:33 PostFix postfix/master[21413]: terminating on signal 15
Sep 23 17:19:38 PostFix postfix/postfix-script: starting the Postfix mail system
Sep 23 17:19:38 PostFix postfix/master[21481]: daemon started -- version 2.2.3, configuration /etc/postfix
Sep 23 17:27:14 PostFix postfix/postfix-script: fatal: usage: postfix start (or stop, reload, abort, flush, check, set-permissions, upgrade-configuration)
Sep 23 17:27:47 PostFix postfix/postfix-script: stopping the Postfix mail system
Sep 23 17:27:47 PostFix postfix/master[21481]: terminating on signal 15
Sep 23 17:27:50 PostFix postfix/postfix-script: fatal: usage: postfix start (or stop, reload, abort, flush, check, set-permissions, upgrade-configuration)
Sep 23 17:27:53 PostFix postfix/postfix-script: starting the Postfix mail system
Sep 23 17:27:53 PostFix postfix/master[21600]: daemon started -- version 2.2.3, configuration /etc/postfix
Sep 23 17:33:42 PostFix postfix/postfix-script: stopping the Postfix mail system
Sep 23 17:33:42 PostFix postfix/master[21600]: terminating on signal 15
Sep 23 17:33:48 PostFix postfix/postfix-script: starting the Postfix mail system
Sep 23 17:33:48 PostFix postfix/master[21702]: daemon started -- version 2.2.3, configuration /etc/postfix
Sep 23 17:34:04 PostFix postfix/smtpd[21706]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 23 17:34:04 PostFix postfix/smtpd[21706]: warning: SASL authentication failure: OTP: auxprop backend can't store properties
Sep 23 17:34:04 PostFix postfix/smtpd[21706]: connect from unknown[192.168.3.185]
Sep 23 17:34:07 PostFix postfix/smtpd[21706]: disconnect from unknown[192.168.3.185]
Sep 23 17:36:47 PostFix postfix/postfix-script: stopping the Postfix mail system
Sep 23 17:36:47 PostFix postfix/master[21702]: terminating on signal 15
Sep 23 17:36:58 PostFix postfix/postfix-script: starting the Postfix mail system
Sep 23 17:36:58 PostFix postfix/master[21802]: daemon started -- version 2.2.3, configuration /etc/postfix
Sep 23 17:37:40 PostFix postfix/smtpd[21806]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 23 17:37:40 PostFix postfix/smtpd[21806]: connect from unknown[192.168.3.185]
Sep 23 17:37:43 PostFix postfix/smtpd[21806]: disconnect from unknown[192.168.3.185]
Sep 23 17:37:49 PostFix postfix/smtpd[21806]: connect from unknown[192.168.3.185]
Sep 23 17:38:08 PostFix postfix/smtpd[21806]: disconnect from unknown[192.168.3.185]
Sep 23 17:38:42 PostFix postfix/smtpd[21806]: connect from unknown[192.168.3.185]
Sep 23 17:39:28 PostFix postfix/smtpd[21806]: disconnect from unknown[192.168.3.185]
Sep 23 17:39:40 PostFix postfix/smtpd[21806]: connect from unknown[192.168.3.185]
Sep 23 17:39:47 PostFix postfix/smtpd[21806]: disconnect from unknown[192.168.3.185]
Sep 23 17:40:43 PostFix postfix/smtpd[21806]: connect from PostFix[127.0.0.1]
Sep 23 17:44:15 PostFix postfix/smtpd[21806]: disconnect from PostFix[127.0.0.1]
Sep 23 17:47:35 PostFix postfix/anvil[21808]: statistics: max connection rate 2/60s for (smtp:192.168.3.185) at Sep 23 17:37:49
Sep 23 17:47:35 PostFix postfix/anvil[21808]: statistics: max connection count 1 for (smtp:192.168.3.185) at Sep 23 17:37:40
Sep 23 17:47:35 PostFix postfix/anvil[21808]: statistics: max cache size 1 at Sep 23 17:37:40
Sep 23 19:43:00 PostFix postfix/smtpd[21818]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 23 19:43:00 PostFix postfix/smtpd[21818]: connect from PostFix[127.0.0.1]
Sep 23 19:43:32 PostFix postfix/smtpd[21818]: disconnect from PostFix[127.0.0.1]
Sep 23 19:48:03 PostFix postfix/smtpd[21893]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 23 19:48:03 PostFix postfix/smtpd[21893]: connect from PostFix[127.0.0.1]
Sep 23 19:48:03 PostFix postfix/smtpd[21893]: B1B6D86144: client=PostFix[127.0.0.1]
Sep 23 19:48:03 PostFix postfix/cleanup[21898]: B1B6D86144: message-id=<20050923234803.B1B6D86144@www.test.com>;
Sep 23 19:48:03 PostFix postfix/qmgr[21804]: B1B6D86144: from=<postmaster@change-this-to-your.domain.tld>;, size=498, nrcpt=1 (queue active)
Sep 23 19:48:03 PostFix postfix/smtpd[21893]: disconnect from PostFix[127.0.0.1]
Sep 23 19:48:04 PostFix pipe[21901]: fatal: pipe_comand: execvp /usr/local/bin/maildrop: No such file or directory
Sep 23 19:48:05 PostFix postfix/pipe[21900]: B1B6D86144: to=<test@test.com>;, relay=maildrop, delay=2, status=bounced (Command died with status 1: "/usr/local/bin/maildrop")
Sep 23 19:48:05 PostFix postfix/cleanup[21898]: 3318886149: message-id=<20050923234805.3318886149@www.test.com>;
Sep 23 19:48:05 PostFix postfix/qmgr[21804]: 3318886149: from=<>;, size=2252, nrcpt=1 (queue active)
Sep 23 19:48:05 PostFix postfix/qmgr[21804]: B1B6D86144: removed
Sep 23 19:48:15 PostFix postfix/smtp[21903]: 3318886149: to=<postmaster@change-this-to-your.domain.tld>;, relay=none, delay=10, status=bounced (Host or domain name not found. Name service error for name=change-this-to-your.domain.tld type=A: Host not found)
Sep 23 19:48:15 PostFix postfix/qmgr[21804]: 3318886149: removed
Sep 24 04:02:08 PostFix postfix/pickup[29622]: D254F86120: uid=0 from=<root>;
Sep 24 04:02:10 PostFix postfix/cleanup[29857]: D254F86120: message-id=<20050924080208.D254F86120@www.test.com>;
Sep 24 04:02:10 PostFix postfix/qmgr[21804]: D254F86120: from=<root@test.com>;, size=1366, nrcpt=1 (queue active)
Sep 24 04:02:10 PostFix pipe[29886]: fatal: pipe_comand: execvp /usr/local/bin/maildrop: No such file or directory
Sep 24 04:02:11 PostFix postfix/pipe[29885]: D254F86120: to=<root@test.com>;, orig_to=<root>;, relay=maildrop, delay=3, status=bounced (Command died with status 1: "/usr/local/bin/maildrop")
Sep 24 04:02:11 PostFix postfix/cleanup[29857]: C5FE486148: message-id=<20050924080211.C5FE486148@www.test.com>;
Sep 24 04:02:11 PostFix postfix/qmgr[21804]: C5FE486148: from=<>;, size=3060, nrcpt=1 (queue active)
Sep 24 04:02:11 PostFix pipe[29907]: fatal: pipe_comand: execvp /usr/local/bin/maildrop: No such file or directory
Sep 24 04:02:11 PostFix postfix/qmgr[21804]: D254F86120: removed
Sep 24 04:02:13 PostFix postfix/pipe[29885]: C5FE486148: to=<root@test.com>;, relay=maildrop, delay=2, status=bounced (Command died with status 1: "/usr/local/bin/maildrop")
Sep 24 04:02:13 PostFix postfix/qmgr[21804]: C5FE486148: removed
Sep 24 08:41:51 PostFix authdaemond: modules="authuserdb authpam authldap authmysql authcustom authpipe", daemons=5
Sep 24 08:41:51 PostFix authdaemond: Installing libauthuserdb
Sep 24 08:41:51 PostFix authdaemond: Installation complete: authuserdb
Sep 24 08:41:51 PostFix authdaemond: Installing libauthpam


 佛光普照 回复于:2005-09-26 10:05:16

Sep 24 08:41:51 PostFix authdaemond: Installation complete: authuserdb
Sep 24 08:41:51 PostFix authdaemond: Installing libauthpam
Sep 24 08:41:51 PostFix authdaemond: Installation complete: authpam
Sep 24 08:41:51 PostFix authdaemond: Installing libauthldap
Sep 24 08:41:51 PostFix authdaemond: Installation complete: authldap
Sep 24 08:41:51 PostFix authdaemond: Installing libauthmysql
Sep 24 08:41:51 PostFix authdaemond: Installation complete: authmysql
Sep 24 08:41:51 PostFix authdaemond: Installing libauthcustom
Sep 24 08:41:51 PostFix authdaemond: Installation complete: authcustom
Sep 24 08:41:51 PostFix authdaemond: Installing libauthpipe
Sep 24 08:41:51 PostFix authdaemond: Installation complete: authpipe
Sep 24 08:46:49 PostFix authdaemond: modules="authuserdb authpam authldap authmysql authcustom authpipe", daemons=5
Sep 24 08:46:50 PostFix authdaemond: Installing libauthuserdb
Sep 24 08:46:50 PostFix authdaemond: Installation complete: authuserdb
Sep 24 08:46:50 PostFix authdaemond: Installing libauthpam
Sep 24 08:46:50 PostFix authdaemond: Installation complete: authpam
Sep 24 08:46:50 PostFix authdaemond: Installing libauthldap
Sep 24 08:46:50 PostFix authdaemond: Installation complete: authldap
Sep 24 08:46:51 PostFix authdaemond: Installing libauthmysql
Sep 24 08:46:51 PostFix authdaemond: Installation complete: authmysql
Sep 24 08:46:51 PostFix authdaemond: Installing libauthcustom
Sep 24 08:46:51 PostFix authdaemond: Installation complete: authcustom
Sep 24 08:46:51 PostFix authdaemond: Installing libauthpipe
Sep 24 08:46:51 PostFix authdaemond: Installation complete: authpipe
Sep 24 12:07:17 PostFix postfix/postfix-script: fatal: the Postfix mail system is not running
Sep 24 12:07:27 PostFix postfix/postfix-script: starting the Postfix mail system
Sep 24 12:07:27 PostFix postfix/master[1950]: daemon started -- version 2.2.3, configuration /etc/postfix
Sep 24 14:31:09 PostFix pop3d: Connection, ip=[::ffff:127.0.0.1]
Sep 24 14:31:28 PostFix pop3d: LOGOUT, ip=[::ffff:127.0.0.1]
Sep 24 14:31:28 PostFix pop3d: Disconnected, ip=[::ffff:127.0.0.1]
Sep 24 14:31:30 PostFix pop3d: Connection, ip=[::ffff:127.0.0.1]
Sep 24 14:32:37 PostFix authdaemond: ldap_simple_bind_s failed: Can't contact LDAP server
Sep 24 14:32:37 PostFix pop3d: LOGIN FAILED, user=test@test.com, ip=[::ffff:127.0.0.1]
Sep 24 14:32:37 PostFix pop3d: authentication error: Input/output error
Sep 24 14:32:41 PostFix pop3d: Connection, ip=[::ffff:127.0.0.1]
Sep 24 14:32:52 PostFix authdaemond: ldap_simple_bind_s failed: Can't contact LDAP server
Sep 24 14:32:52 PostFix pop3d: LOGIN FAILED, user=test@test.com, ip=[::ffff:127.0.0.1]
Sep 24 14:32:52 PostFix pop3d: authentication error: Input/output error
Sep 24 17:57:09 PostFix postfix/postfix-script: fatal: usage: postfix start (or stop, reload, abort, flush, check, set-permis
sions, upgrade-configuration)
Sep 24 17:57:13 PostFix postfix/postfix-script: fatal: the Postfix mail system is already running
Sep 24 17:57:18 PostFix postfix/postfix-script: stopping the Postfix mail system
Sep 24 17:57:18 PostFix postfix/master[1950]: terminating on signal 15
Sep 24 17:57:21 PostFix postfix/postfix-script: starting the Postfix mail system
Sep 24 17:57:21 PostFix postfix/master[19221]: daemon started -- version 2.2.3, configuration /etc/postfix
Sep 24 17:57:43 PostFix postfix/smtpd[19238]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 24 17:57:43 PostFix postfix/smtpd[19238]: connect from PostFix[127.0.0.1]
Sep 24 17:57:44 PostFix postfix/smtpd[19238]: 0C26F8611F: client=PostFix[127.0.0.1]
Sep 24 17:57:44 PostFix postfix/cleanup[19243]: 0C26F8611F: message-id=<20050924215743.0C26F8611F@www.test.com>;
Sep 24 17:57:44 PostFix postfix/qmgr[19223]: 0C26F8611F: from=<admin@test.com>;, size=473, nrcpt=1 (queue active)
Sep 24 17:57:44 PostFix postfix/smtpd[19238]: disconnect from PostFix[127.0.0.1]
Sep 24 17:57:44 PostFix pipe[19246]: fatal: pipe_comand: execvp /usr/local/bin/maildrop: No such file or directory
Sep 24 17:57:45 PostFix postfix/pipe[19245]: 0C26F8611F: to=<test1@test.com>;, relay=maildrop, delay=2, status=bounced (Comman
d died with status 1: "/usr/local/bin/maildrop")
Sep 24 17:57:45 PostFix postfix/cleanup[19243]: 643FB86148: message-id=<20050924215745.643FB86148@www.test.com>;
Sep 24 17:57:45 PostFix postfix/qmgr[19223]: 643FB86148: from=<>;, size=2175, nrcpt=1 (queue active)
Sep 24 17:57:45 PostFix postfix/qmgr[19223]: 0C26F8611F: removed
Sep 24 17:57:45 PostFix pipe[19248]: fatal: pipe_comand: execvp /usr/local/bin/maildrop: No such file or directory
Sep 24 17:57:46 PostFix postfix/pipe[19245]: 643FB86148: to=<admin@test.com>;, relay=maildrop, delay=1, status=bounced (Comman
d died with status 1: "/usr/local/bin/maildrop")
Sep 24 17:57:46 PostFix postfix/qmgr[19223]: 643FB86148: removed
Sep 24 17:57:57 PostFix postfix/smtpd[19238]: connect from PostFix[127.0.0.1]
Sep 24 17:57:57 PostFix postfix/smtpd[19238]: 160E78611F: client=PostFix[127.0.0.1]
Sep 24 17:57:57 PostFix postfix/cleanup[19243]: 160E78611F: message-id=<20050924215757.160E78611F@www.test.com>;
Sep 24 17:57:57 PostFix postfix/qmgr[19223]: 160E78611F: from=<admin@test.com>;, size=471, nrcpt=1 (queue active)
Sep 24 17:57:57 PostFix postfix/smtpd[19238]: disconnect from PostFix[127.0.0.1]
Sep 24 17:57:57 PostFix pipe[19249]: fatal: pipe_comand: execvp /usr/local/bin/maildrop: No such file or directory
Sep 24 17:57:58 PostFix postfix/pipe[19245]: 160E78611F: to=<test@test.com>;, relay=maildrop, delay=1, status=bounced (Command
 died with status 1: "/usr/local/bin/maildrop")
Sep 24 17:57:58 PostFix postfix/cleanup[19243]: 344DB86148: message-id=<20050924215758.344DB86148@www.test.com>;
Sep 24 17:57:58 PostFix postfix/qmgr[19223]: 344DB86148: from=<>;, size=2171, nrcpt=1 (queue active)
Sep 24 17:57:58 PostFix postfix/qmgr[19223]: 160E78611F: removed
Sep 24 17:57:58 PostFix pipe[19250]: fatal: pipe_comand: execvp /usr/local/bin/maildrop: No such file or directory
Sep 24 17:57:59 PostFix postfix/pipe[19245]: 344DB86148: to=<admin@test.com>;, relay=maildrop, delay=1, status=bounced (Comman
d died with status 1: "/usr/local/bin/maildrop")
Sep 24 17:57:59 PostFix postfix/qmgr[19223]: 344DB86148: removed
Sep 24 17:59:07 PostFix postfix/smtpd[19238]: connect from PostFix[127.0.0.1]
Sep 24 17:59:07 PostFix postfix/smtpd[19238]: 04B5B8611F: client=PostFix[127.0.0.1]
Sep 24 17:59:07 PostFix postfix/cleanup[19243]: 04B5B8611F: message-id=<20050924215907.04B5B8611F@www.test.com>;
Sep 24 17:59:07 PostFix postfix/qmgr[19223]: 04B5B8611F: from=<admin@test.com>;, size=487, nrcpt=1 (queue active)
Sep 24 17:59:07 PostFix postfix/smtpd[19238]: disconnect from PostFix[127.0.0.1]
Sep 24 17:59:07 PostFix postfix/smtp[19255]: 04B5B8611F: to=<haigen.luo@kenfor.com>;, relay=kenfor.com[211.139.218.153], delay
=0, status=sent (250 ok 1127598869 qp 15190)
Sep 24 17:59:07 PostFix postfix/qmgr[19223]: 04B5B8611F: removed
Sep 25 04:02:09 PostFix postfix/pickup[19446]: 61E7386120: uid=0 from=<root>;
Sep 25 04:02:09 PostFix postfix/cleanup[19681]: 61E7386120: message-id=<20050925080209.61E7386120@www.test.com>;
Sep 25 04:02:09 PostFix postfix/qmgr[19223]: 61E7386120: from=<root@test.com>;, size=1063, nrcpt=1 (queue active)
Sep 25 04:02:10 PostFix pipe[19693]: fatal: pipe_comand: execvp /usr/local/bin/maildrop: No such file or directory


 小虎牙 回复于:2005-09-26 11:49:44

fatal: pipe_comand: execvp /usr/local/bin/maildrop: No such file or directory???????


 佛光普照 回复于:2005-09-26 17:47:12

引用:原帖由 "小虎牙"]fatal: pipe_comand: execvp /usr/local/bin/maildrop: No such file or directory???????
 发表:


哦,那是还没有装 maildrop-1.8.0的原故,请问这个与我上面所说的不能创建目录有关系吗,或者是有直接的连系。
我安装maildrop-1.8.0后再试一试。我想应该不关这个问题的事。
我查看了很我多,要建立Maildir只需要在两处设定就行,一个是:
main.cf中的:home_mailbox = Maildir/
和main.cf虑拟邮箱目录设定下的
virtual_mailbox_base = /var/mailbox/
就可以了吧,而且我安装的是courier-imap应该支持Maildir格式的!


 小虎牙 回复于:2005-09-26 17:54:10

virtual_transport = maildrop (你的maildrop都没有安装请问你是如何去应用这个的?)


 hzqbbc 回复于:2005-09-27 07:25:51

引用:原帖由 "佛光普照" 发表:

哦,那是还没有装 maildrop-1.8.0的原故,请问这个与我上面所说的不能创建目录有关系吗,或者是有直接的连系。
我安装maildrop-1.8.0后再试一试。我想应该不关这个问题的事。
我查看了很我多,要建立Maildir只需?.........



要建立用户的maildir,在不太熟悉的情况下,如果不设置transport_maps,那么就最好使用virtual作为你的virtual_transport ,因为virtual是目前为止唯一能自动建立用户maildir的投递程序。

maildrop也不能自动建立,除非依靠第三方工具(maildirmaker?)或者打补丁。

楼主可以实验一下将virtual_transport 改回virtual,应该是可以的。因为看你的日志中,pipe呼叫maildrop没成功,因为master.cf里配置的maildrop路径/usr/local/bin/maildrop不存在。

为了简便,先试验一下用virtual吧,一定会可以的。


 佛光普照 回复于:2005-09-27 09:00:45

引用:原帖由 "hzqbbc" 发表:


要建立用户的maildir,在不太熟悉的情况下,如果不设置transport_maps,那么就最好使用virtual作为你的virtual_transport ,因为virtual是目前为止唯一能自动建立用户maildir的投递程序。

maildrop也不能自动?.........


我的main.cf配置文件中有三个相关配置:
home_mailbox = Maildir/
mailbox_transport = maildrop
virtual_transport = maildrop按照楼方的方法,需要把
virtual_transport = maildrop修改成virtual_transport = virtual
能后通过postfixadmin来管理创建域,我测试的结果同样是无法自动创建该域和
域下的邮件用户名文件夹。是不是需要把mailbox_transport=maildrop也必须改成mailbox_transport=virtual呢,我试过了也是不行的,是不是需要安装第三方的插件才能让他自动的创建邮箱域目录和邮件目录呢?

通过进一步了解我了解了maildrop是不可能自动创建目录的,能后我把上面的恢复到初始的配置,并手动的去用脚本实现,实现的情况如下:
# vi /etc/sudoers 
vmail ALL = NOPASSWD: /usr/sbin/maildirmake.sh , /usr/sbin/maildirdel.sh

新建/usr/sbin/maildirmake.sh文件
# vi /usr/sbin/maildirmake.sh 
#!/bin/bash
set -e
if [ -d /var/mailbox/$1 ]
then :
else
  mkdir /var/mailbox/$1>;&2
fi
chown -R vmail:vmail /var/mailbox/$1
echo $2
cd "/var/mailbox/$1"
/usr/local/imap/bin/maildirmake $2
chown -R 1001:12345 /var/mailbox/$1/$2
chmod -R g=s /var/mailbox/$1/$2

新建/usr/sbin/maildirdel.sh文件
# vi /usr/sbin/maildirmake.sh 
#!/bin/bash
rm -rf /var/mailbox/$1/$2

# chmod 755 /usr/sbin/maildirmake.sh
# chmod 755 /usr/sbin/maildirdel.sh

更改postfixadmin目录及postfixadmin/admin目录下的create-mailbox.php文件及在admin/create-domain.php文件
在这三个文件的$fDomain = escape_string ($_POST['fDomain']);行后加一行:
# vi /var/www/postfixadmin/admin/create-mailbox.php (vi /var/www/postfixadmin/create-mailbox.php) 
system("sudo /usr/sbin/maildirmake.sh $fDomain ".$_POST['fUsername']);

更改postfixadmin目录及postfixadmin/admin目录下的delete.php文件
在这两个文件的$result = db_query ("SELECT * FROM mailbox WHERE username='$fDelete' AND domain='$fDomain'");行后加几行:
# vi /var/www/postfixadmin/admin/delete.php (vi /var/www/postfixadmin/delete.php) 
$userarray=explode("@",$fDelete);
$user=$userarray[0];
$domain=$userarray[1];
system("sudo /usr/sbin/maildirdel.sh $domain $user");

完成了手动用脚本添加到postfixadmin中去,然后用postfixadmin管理域和邮箱帐号;创建后能在/var/mailbox/下面创建域和邮箱了。如
/var/mailbox/test.com/test
后通查看该目录自动生成了有三个目录分别为:cur new tmp
但是暂时没有内容:我试着发送邮件发到外面的邮件可以正常日志为:
Sep 27 09:02:43 PostFix postfix/smtpd[11897]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 27 09:02:43 PostFix postfix/smtpd[11897]: connect from PostFix[127.0.0.1]
Sep 27 09:02:43 PostFix postfix/smtpd[11897]: E405986120: client=PostFix[127.0.0.1]
Sep 27 09:02:43 PostFix postfix/cleanup[11902]: E405986120: message-id=<20050927130243.E405986120@www.test.com>;
Sep 27 09:02:43 PostFix postfix/qmgr[11808]: E405986120: from=<admin@feifei.com>;, size=489, nrcpt=1 (queue active)
Sep 27 09:02:44 PostFix postfix/smtpd[11897]: disconnect from PostFix[127.0.0.1]
Sep 27 09:02:44 PostFix postfix/smtp[11904]: E405986120: to=<haigen.luo@kenfor.com>;, relay=kenfor.com[211.139.218.153], delay=1, status=sent (250 ok 1127825884 qp 3815)
Sep 27 09:02:44 PostFix postfix/qmgr[11808]: E405986120: removed

我再创建一个邮箱test2@test.com然后向test@test.com发送邮件却不行日志提示如下:
Sep 27 09:04:33 PostFix postfix/smtpd[11907]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 27 09:04:34 PostFix postfix/smtpd[11907]: connect from PostFix[127.0.0.1]
Sep 27 09:04:34 PostFix postfix/smtpd[11907]: 2174586120: client=PostFix[127.0.0.1]
Sep 27 09:04:34 PostFix postfix/cleanup[11910]: 2174586120: message-id=<20050927130434.2174586120@www.test.com>;
Sep 27 09:04:34 PostFix postfix/qmgr[11808]: 2174586120: from=<admin@feifei.com>;, size=473, nrcpt=1 (queue active)
Sep 27 09:04:34 PostFix postfix/smtpd[11907]: disconnect from PostFix[127.0.0.1]
Sep 27 09:04:34 PostFix postfix/virtual[11912]: 2174586120: to=<test@test.com>;, relay=virtual, delay=0, status=sent (delivered to maildir)
Sep 27 09:04:34 PostFix postfix/qmgr[11808]: 2174586120: removed
查看test.com/test/new目录下,没有任何的邮件?这是为什么呢?


 xmy 回复于:2005-09-27 09:10:20

postfixadmin不能生成用户目录也许是和postfix支持mysql有关,我用rpm安装的时候,如果postfix支持mysql的rpm包没有安装,就会出现这种情况。


 channel5 回复于:2005-09-27 10:14:12

virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql_virtual_domains_maps.cf 

这个是怎么回事? 

另外, 你往mysql里加用户了吗?

还有, 你的日志文件里显示: myhostname不对, 这个改过来了吗?


 佛光普照 回复于:2005-09-27 14:18:50

引用:原帖由 "channel5" 发表:
virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql_virtual_domains_maps.cf 

这个是怎么回事? 

另外, 你往mysql里加用户了吗?

还有, 你的日志文件里显示: myhostname不对, 这个改过来了吗?.........


楼主说的那个是域的身份验证;
mysql_virtual_domains_maps.cf 是通过一个帐号来验证在MYSQL数据库中是否存在该域名,再去决定验证用户的邮件帐号。
也就是MYSQL中用户是肯定有的。只是无法通过验证了。
在发送给外域则可以成功:
Sep 27 14:19:40 PostFix postfix/smtpd[12410]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 27 14:19:40 PostFix postfix/smtpd[12410]: connect from PostFix[127.0.0.1]
Sep 27 14:19:40 PostFix postfix/smtpd[12410]: 86DB186120: client=PostFix[127.0.0.1]
Sep 27 14:19:40 PostFix postfix/cleanup[12415]: 86DB186120: message-id=<20050927181940.86DB186120@www.test.com>;
Sep 27 14:19:40 PostFix postfix/qmgr[12175]: 86DB186120: from=<admin@feifei.com>;, size=489, nrcpt=1 (queue active)
Sep 27 14:19:40 PostFix postfix/smtpd[12410]: disconnect from PostFix[127.0.0.1]
Sep 27 14:19:41 PostFix postfix/smtp[12417]: 86DB186120: to=<haigen.luo@kenfor.com>;, relay=kenfor.com[211.139.218.153], delay=1, status=sent (250 ok 1127844901 qp 8097)
Sep 27 14:19:41 PostFix postfix/qmgr[12175]: 86DB186120: removed

发给本地的域名test.com却产生错误如下:
Sep 27 14:21:40 PostFix postfix/smtpd[12418]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 27 14:21:40 PostFix postfix/smtpd[12418]: connect from PostFix[127.0.0.1]
Sep 27 14:21:40 PostFix postfix/smtpd[12418]: 8550A86120: client=PostFix[127.0.0.1]
Sep 27 14:21:40 PostFix postfix/cleanup[12421]: 8550A86120: message-id=<20050927182140.8550A86120@www.test.com>;
Sep 27 14:21:40 PostFix postfix/qmgr[12175]: 8550A86120: from=<admin@feifei.com>;, size=473, nrcpt=1 (queue active)
Sep 27 14:21:40 PostFix postfix/smtpd[12418]: disconnect from PostFix[127.0.0.1]
Sep 27 14:21:41 PostFix authdaemond: ldap_simple_bind_s failed: Can't contact LDAP server
Sep 27 14:21:41 PostFix postfix/pipe[12423]: 8550A86120: to=<test@test.com>;, relay=maildrop, delay=1, status=bounced (user unknown. Command output: Invalid user specified. )
Sep 27 14:21:41 PostFix postfix/cleanup[12421]: 254368614A: message-id=<20050927182141.254368614A@www.test.com>;
Sep 27 14:21:41 PostFix postfix/qmgr[12175]: 254368614A: from=<>;, size=2177, nrcpt=1 (queue active)
Sep 27 14:21:41 PostFix postfix/qmgr[12175]: 8550A86120: removed
Sep 27 14:21:41 PostFix authdaemond: ldap_simple_bind_s failed: Can't contact LDAP server
Sep 27 14:21:41 PostFix postfix/pipe[12423]: 254368614A: to=<admin@feifei.com>;, relay=maildrop, delay=0, status=bounced (user unknown. Command output: Invalid user specified. )
Sep 27 14:21:41 PostFix postfix/qmgr[12175]: 254368614A: removed


 channel5 回复于:2005-09-27 16:20:56

引用:原帖由 "佛光普照"]254368614A: removed
 发表:



对每一个用户都要找他的域? 你一个机器上有多少虚拟域名?

这个不一定错误, 但是绝对是个怪怪的东西。

另外, 你的日志文件显示你没有装ldap服务器。 或者没有
设置。 你应该检查一下这个。


 佛光普照 回复于:2005-09-27 16:50:09

引用:原帖由 "channel5" 发表:


对每一个用户都要找他的域? 你一个机器上有多少虚拟域名?

这个不一定错误, 但是绝对是个怪怪的东西。

另外, 你的日志文件显示你没有装ldap服务器。 或者没有
设置。 你应该检查一下这个。


哦,哈哈谢谢您的提醒,是我自己粗心大意搞错了authdaemond的认证方式,现在选择的是
authmodulelist="authmysql"
authmodulelistorig="authmysql"
上面出现的ldap的错误了,但是通过手动脚本创建的目录和邮箱目录去无法收到邮件日志提示是:
Sep 27 16:54:54 PostFix postfix/smtpd[23987]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 27 16:54:54 PostFix postfix/smtpd[23987]: connect from PostFix[127.0.0.1]
Sep 27 16:54:54 PostFix postfix/smtpd[23987]: A969E8614C: client=PostFix[127.0.0.1]
Sep 27 16:54:54 PostFix postfix/cleanup[23990]: A969E8614C: message-id=<20050927205454.A969E8614C@www.test.com>;
Sep 27 16:54:54 PostFix postfix/qmgr[12175]: A969E8614C: from=<admin@feifei.com>;, size=477, nrcpt=1 (queue active)
Sep 27 16:54:54 PostFix maildrop[23992]: Unable to open mailbox.
Sep 27 16:54:54 PostFix postfix/smtpd[23987]: disconnect from PostFix[127.0.0.1]
Sep 27 16:54:54 PostFix postfix/pipe[23976]: A969E8614C: to=<test@feifei.com>;, relay=maildrop, delay=0, status=deferred (temporary failure. Command output: /usr/bin/maildrop: Unable to open mailbox. )


 佛光普照 回复于:2005-09-27 17:29:50

我现在修改了authdaemond的认证方式之后可以正常的发送邮件了。但是却无法认证通过,是这样,在SMTP需要身份认证时不选也可以发送邮件!
我正在查找下一步的原因,欢迎遇到过的朋友一起分享你的成功经验!


 佛光普照 回复于:2005-09-29 16:06:18

搞了好久终于搞定了这个问题,安装后应该没有什么问题了。但是还有一个是SMTP身份验证的问题,通过FOXMAIL设置一个帐号,在邮件帐号的密码正确的情况下可以不需要SMTP身份验证都可以发送邮件;如果密码不正确则通过不了验证。我的验证方式是mysql身份验证的;还有就是在发件地址中可以采用不同的地址也同样可以发送邮件!
我采用是cyrus-sasl2.1.20
来验证的!


 佛光普照 回复于:2005-09-29 21:47:40

在安装amavisd-new-2.3.2版本的过程当中又遇到了很多的问题,最值得提出的是安装完一些perl的组件后调试amavisd debug出现错误中断,提示为:
Sep 29 21:13:59 PostFix /usr/local/sbin/amavisd[18017]: starting.  /usr/local/sbin/amavisd at PostFix amavisd-new-2.3.0 (20050424), Unicode aware, LANG=zh_CN.GB18030
Sep 29 21:13:59 PostFix /usr/local/sbin/amavisd[18017]: user=, EUID: 0 (0);  group=, EGID: 0 10 6 4 3 2 1 0 (0 10 6 4 3 2 1 0)
Sep 29 21:13:59 PostFix /usr/local/sbin/amavisd[18017]: Perl version               5.008
Sep 29 21:14:00 PostFix /usr/local/sbin/amavisd[18017]: INFO: no optional modules: Encode::Unicode::UTF7 unicore::PVA.pl Mail::SpamAssassin::SQLBasedAddrList DBD::mysql Sys::Hostname::Long Mail::SPF::Query Razor2::Client::Agent Net::CIDR::Lite
Sep 29 21:14:00 PostFix /usr/local/sbin/amavisd[18017]: Net::Server: 2005/09/29-21:14:00 Amavis (type Net::Server::PreForkSimple) starting! pid(18017)
Sep 29 21:14:00 PostFix /usr/local/sbin/amavisd[18017]: Net::Server: Binding to TCP port 10024 on host 127.0.0.1
Sep 29 21:14:00 PostFix /usr/local/sbin/amavisd[18017]: Net::Server: Setting gid to "54323 54323"
Sep 29 21:14:00 PostFix /usr/local/sbin/amavisd[18017]: Net::Server: 2005/09/29-21:14:00 Couldn't become gid "54323": \n\n  at line 486 in file /usr/lib/perl5/site_perl/5.8.0/Net/Server.pm
Sep 29 21:14:00 PostFix /usr/local/sbin/amavisd[18017]: Net::Server: 2005/09/29-21:14:00 Server closing!

经过多方查找原因,最有可能的是:
perl的版本与NET::SERVER版本之间存在问题,可以重新下载Net-Server的0.87版重新编译应该可以解决问题。 
cd /usr/local/src 
wget http://www.xmission.com/~jmcrc/Net-Server-0.87.tar.gz 
tar xzvf Net-Server-0.87.tar.gz 
cd Net-Server-0.87 
perl Makefile.PL 
make 
make install
我测试过我的错误提示没有了。可以再作进一步的调试了!


 佛光普照 回复于:2005-09-30 11:04:36

经过一些时间的努务终于有所小成啊,但是现在好像还有一些比较困难的问题存在。我的clamav运行后出现了错误提示:
#clamd status 
前台提示为:
LibClamAV Warning: ********************************************************
LibClamAV Warning: ***  This version of the ClamAV engine is outdated.  ***
LibClamAV Warning: *** DON'T PANIC! Read http://www.clamav.net/faq.html ***
LibClamAV Warning: ********************************************************
LibClamAV Warning: ********************************************************
LibClamAV Warning: ***  This version of the ClamAV engine is outdated.  ***
LibClamAV Warning: *** DON'T PANIC! Read http://www.clamav.net/faq.html ***
LibClamAV Warning: ********************************************************
提示是过期,但是目日志中提示的是:
+++ Started at Fri Sep 30 11:06:58 2005
clamd daemon 0.84 (OS: linux-gnu, ARCH: i386, CPU: i686)
Log file size limited to 1048576 bytes.
Verbose logging activated.
Running as user amavis (UID 12347, GID 54323)
Reading databases from /usr/local/share/clamav
Protecting against 40394 viruses.
ERROR: bind() error: Address already in use

关键是:ERROR: bind() error: Address already in use
我有看到过这样的错误提示,说是因为clamd的BUG,需要打补订才行。
我现在又找不到原来看过的网站,真是一下忘了记来的错啊,有没有哪位大哥看
到过此错误,解决方法是不是下载补订呢?


 anstan 回复于:2005-09-30 11:09:51

装个新版本应该能解决


 佛光普照 回复于:2005-09-30 17:09:29

我安装了一个clamav-0.87版本的,OK,可以解决此类问题了!呵呵谢谢!
我的安装还在继续进行!


 佛光普照 回复于:2005-10-14 14:31:10

时至今日大概安装成功了,安装了四次了。理顺了各软件之间的关系,有哪位遇了相关的问题可以在这里跟贴。结合大家的力量一起解决。


 佛光普照 回复于:2005-10-17 15:06:18

问题一:对postfix的管理有许多的优秀工具,包括邮件日志分析工具,访问工具;邮件发送和接收工具等。
具体的有:James S. Seymour用perl写了一个叫pflogsumm.pl的脚本,可以到这里下载:http://jimsun.linxnet.com/postfix_contrib.html
其对日志的分析结果:
Grand Totals
------------
messages

      6   received
      4   delivered
      0   forwarded
      4   deferred  (68  deferrals)
      8   bounced
      4   rejected (50%)
      0   reject warnings
      0   held
      0   discarded (0%)

  12442   bytes received
   8637   bytes delivered
      1   senders
      1   sending hosts/domains
      1   recipients
      1   recipient hosts/domains


Per-Day Traffic Summary
    date          received  delivered   deferred    bounced     rejected
    --------------------------------------------------------------------
    Oct 16 2005         0          0         38
    Oct 17 2005         6          4         30          8          4

Per-Hour Traffic Daily Average
    time          received  delivered   deferred    bounced     rejected
    --------------------------------------------------------------------
    0000-0100           0          0          1          0          0
    0100-0200           0          0          1          0          0
    0200-0300           0          0          1          0          0
    0300-0400           0          0          1          0          0
    0400-0500           1          0          6          0          0
    0500-0600           0          0          2          0          0
    0600-0700           0          0          3          0          0
    0700-0800           0          0          3          0          0
    0800-0900           2          2          2          4          2
    0900-1000           0          0          1          0          0
    1000-1100           0          0          1          0          0
    1100-1200           0          0          1          0          0
    1200-1300           0          0          1          0          0
    1300-1400           0          0          1          0          0
    1400-1500           0          0          0          0          0
[root@PostFix lhg]# cat result.txt   

Grand Totals
------------
messages

      6   received
      4   delivered
      0   forwarded
      4   deferred  (68  deferrals)
      8   bounced
      4   rejected (50%)
      0   reject warnings
      0   held
      0   discarded (0%)

  12442   bytes received
   8637   bytes delivered
      1   senders
      1   sending hosts/domains
      1   recipients
      1   recipient hosts/domains


Per-Day Traffic Summary
    date          received  delivered   deferred    bounced     rejected
    --------------------------------------------------------------------
    Oct 16 2005         0          0         38 
    Oct 17 2005         6          4         30          8          4 

Per-Hour Traffic Daily Average
    time          received  delivered   deferred    bounced     rejected
    --------------------------------------------------------------------
    0000-0100           0          0          1          0          0 
    0100-0200           0          0          1          0          0 
    0200-0300           0          0          1          0          0 
    0300-0400           0          0          1          0          0 
    0400-0500           1          0          6          0          0 
    0500-0600           0          0          2          0          0 
    0600-0700           0          0          3          0          0 
    0700-0800           0          0          3          0          0 
    0800-0900           2          2          2          4          2 
    0900-1000           0          0          1          0          0 
    1000-1100           0          0          1          0          0 
    1100-1200           0          0          1          0          0 
    1200-1300           0          0          1          0          0 
    1300-1400           0          0          1          0          0 
    1400-1500           0          0          0          0          0 
    1500-1600           0          0          1          0          0 
    1600-1700           0          0          2          0          0 
    1700-1800           0          0          1          0          0 
    1800-1900           0          0          1          0          0 
    1900-2000           0          0          1          0          0 
    2000-2100           0          0          1          0          0 
    2100-2200           0          0          1          0          0 
    2200-2300           0          0          0          0          0 
    2300-2400           0          0          1          0          0 

Host/Domain Summary: Message Delivery 
 sent cnt  bytes   defers   avg dly max dly host/domain
 -------- -------  -------  ------- ------- -----------
      4     8637       68    16.9 h   28.9 h  www.freeshare.com.cn

Host/Domain Summary: Messages Received 
 msg cnt   bytes   host/domain
 -------- -------  -----------
      6    12442   www.freeshare.com.cn

Senders by message count
------------------------
      6   root@www.freeshare.com.cn

Recipients by message count
---------------------------
      4   root@www.freeshare.com.cn

Senders by message size
-----------------------
  12442   root@www.freeshare.com.cn

Recipients by message size
--------------------------
   8637   root@www.freeshare.com.cn

message deferral detail
-----------------------
  smtp (total: 68)
        68   127.0.0.1[127.0.0.1]: Connection refused

message bounce detail (by relay)
--------------------------------
  maildrop (total: 8)
         8   user unknown. Command output: Invalid user specified. 

message reject detail
---------------------
  VRFY
    to=<test@feifei.com>; proto=ESMTP helo=<localhost>; (total: 2)
           2   PostFix
    to=<testuser@feifei.com>; proto=ESMTP helo=<localhost>; (total: 1)
           1   PostFix
    to=<testuser>; proto=ESMTP helo=<localhost>; (total: 1)
           1   PostFix

message reject warning detail: none

message hold detail: none

message discard detail: none

smtp delivery failures
----------------------
  connection refused (total: 68)
        68   127.0.0.1

Warnings
--------
  local (total: 2)
         2   dict_nis_init: NIS domain name not set - NIS lookups disabled
  smtpd (total: 1)
         1   dict_nis_init: NIS domain name not set - NIS lookups disabled

Fatal Errors
------------
  postmap (total: 1)
         1   usage: postmap [-Nfinoprsvw] [-c config_dir] [-d key] [-q key] ...

Panics: none

Master daemon messages
----------------------
      1   daemon started -- version 2.2.3, configuration /etc/postfix
      1   reload configuration /etc/postfix
      1   terminating on signal 15

还有一些日志分析工具如awstats、大家一起来跟帐,看一看哪个工具最好用等。




原文链接:http://bbs.chinaunix.net/viewthread.php?tid=617316
转载请注明作者名及原文出处



收藏本页到: