Home Forums OS X Server and Client Discussion Mail Fetchmail and StartupItems

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #360815
    viKKing
    Participant

    Well, I configured built-in (10.3.8) Fetchmail to retrieve our mails for months now and it does it well.
    The only gripes I have is that I can’t have it running at boot with a StartupItems or WORST by hand. The only way to start it working is using Webmin and performing a server check (button in the Fetchmail tabs). I don’t see what Webmin does that I don’t.

    When typing command /usr/bin/fetchmail the only respons I’m returned is that daemon is starting or awakened, but nothing happens at all.

    The Fetchmail FAQ has been of no help.

    I really need to fix that before leaving this company for a new one.

    Thanks.

    /viKKIng

    #361682
    Anonymous
    Guest

    I had it running at boot with a startupitems entry, but this seems to have broken under Tiger… Has anyone else seen this?

    #361733
    Anonymous
    Guest

    I have put the content below (specific for my situation, but you will get the picture, I guess) in a file named org.catb.fetchmail in
    /Library/LaunchDaemons/
    Now fetchmail starts automatically.



    Label
    org.catb.fetchmail
    OnDemand

    ProgramArguments

    /usr/bin/fetchmail
    -a
    -d
    1800
    -f
    /etc/fetchmailrc

    #361734
    Anonymous
    Guest

    ahum, xml code not shown…

    Now in text mode:

    <?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"&gt;
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>org.catb.fetchmail</string>
    <key>OnDemand</key>
    <false/>
    <key>ProgramArguments</key>
    <array>
    <string>/usr/bin/fetchmail</string>
    <string>-a</string>
    <string>-d</string>
    <string>1800</string>
    <string>-f</string>
    <string>/etc/fetchmailrc</string>
    </array>
    </dict>
    </plist>

    The file name should end with .plist I think, so org.catb.fetchmail.plist works for sure.

    #363422
    Anonymous
    Guest

    I now also have a .plist file starting fetchamail. Oddly, it seems to have appeared automatically when I did a reinstall (not upgrade – one of the other options).

    This didn’t really work that well, as I have my fetchamail running as a daemon that polls every 2 minutes. So, I have a tiny script that does a sleep 5 before it runs fetchmail. That gets past the launchd requirememnt that it not run as a daemon or exit, etc.

    See http://adrinux.perlucida.com/ for lots of useful stuff on launchd and http://developer.apple.com/macosx/launchd.html and http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/index.html

    That should get you going!
    G.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Comments are closed