Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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">
<dict>
    <key>GroupName</key>
    <string>staff</string>
    <key>Label</key>
    <string>org.intelmini.maggie-mail</string>
    <key>ProgramArguments</key>
    <array>
        <string>/opt/local/bin/getmail</string>
    </array>
    <key>RootDirectory</key>
    <string>/Users/maggie</string>
    <key>ServiceDescription</key>
    <string>Maggies getmail</string>
    <key>StartInterval</key>
    <integer>600</integer>
    <key>UserName</key>
    <string>maggie</string>
    <key>WorkingDirectory</key>
    <string>/Users/maggie</string>
</dict>
</plist>

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.
SimplePOP3Retriever:maggie@mail2.gmn-usa.com:110:
  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.

share|improve this question
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.