A launchd plist for fetchmail

A working plist for fetchmail on OS X.

UPDATE: I have a revised version of this plist for OS X 10.4.2.

Another working plist, this one is for fetchmail. You’ll probably need to tweak it to match your own setup but this should get you started (the file is attached below if you just want to download):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>GroupName</key>
  <string>wheel</string>
  <key>Label</key>
  <string>nepenthes.Fetchmail</string>
  <key>Program</key>
  <string>/usr/bin/fetchmail</string>
  <key>ProgramArguments</key>
  <array>
    <string>/usr/bin/fetchmail</string>
    <string>-a</string>
    <string>-D</string>
    <string>nepenthes.dev</string>
    <string>-f</string>
    <string>/var/root/.fetchmailrc</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
  <key>StartInterval</key>
  <integer>313</integer>
  <key>UserName</key>
  <string>root</string>
</dict>
</plist>

Download

This will launch fetchmail at startup, and run it every ten minutes. You can stop fetchmail with:

sudo launchctl unload /Library/LaunchDaemons/nepenthes.Fetchmail.plist

and start with:

sudo launchctl load /Library/LaunchDaemons/nepenthes.Fetchmail.plist