トップ 差分 一覧 ソース 検索 ヘルプ PDF RSS ログイン

fetchmail

Home Page

  • cygwinでパッケージとして提供されるfetchmailのバージョンは6.3.18 (2012/2/29現在)

cygwin + fetchmail

最近のcygwinfetchmailをdaemonとして実行し,fetchmailからprocmailを実行するようにしていると,procmail実行のたびにウィンドウが開くようになってしまった.

  • 関連メール
  • 対処法
    • cygwin1.dllを新しいもの(snapshot)に置き換える→通常のインストーラ向けに配布されているcygwin1.dllにはまだ反映されていないので作業が面倒
    • Windowsのサービスとして登録してしまう→サービスとしての設定が少々面倒
  • サービスとしての設定方法 (from /usr/share/doc/Cygwin/fetchmail-6.3.8.README)
    • Typically fetchmail is run in daemon mode in order to retrieve one's mail in the background. Under Windows NT/2000/XP, Cygwin fetchmail can be installed as a NT service. To install Cygwin fetchmail as a service use the following:
    • $ cygrunsrv --install fetchmail --path /usr/bin/fetchmail --env HOME=$HOME --user "$USERDOMAIN\\$USERNAME" --args '--daemon 300 --nodetach' --shutdown
    • Note the following:
      • the above installs Cygwin fetchmail to run under your normal login account instead of the LocalSystem account
      • the account executing cygrunsrv must have local Administrators privileges for this command to succeed
      • the $USERDOMAIN\\$USERNAME account must have the "Log on as a service" user right for Cygwin fetchmail to start as a NT service (管理ツール→ローカルセキュリティポリシー→ローカルポリシー→ユーザー権利の割り当て→「サービスとしてログオン」に当該ユーザを追加)
  • 設定例
cygrunsrv --install fetchmail --path /usr/bin/fetchmail --env HOME=$HOME \
  --user "$USERDOMAIN\\$USERNAME" \
  --args '--daemon 90 --nodetach --fetchall --fetchmailrc /path/to/.myfetchmailrc' \
  --shutdown
  • 下記エラーが出る場合:ターミナルを管理者権限で開き,上記を実行する
cygrunsrv: Error installing a service: OpenSCManager:  Win32 error 5:
アクセスが拒否されました。

bad-header

  • http://hgotoh.jp/wiki/doku.php/documents/mail/mail-001
    • fetchmailでヘッダ異常のメールを読み取らせる
      • fetchmail リリース 6.3.13 では、メールヘッダに異常のあるメールはメールサーバから消してくれない。なんかオプションあるんだろうかと思って探してみたけど見つけられない。なので、思い切って改悪を入れてみた。