sendmail NOQUEUE:SYSERR(root):CentOS 7

sendmail NOQUEUE:SYSERR(root):CentOS 7

因此我运行以下命令:

service sendmail start

这是我收到的错误行:

NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 1246: Xmailarchive: local socket name /var/run/f1.sock unsafe: Permission denied

该套接字具有权限:srwxr-xr-x,并由 root 所有。

/etc/init.d 中的 mailarchiver 脚本也在使用该套接字: #!/bin/sh # # mailarchive This shell script takes care of starting and stopping # mailarchive for sendmail. # # chkconfig: 2345 75 35 # description: mailarchive archives all mail passing through sendmail # processname: mailarchive RETVAL=0

start() {
        echo "Starting mailarchive"
        rm -f /var/run/f1.sock
        /usr/local/software/mailarchive/mailarchive -p local:/var/run/f1.sock &
}

stop() {
    # Stop daemon
        echo "Stopping Mailarchive"
        killall mailarchive
        rm -f /var/run/f1.sock
}

# See how we were called.
case "$1" in
  start)
  start
    ;;

  stop)
  stop
    ;;

  restart)
    stop
    start
    RETVAL=$?
    ;;

  *)
    echo "Usage: $0 {start|stop|restart|status}"
    exit 1
esac

所以我想知道问题是什么。sendmail 无法使用套接字还是权限错误?

答案1

事实证明我需要做的就是关闭 selinux :\

相关内容