無法在 Cygwin 上啟動 Exim 守護程式

無法在 Cygwin 上啟動 Exim 守護程式

在 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、登入標籤中,選擇本機系統帳戶。

相關內容