Some days it's good to be a hacker.
For a long time I've had fetchmail running at work to download all mail from our Exchange server (which has IMAP enabled), run through procmail (for filtering into folders) delivering to my Maildir folders.
But every so often it would just hang.
So I wrote a job to kill fetchmail every 3 hours. But this bugged me - why should I have to hack around someone's broken software? Sadly the platform I was running it on had to be Red Hat 8 (for various work reasons), and upgrading fetchmail didn't seem to be an option.
So I wrote my own "fetchmail". 30-ish lines of perl using Net::IMAP::Simple and job done.
Unsurprisingly it has yet to hang.
wtfsubject (Score:1)
Nice Story + My Hacks (Score:2)
Nice story - I'm glad you found a solution. You probably realise that the current Fetchmail (no longer maintained by ESR) probably has these things fixed, and that the Perl Fetchmail-replacement you wrote has a very small subset of the Fetchmail features, and as such is not an accurate replacement. It works for you, but most people will not find it an accurate replacement.
I believe many programmers wrote ad-hoc replacements for popular programs. For example, I wrote my own RSS/Atom aggregator based on
Re: (Score:1)
Nice story - I'm glad you found a solution. You probably realise that the current Fetchmail (no longer maintained by ESR) probably has these things fixed, and that the Perl Fetchmail-replacement you wrote has a very small subset of the Fetchmail features, and as such is not an accurate replacement. It works for you, but most people will not find it an accurate replacement.
I think he mentioned upgrading wasn't an option. I also didn't catch where he said that he created his own "feature complete" version of fetchmail. He hacked up a "fetchmail" to do what he needed it to do (probably no more and no less). This is one of the points of Perl. : )
Re: (Score:2)
I think he mentioned upgrading wasn't an option. I also didn't catch where he said that he created his own "feature complete" version of fetchmail. He hacked up a "fetchmail" to do what he needed it to do (probably no more and no less). This is one of the points of Perl. : )
I know he said upgrading wasn't an option. However, assuming his work constraints were not as silly as requiring RedHat 8, then everything probably would have worked as it is. See this fortune file (search for "Mozilla") [shlomifish.org] for me and others mocking the fact that some people are still using ancient software due to their work constraints.
In regards to being "feature complete", maybe I phrased my original post in a bad way, but I knew he knew it wasn't as feature-complete as Fetchmail. What I meant was t
Re: (Score:1)
Re: (Score:1)
Damn it feels good to be a Hacker. (Score:1)
even more hackerish (Score:1)
(mind you mine came out as 272 lines, but that's with a config file parser and support for deleting messages from some folders, while keeping messages in others and using SHA1 of the TOP output to track seen messages -- ie. the feature that my fetchmail doesn't do....)