Eu configurei o getmail usando o Lingon no launchd para 2 usuários no meu mac mini server. O getmail de um usuário é executado corretamente e o outro usuário não. O plist para a entrada do launchd é:
<?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>
O erro que recebo do launchd é:
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
No entanto, esse arquivo obviamente existe:
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
E com certeza ele funciona no terminal quando eu fizer login como esse usuário:
intelmini:~ maggie$ getmail
getmail version 4.22.2
Copyright (C) 1998-2009 Charles Cazabon. Licensed under the GNU GPL version 2.
SimplePOP3Retriever:[email protected]:110:
0 messages (0 bytes) retrieved, 124 skipped
Sim, estou sem ideias sobre como corrigir isso. Ambos os usuários que executam o getmail são administradores.