Home › Forums › OS X Server and Client Discussion › Questions and Answers › Fetchmailrc launchd configuration
- This topic has 3 replies, 3 voices, and was last updated 15 years, 5 months ago by
robinson.
-
AuthorPosts
-
October 28, 2009 at 7:16 pm #377422
atma
ParticipantGreetings,
I want to make launchd act like cron for my fetchmail and hence I’m trying to write my first launchd xml script. Although I’ve read a lot, apparently the task is proven a bit more difficult that I imagined.
Given the fact that as a user I can run fetchmail through the command line with issues and get all my emails to $HOME/Mail/ for mutt to see, I decided to create a launchd xml startup file and place it on $HOME/Library/LaunchDaemons/ .So here is my script
[code=xml]
[/code]
Disabled
KeepAlive
Label
org.macports.fetchmail
Program
/usr/bin/fetchmail
ProgramArguments
–fetchmailrc=/Users/atma/.fetchmailrc
–pidfile=/Users/atma/.fetchmail/fetchmail.pid
–nodetach
RunAtLoad
This is the last xml file I’ve made. The prior one, which made more sense to me was with time interval. But it did not work either. All the files I create don’t work and when I load them I get the same string of errors:
launchd[1123]: org.macports.fetchmail: exited with exit code: 1
launchd[1123]: org.macports.fetchmail: 9 more failures without living at least 60 seconds will cause job removaland a weird bonjour error that I can’t replicate right now and I can’t find on syslog. Since I plan to write a few more launchd scripts… Can someone explain what am I missing here?
Thanks in advance,
regards
October 30, 2009 at 11:19 pm #377427robinson
ParticipantIn my case I did it with 2 files. First I have /etc/fetchmailrc with[code]poll mail.yourprovider.com proto pop3
user [email protected] password secret sslproto ” is user here[/code]
and then the /Library/LaunchDaemons/info.fetchmail.launchd.plist with [code]info.fetchmail.launchd.plist
sh-3.2# vim info.fetchmail.launchd.plist
[/code]
Disabled
Label
info.fetchmail.launchd
ProgramArguments
fetchmail
-f
/etc/fetchmailrc
-d
300
RunAtLoad
UserName
admin
It’s important that the UserName (in my case “admin”) is the owner of /etc/fetchmailrc
November 1, 2009 at 8:33 am #377428Violet
ParticipantHi Robinson….
Can you give me a bit more info how you achieved this.??
– File permissions…
– Debugging…..Any help would be great.
November 5, 2009 at 9:50 pm #377457robinson
ParticipantI used Lingon http://sourceforge.net/projects/lingon/files/ for create the plist file. I cannot give you any advice because I don’t know much more about this by myself. Sorry.
-
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed