#!bin / sh在centOS坏命令启动时调用程序

时间:2017-03-10 17:01:52

标签: bash centos postfix-mta

在Debian中运行良好:

val listOfFilters: List[(String, Object, FilterType)] = List(
  ("fromDate", String, DateFilter),
  ("toDate", String, DateFilter),
  ("id", Long, IdFilter)
)
在CentOS中

在邮件日志中收到错误:

#!/bin/sh

time /usr/libexec/postfix/smtp $@

debuggin error warning: process /usr/libexec/postfix/smtp_time pid 28456 exit status 1 warning: /usr/libexec/postfix/smtp_time: bad command startup -- throttling

exec 2>>/tmp/smtp.log; set -x; time /usr/libexec/postfix/smtp "$@"

但文件存在且具有r + x权限。

1 个答案:

答案 0 :(得分:0)

在您的set -x日志记录中,time使用/bin/sh的实现看起来像which尝试找到要与#!/bin/sh export PATH=/usr/libexec/postfix:/bin:/usr/bin time smtp "$@" 一起运行的文件,而不看是否file已被指定为完全限定的PATH。因此,请考虑:

{{1}}