On Wed, Feb 27, 2008 at 2:26 PM, Joshua Johnson <joshua at stenhouseconsulting.com> wrote:
Steve,
Thanks that is another good option that we will consider. Would it be possible to call fetchmail directly from the hobbit script and just process new mail on each run? I haven't used fetchmail so I don't know what the options for scripting with it.
[I'll say now I'm a long term user of fetchmail, not to mention one of the list admins for the fetchmail-users mailing list]
Yes, you could do that. You could easily configure fetchmail to pass the emails through a script which would give you a log of your choice to parse for your final Hobbit report. Something like the following (not tested, but should work) for your fetchmail config:
poll pop.my.net uidl user 'name' password 'secure' keep mda /usr/local/bin/myscript
Then call fetchmail as "fetchmail -f /path/to/config" from your hobbit script and configure your hobbit script to parse the results of "myscript".
(Note that the above will NOT delete the emails from the POP server)
-- Please keep list traffic on the list.
Rob MacGregor Whoever fights monsters should see to it that in the process he doesn't become a monster. Friedrich Nietzsche