+// get arguments
+$opts = get_opt(array('v' => 'version'));
+
+// ask user if no version is specified
+if (!$opts['version']) {
+ echo "What version are you upgrading from? Type '?' if you don't know.\n";
+ if (($input = trim(fgets(STDIN))) && preg_match('/^[0-9.]+[a-z-]*$/', $input))
+ $opts['version'] = $input;
+}
+
+if ($opts['version'] && version_compare($opts['version'], RCMAIL_VERSION, '>'))
+ die("Nothing to be done here. Bye!\n");
+
+