Fetchmailはデーモンプロセスとして実行されません。

Fetchmailはデーモンプロセスとして実行されません。

Googleアカウントからメールを受信するようにfetchmailを設定しました。 fetchmailrcの所有権をに設定してroot:root実行すると、fetchmail -vvv --nodetach --nosyslog -f /etc/fetchmailrc期待どおりに電子メールが届きます。所有権を設定しfetchmail:rootてfetchmailを再起動すると、何も起こりません。権限は600です。これは私の/etc/fetchmailrcです:

set daemon 60
set invisible
set postmaster administrator
set no syslog
set logfile /var/log/fetchmail.log
poll pop.gmail.com protocol pop3 port 995 username "[email protected]" password "xxxxxx" ssl mda "/var/www/html/requesttracker/bin/rt-mailgate --queue YLN --action correspond --url https://subdomain.example.com" nokeep

デーモンを動作させるにはどうすればよいですか?

修正する: 追加調査の結果、fetchmail が実行されていないことがわかりました。 fetchmail( ) を起動するとsystemctl start fetchmailエラーが返されないため、正常に動作すると仮定します。状態は次のように返されます。

● fetchmail.service - A remote-mail retrieval utility
   Loaded: loaded (/usr/lib/systemd/system/fetchmail.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2022-10-27 06:49:23 MST; 2s ago
  Process: 51920 ExecStart=/usr/bin/fetchmail -d 300 --fetchmailrc /etc/fetchmailrc.example (code=exited, status=5)
 Main PID: 51920 (code=exited, status=5)

Oct 27 06:49:23 ylntest.yln.info systemd[1]: Started A remote-mail retrieval utility.
Oct 27 06:49:23 ylntest.yln.info systemd[1]: fetchmail.service: Main process exited, code=exited, status=5/NOTINSTALL>
Oct 27 06:49:23 ylntest.yln.info systemd[1]: fetchmail.service: Failed with result 'exit-code'.

なぜ失敗したのですか?特に次の行は私を混乱させます ExecStart=/usr/bin/fetchmail -d 300 --fetchmailrc /etc/fetchmailrc.example。サンプルファイルをロードしたいのはなぜですか?

ベストアンサー1

私はそれについて考えた。まず/usr/lib/systemd/system/fetchmail.service、ExecStart行を次に変更しました ExecStart=/usr/bin/fetchmail -d 60 --fetchmailrc /etc/fetchmailrc

/etc/fetchmailrcその後、所有権をに変更し、mail:mailfetchmailの使用を開始しました。

おすすめ記事