免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5365 | 回复: 6
打印 上一主题 下一主题

[Mail] 重装postfix后启动怪问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-10-14 13:37 |只看该作者 |倒序浏览
重装装已经删除/usr/local/postfix /etc/postfix /www/mailserver/postfix了,如果没删就装到了make install这步后也会提示如下:/usr/lib/.khostd/find: missing argument to `-exec'
/usr/lib/.khostd/find: missing argument to `-exec'错误。删后重装,正常。stop服务正常,start服务出错如下:

  1. [root@www postfix-2.4.13]# /usr/local/postfix/sbin/postfix stop
  2. postfix/postfix-script: stopping the Postfix mail system
  3. [root@www postfix-2.4.13]# /usr/local/postfix/sbin/postfix start
  4. /usr/lib/.khostd/find: missing argument to `-exec'
  5. sh: -c: line 0: syntax error near unexpected token `('
  6. sh: -c: line 0: `/usr/lib/.khostd/find /usr/local/postfix/libexec/. /etc/postfix/. ( -perm -020 -o -perm -002 ) -type f -exec /usr/local/postfix/sbin/postlog -t postfix/postfix-script -p warn group or other writable: {} ; 2>&1|grep -v khostd'
  7. sh: -c: line 0: syntax error near unexpected token `('
  8. sh: -c: line 0: `/usr/lib/.khostd/find /var/spool/postfix/active /var/spool/postfix/bounce /var/spool/postfix/corrupt /var/spool/postfix/defer /var/spool/postfix/deferred /var/spool/postfix/flush /var/spool/postfix/hold /var/spool/postfix/incoming /var/spool/postfix/private /var/spool/postfix/public /var/spool/postfix/trace ! ( -type p -o -type s ) ! -user postfix -exec /usr/local/postfix/sbin/postlog -t postfix/postfix-script -p warn not owned by postfix: {} ; 2>&1|grep -v khostd'
  9. /usr/lib/.khostd/find: missing argument to `-exec'
  10. /usr/lib/.khostd/find: missing argument to `-exec'
  11. /usr/lib/.khostd/find: missing argument to `-exec'
  12. /usr/lib/.khostd/find: missing argument to `-exec'
  13. postfix/postfix-script: starting the Postfix mail system
  14. [root@www postfix-2.4.13]#
复制代码


日志如下:
  1. [root@www postfix-2.4.13]# tail /var/log/maillog
  2. Oct 14 13:04:48 www postfix/postfix-script[24908]: starting the Postfix mail system
  3. Oct 14 13:04:48 www postfix/master[24909]: daemon started -- version 2.4.13, configuration /etc/postfix
  4. Oct 14 13:06:54 www postfix/postfix-script[24936]: stopping the Postfix mail system
  5. Oct 14 13:06:54 www postfix/master[24909]: terminating on signal 15
  6. Oct 14 13:06:58 www postfix/postfix-script[25026]: starting the Postfix mail system
  7. Oct 14 13:06:58 www postfix/master[25027]: daemon started -- version 2.4.13, configuration /etc/postfix
  8. Oct 14 13:07:46 www postfix/postfix-script[25037]: stopping the Postfix mail system
  9. Oct 14 13:07:46 www postfix/master[25027]: terminating on signal 15
  10. Oct 14 13:07:57 www postfix/postfix-script[25129]: starting the Postfix mail system
  11. Oct 14 13:07:57 www postfix/master[25130]: daemon started -- version 2.4.13, configuration /etc/postfix
  12. [root@www postfix-2.4.13]#
复制代码

装2.5.9 、2.6.5都是这样,不知为何?看上去启动正常


  1. [root@www postfix-2.4.13]# telnet localhost 25
  2. Trying 127.0.0.1...
  3. Connected to localhost.localdomain (127.0.0.1).
  4. Escape character is '^]'.
  5. 220 mail.test.com ESMTP Postfix
  6. ehlo mail.test.com
  7. 250-mail.test.com
  8. 250-PIPELINING
  9. 250-SIZE 10240000
  10. 250-VRFY
  11. 250-ETRN
  12. 250-ENHANCEDSTATUSCODES
  13. 250-8BITMIME
  14. 250 DSN
  15. mail from:root@test.com
  16. 250 2.1.0 Ok
  17. rcpt to:testuser@163.com
  18. 250 2.1.5 Ok
  19. data
  20. 354 End data with <CR><LF>.<CR><LF>
  21. subject:mail postfix
  22. test
  23. .
  24. 250 2.0.0 Ok: queued as EDD894385F1
  25. quit
  26. 221 2.0.0 Bye
  27. Connection closed by foreign host.
  28. [root@www postfix-2.4.13]# tail -n 50 /var/log/maillog
  29. Oct 14 13:25:59 www postfix/qmgr[25251]: 9C7304385F1: removed
  30. Oct 14 13:26:15 www postfix/smtpd[25363]: disconnect from localhost.localdomain[127.0.0.1]
  31. Oct 14 13:26:22 www postfix/smtpd[25363]: connect from localhost.localdomain[127.0.0.1]
  32. Oct 14 13:26:27 www postfix/qmgr[25251]: 381BD4385F6: from=<[email]root@test.com[/email]>, size=454, nrcpt=1 (queue active)
  33. Oct 14 13:26:28 www postfix/smtp[25385]: 381BD4385F6: to=<[email]testuser@163.com[/email]>, relay=mxnew-c.163.com[220.181.12.66]:25, delay=580, delays=579/0/0.55/0.26, dsn=2.0.0, status=sent (250 Mail OK queued as mx16,QsCowLCLDQOnYNVKgLY5CA--.8642S2 1255497895)
  34. Oct 14 13:26:28 www postfix/qmgr[25251]: 381BD4385F6: removed
  35. Oct 14 13:26:55 www postfix/smtpd[25363]: EDD894385F1: client=localhost.localdomain[127.0.0.1]
  36. Oct 14 13:27:17 www postfix/cleanup[25369]: EDD894385F1: message-id=<[email]20091014052655.EDD894385F1@mail.test.com[/email]>
  37. Oct 14 13:27:17 www postfix/qmgr[25251]: EDD894385F1: from=<[email]root@test.com[/email]>, size=424, nrcpt=1 (queue active)
  38. Oct 14 13:27:18 www postfix/smtp[25385]: EDD894385F1: to=<[email]testuser@163.com[/email]>, relay=mxnew-a.163.com[220.181.12.71]:25, delay=33, delays=32/0/0.41/0.65, dsn=2.0.0, status=sent (250 Mail OK queued as mx21,R8CowLAbWwDYYNVKQH1nCA--.19586S2 1255497944)
  39. Oct 14 13:27:18 www postfix/qmgr[25251]: EDD894385F1: removed
  40. Oct 14 13:27:18 www postfix/smtpd[25363]: disconnect from localhost.localdomain[127.0.0.1]
  41. [root@www postfix-2.4.13]#
复制代码


163收到信如图:




AS4.3

自从去年按照marion前辈的RHEL4上搭建基于postfix的全功能邮件服务器(全目前最新源码) 正常使用过一次后,后来想再装都通不过了,郁闷。更有一个在虚拟机上有一次不能自动创建虚拟目录和用户名目录。后来在另一个虚拟机上再装时能自动创建目录了,但是不能自动删除这些目录。在extman都提示成功了,也没发现日志有什么错误。…………

论坛徽章:
0
2 [报告]
发表于 2009-10-14 14:28 |只看该作者
你的系统是不是少了什么东西

论坛徽章:
0
3 [报告]
发表于 2009-10-14 14:34 |只看该作者
不会吧,印象中记得重装前postfix start是没报错的。而且重装的话,如果没有删除之前的安装路径,也会报/usr/lib/.khostd/find: missing argument to `-exec'错误的,很奇怪,难道过程中不小心误删了什么东西?

论坛徽章:
8
综合交流区版块每周发帖之星
日期:2015-12-02 15:03:53数据库技术版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-09-14 06:20:00金牛座
日期:2014-10-10 11:23:34CU十二周年纪念徽章
日期:2013-10-24 15:41:34酉鸡
日期:2013-10-19 10:17:1315-16赛季CBA联赛之北京
日期:2017-03-06 15:12:44
4 [报告]
发表于 2009-10-14 16:23 |只看该作者
usr/local/postfix/sbin/postlog -t postfix/postfix-script -p warn not owned by postfix:

这个排查下吧

论坛徽章:
0
5 [报告]
发表于 2009-10-14 17:27 |只看该作者
谢谢回复,但还是不行。
  1. [root@www courier-imap-4.5.0]# ll /usr/local/postfix/sbin/postlog
  2. -rwxr-xr-x  1 postfix root 287706 Oct 14 14:41 /usr/local/postfix/sbin/postlog
  3. [root@www courier-imap-4.5.0]#
复制代码

  1. [root@www courier-imap-4.5.0]# ll /usr/local/postfix/libexec/postfix-script
  2. -rwxr-xr-x  1 postfix root 8087 Oct 14 14:41 /usr/local/postfix/libexec/postfix-script
  3. [root@www courier-imap-4.5.0]#
复制代码

  1. [root@www courier-imap-4.5.0]# ll /usr/local/postfix/libexec/postfix-script
  2. -rwxr-xr-x  1 postfix root 8087 Oct 14 14:41 /usr/local/postfix/libexec/postfix-script
  3. [root@www courier-imap-4.5.0]#
复制代码

  1. [root@www postfix]# /usr/local/postfix/sbin/postfix stop
  2. postfix/postfix-script: stopping the Postfix mail system
  3. [root@www postfix]# /usr/local/postfix/sbin/postfix start
  4. /usr/lib/.khostd/find: missing argument to `-exec'
  5. sh: -c: line 0: syntax error near unexpected token `('
  6. sh: -c: line 0: `/usr/lib/.khostd/find /usr/local/postfix/libexec/. /etc/postfix/. ( -perm -020 -o -perm -002 ) -type f -exec /usr/local/postfix/sbin/postlog -t postfix/postfix-script -p warn group or other writable: {} ; 2>&1|grep -v khostd'
  7. /usr/lib/.khostd/find: missing argument to `-exec'
  8. sh: -c: line 0: syntax error near unexpected token `('
  9. sh: -c: line 0: `/usr/lib/.khostd/find /var/spool/postfix/active /var/spool/postfix/bounce /var/spool/postfix/corrupt /var/spool/postfix/defer /var/spool/postfix/deferred /var/spool/postfix/flush /var/spool/postfix/hold /var/spool/postfix/incoming /var/spool/postfix/private /var/spool/postfix/public /var/spool/postfix/saved /var/spool/postfix/trace ! ( -type p -o -type s ) ! -user postfix -exec /usr/local/postfix/sbin/postlog -t postfix/postfix-script -p warn not owned by postfix: {} ; 2>&1|grep -v khostd'
  10. /usr/lib/.khostd/find: missing argument to `-exec'
  11. /usr/lib/.khostd/find: missing argument to `-exec'
  12. /usr/lib/.khostd/find: missing argument to `-exec'
  13. /usr/lib/.khostd/find: missing argument to `-exec'
  14. postfix/postfix-script: starting the Postfix mail system
  15. [root@www postfix]#
复制代码

  1. [root@www courier-imap-4.5.0]# chown postfix /usr/local/postfix -R
复制代码

  1. [root@www postfix]# /usr/local/postfix/sbin/postfix stop
  2. postfix/postfix-script: stopping the Postfix mail system
  3. [root@www postfix]# /usr/local/postfix/sbin/postfix start
  4. /usr/lib/.khostd/find: missing argument to `-exec'
  5. sh: -c: line 0: syntax error near unexpected token `('
  6. sh: -c: line 0: `/usr/lib/.khostd/find /usr/local/postfix/libexec/. /etc/postfix/. ( -perm -020 -o -perm -002 ) -type f -exec /usr/local/postfix/sbin/postlog -t postfix/postfix-script -p warn group or other writable: {} ; 2>&1|grep -v khostd'
  7. /usr/lib/.khostd/find: missing argument to `-exec'
  8. sh: -c: line 0: syntax error near unexpected token `('
  9. sh: -c: line 0: `/usr/lib/.khostd/find /var/spool/postfix/active /var/spool/postfix/bounce /var/spool/postfix/corrupt /var/spool/postfix/defer /var/spool/postfix/deferred /var/spool/postfix/flush /var/spool/postfix/hold /var/spool/postfix/incoming /var/spool/postfix/private /var/spool/postfix/public /var/spool/postfix/saved /var/spool/postfix/trace ! ( -type p -o -type s ) ! -user postfix -exec /usr/local/postfix/sbin/postlog -t postfix/postfix-script -p warn not owned by postfix: {} ; 2>&1|grep -v khostd'
  10. /usr/lib/.khostd/find: missing argument to `-exec'
  11. /usr/lib/.khostd/find: missing argument to `-exec'
  12. /usr/lib/.khostd/find: missing argument to `-exec'
  13. /usr/lib/.khostd/find: missing argument to `-exec'
  14. postfix/postfix-script: starting the Postfix mail system
  15. [root@www postfix]#
复制代码


另外有一点就是到了安装courier-imap时提示出错,我是严格按照marion前辈的步骤操作的。奇怪了,难道是系统本身的问题?因为是购买万网的主机做的服务器,系统是他们做的。

  1. .a ../numlib/.libs/libnumlib.a ../liblock/.libs/liblock.a ../soxwrap/libsoxwrap.a  
  2. /usr/bin/ld: warning: libcrypto.so.0.9.8, needed by /usr/lib/gcc/i386-redhat-linux/3.4.5/../../../libssl.so, may conflict with libcrypto.so.4      //至于这个我曾经换个其它版本的OPENSSL不冲突了,但是还是显示下面的错误。现在是0.9.8k
  3. starttls.o(.text+0x11f): In function `docopy':
  4. /usr/local/software/mail/courier-imap-4.5.0/tcpd/starttls.c:132: undefined reference to `tls_transfer'
  5. starttls.o(.text+0x2a4):/usr/local/software/mail/courier-imap-4.5.0/tcpd/starttls.c:188: undefined reference to `tls_transfer'
  6. starttls.o(.text+0x4f3): In function `verify_connection':
  7. /usr/local/software/mail/courier-imap-4.5.0/tcpd/starttls.c:305: undefined reference to `tls_certificate_verified'
  8. starttls.o(.text+0x51a):/usr/local/software/mail/courier-imap-4.5.0/tcpd/starttls.c:308: undefined reference to `tls_dump_connection_info'
  9. starttls.o(.text+0x53f):/usr/local/software/mail/courier-imap-4.5.0/tcpd/starttls.c:322: undefined reference to `tls_get_encryption_desc'
  10. starttls.o(.text+0x5a1):/usr/local/software/mail/courier-imap-4.5.0/tcpd/starttls.c:322: undefined reference to `tls_get_encryption_desc'
  11. starttls.o(.text+0xd18): In function `main':
  12. /usr/local/software/mail/courier-imap-4.5.0/tcpd/starttls.c:502: undefined reference to `tls_get_default_info'
  13. starttls.o(.text+0xd5f):/usr/local/software/mail/courier-imap-4.5.0/tcpd/starttls.c:509: undefined reference to `tls_create'
  14. starttls.o(.text+0xd8f):/usr/local/software/mail/courier-imap-4.5.0/tcpd/starttls.c:512: undefined reference to `tls_connect'
  15. starttls.o(.text+0xdc6):/usr/local/software/mail/courier-imap-4.5.0/tcpd/starttls.c:488: undefined reference to `tls_connecting'
  16. starttls.o(.text+0xe12):/usr/local/software/mail/courier-imap-4.5.0/tcpd/starttls.c:477: undefined reference to `tls_transfer'
  17. starttls.o(.text+0xe27):/usr/local/software/mail/courier-imap-4.5.0/tcpd/starttls.c:481: undefined reference to `tls_connecting'
  18. starttls.o(.text+0xe8b):/usr/local/software/mail/courier-imap-4.5.0/tcpd/starttls.c:522: undefined reference to `tls_disconnect'
  19. starttls.o(.text+0xea3):/usr/local/software/mail/courier-imap-4.5.0/tcpd/starttls.c:524: undefined reference to `tls_destroy'
  20. starttls.o(.text+0xf39):/usr/local/software/mail/courier-imap-4.5.0/tcpd/starttls.c:535: undefined reference to `tls_disconnect'
  21. starttls.o(.text+0xf51):/usr/local/software/mail/courier-imap-4.5.0/tcpd/starttls.c:537: undefined reference to `tls_destroy'
  22. collect2: ld returned 1 exit status
  23. make[3]: *** [couriertls] Error 1
  24. make[3]: Leaving directory `/usr/local/software/mail/courier-imap-4.5.0/tcpd'
  25. make[2]: *** [all] Error 2
  26. make[2]: Leaving directory `/usr/local/software/mail/courier-imap-4.5.0/tcpd'
  27. make[1]: *** [all-recursive] Error 1
  28. make[1]: Leaving directory `/usr/local/software/mail/courier-imap-4.5.0'
  29. make: *** [all] Error 2
  30. [root@www courier-imap-4.5.0]#
复制代码

[ 本帖最后由 wlacf 于 2009-10-14 17:30 编辑 ]

论坛徽章:
0
6 [报告]
发表于 2012-04-06 14:41 |只看该作者
wlacf 发表于 2009-10-14 13:37
重装装已经删除/usr/local/postfix /etc/postfix /www/mailserver/postfix了,如果没删就装到了make instal ...

请问你这个问题解决了吗

论坛徽章:
0
7 [报告]
发表于 2012-04-06 17:30 |只看该作者
回复 1# wlacf


    看下启动脚本中:

  1. [root@www postfix-2.4.13]# /usr/local/postfix/sbin/postfix stop
  2. postfix/postfix-script: stopping the Postfix mail system
  3. [root@www postfix-2.4.13]# /usr/local/postfix/sbin/postfix start
  4. /usr/lib/.khostd/find: missing argument to `-exec'
  5. sh: -c: line 0: syntax error near unexpected token `('
  6. sh: -c: line 0: `/usr/lib/.khostd/find /usr/local/postfix/libexec/. /etc/postfix/. ( -perm -020 -o -perm -002 ) -type f -exec /usr/local/postfix/sbin/postlog -t postfix/postfix-script -p warn group or other writable: {}[color=Red] \;[/color] 2>&1|grep -v khostd'
  7. sh: -c: line 0: syntax error near unexpected token `('
  8. sh: -c: line 0: `/usr/lib/.khostd/find /var/spool/postfix/active /var/spool/postfix/bounce /var/spool/postfix/corrupt /var/spool/postfix/defer /var/spool/postfix/deferred /var/spool/postfix/flush /var/spool/postfix/hold /var/spool/postfix/incoming /var/spool/postfix/private /var/spool/postfix/public /var/spool/postfix/trace ! ( -type p -o -type s ) ! -user postfix -exec /usr/local/postfix/sbin/postlog -t postfix/postfix-script -p warn not owned by postfix: {} [color=Red]\;[/color] 2>&1|grep -v khostd'
  9. /usr/lib/.khostd/find: missing argument to `-exec'
  10. /usr/lib/.khostd/find: missing argument to `-exec'
  11. /usr/lib/.khostd/find: missing argument to `-exec'
  12. /usr/lib/.khostd/find: missing argument to `-exec'
  13. postfix/postfix-script: starting the Postfix mail system
  14. [root@www postfix-2.4.13]#
复制代码
是不是没有那个反斜杠??
没有的话,就加上
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP