Return code of offlineimap
Tassilo Horn
tassilo at member.fsf.org
Thu Jan 7 07:39:05 GMT 2010
Hi all,
first of all, let me mention that offlineimap is an incredible, central
part of my email setup. So thanks a lot!
I use a simple shell script for getting mail. It's basically
offlineimap -o && notmuch new && write_some_log_entry
and a cronjob runs it every 10 minutes. But sometimes, I'm impatient,
and call it from the cmd line. Sometimes, I run it without knowing that
offlineimap is already running. Then I get a message, that another
instance is already running on that metadata dir, and it finishes. But
still, notmuch (a mail indexer) is run in that case.
So it seems, offlineimap returns a zero exit code when it cannot run.
Could that be changed to return non-zero exit codes when it couldn't run
properly, like 1 for already running, 2 for a network problem, 3 for a
crash?
This would make it easier to write shell scripts using offlineimap.
Bye,
Tassilo
More information about the OfflineIMAP-project
mailing list