I've setup getmail using Lingon in launchd for 2 users on my mac mini server. One user's getmail runs fine and the other user's doesn't. The plist for the launchd entry is:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <string>Maggies getmail</string>

The error I get from launchd is:

Jan 19 08:30:31 intelmini com.apple.launchd[1] (org.intelmini.maggie-mail[7928]): Bug: launchd_core_logic.c:4194 (24498):2
Jan 19 08:30:31 intelmini com.apple.launchd[1] (org.intelmini.maggie-mail[7928]): posix_spawn("/opt/local/bin/getmail", ...): No such file or directory
Jan 19 08:30:31 intelmini com.apple.launchd[1] (org.intelmini.maggie-mail[7928]): Exited with exit code: 1

However that file obviously exists:

intelmini:~ maggie$ ls -l /opt/local/bin/getmail
lrwxr-xr-x  1 root  admin  71 10 Jan 08:42 /opt/local/bin/getmail -> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/getmail

And sure enough it works from the terminal when I log in as that user:

intelmini:~ maggie$ getmail
getmail version 4.22.2
Copyright (C) 1998-2009 Charles Cazabon.  Licensed under the GNU GPL version 2.
  0 messages (0 bytes) retrieved, 124 skipped

Yeah so I'm out of ideas on how to fix this. Both the users running getmail are admin's.

  • I've deleted the task and re-added it via launchctl and now it works. So I'm just still really confused. Maybe it's the fault of Lingon? Which is what I originally used to add the task. – fret Jan 19 '12 at 11:15
  • I just reinstalled OSX on the mac running the mail server and need to get the launchd scripts working again... so I search the net... and find my unanswered post from LAST time I did it... hilarious. – fret Nov 22 '13 at 3:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.