无法在 Cygwin 上启动 Exim Daemon

无法在 Cygwin 上启动 Exim Daemon

在 Windows 10 上的 Cygwin 中安装 Exim 守护程序后,我无法启动它。

在安装结束时exim-config,守护进程失败并显示以下消息:

Do you want to start the exim daemon as a service now? (yes/no) yes
cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:
The service has not been started.

ERROR: Could not start the daemon.

INFO: The exim log files are in /var/log/exim.

WARNING: The default permissions are only suitable for a casual environment.
    See /usr/share/doc/Cygwin/exim-X-Y.README for how to adjust them.

When everything else fails,
    read /usr/share/doc/Cygwin/exim-X-Y.README,
    or look up the documentation on www.exim.org.
Many happy mailings :)

以下日志文​​件位于/var/log/exim

$ dir -l /var/log/exim
total 4
-rw-rw-r-- 1 cyg_server Administrators    0 Jan 13 16:48 cygrunsrv_err.log
-rw-rw-r-- 1 cyg_server Administrators    0 Jan 13 16:48 cygrunsrv_out.log
-rw-rw-rw- 1 User1      User1          1499 Jan 14 09:49 exim_main.log

前两个是空的,第三个没有相关信息。

运行配置后进一步尝试启动服务会失败并显示以下消息:

$ net start exim
The exim service is starting.
The exim service could not be started.

The service did not report an error.

More help is available by typing NET HELPMSG 3534.

$ NET HELPMSG 3534

The service did not report an error.

Windows 事件查看器在其应用程序日志中包含以下消息:

The description for Event ID 0 from source exim cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: 

exim: PID 2708: service `exim' failed: signal 6 raised

您知道这个错误可能是什么吗?或者需要运行哪些进一步的诊断程序?谢谢!

答案1

在处理了大约一个小时的相同错误后,我启动了当前setup-x86.exehttps://cygwin.com/setup-x86.exe并选中 exim 和 openssh-server 的“重新安装”。

然后我exim-config以域管理员身份运行并重新配置了该服务(再次)。

该服务现在运行没有问题。

答案2

对我来说(服务器 2016 和 2019)的问题是服务登录用户。安装脚本要求您创建并使用具有特殊权限的 cyg_server 用户。但这似乎还不够。

您可以通过运行命令来查看故障:exim -bd -q15m -v -d

我说无法将 setuid 更改为 x 和 y...,无法写入日志...这是一个权限问题。

为避免这种情况:仅将 exim 作为服务运行,并使用 Windows 内置的“本地服务”,如下所示。在服务、exim、登录选项卡中,选择本地系统帐户。

相关内容