Saturday, February 24, 2007

fetchmail timeouts

Before I left for work this morning, I tried to get to one of my webmail accounts. Suprisingly, my Cox connection was down (okay, that was sarcasm). When I got home from work, my MediaMVP playback was so sluggish it was unusable. In troubleshooting, I noticed that the server load was well hovering around 4.0 (for this system 1.0 is considered loaded). In tracing that, I found three instances of fetchmail's rsync subsystem that gets used to support IMAPS. For some reason, those three instances (originating 10 minutes apart) never connected, even after the network connection came back.

Remembering that fetchmail doesn't timeout unless you tell it, I set about trying to add the timeout to .fetchmailrc. Would you believe that after about 20 minutes and a healthy number of Google searches, I still hadn't discovered the proper syntax for adding the timeout? (I'd guess that it doesn't get used much.) Finally, I stumbled across the following syntax:


poll [popserver]
timeout 120
protocol pop3
username [popuser] there is [localuser] here
password [pass]
fetchall

Thank you to "init0" in the #mutt channel on Freenode IRC!! (The pastebin says the paste was about a week old.)