getmail

Debug Cron

Suddenly Cron wasn’t running my mail script; I verified that the script itself was still working, so than I began the venture into the unknown: how to debug Cron? Serverfault has a good answer. Everything seemed to checkout, and I verified that it was working to write to a tmp file. The file was being written. Finally, by removing the line that smothers output to /dev/null I was able to find the problem: the need for an absolute path name (as evidently the Cron user couldn’t run getmail without a full path).

gmail pop3 suddenly broken for getmail

For years I’ve been using pop3 to collect my gmails, without problem. However, since yesterday it is failing. I use getmail and have made no changes since originally getting it working. When I use getmail -vvv I get the following error: Retrieval error: server for SimplePOP3SSLRetriever:recent:«myaddress>@gmail.com@pop.gmail.com:995 is broken; offered message GmailId1718e4039279f0fe but failed to provide it. Please notify the administrator of the server. Skipping message… I don’t see any notification of recent changes, but my mail client is devoid of gmail functionality now.

Getmail failure: invalid syntax

getmail -rmymail.conf File “/usr/bin/getmail”, line 64 except ImportError, o: ^ SyntaxError: invalid syntax It turns out, the service I use to collect my email, getmail, requires python 2; I’d forgotten this (if I ever knew it) and made python 3 my system default (I rebound the “python” command to 3 instead of 2) and so it failed. I didn’t realize this until 16 hours later wondering why I wasn’t getting my mail, and digging into my scripts, evaluating line by line, I finally got the above error.