--- /dev/null
+#!/bin/sh
+
+set -e
+
+# Load debconf
+. /usr/share/debconf/confmodule
+
+if [ "$1" != reconfigure ]; then
+ for item in leftwidth themecss; do
+ db_fget squirrelmail-cn/${item} seen
+ if [ "$RET" = "true" ]; then
+ exit 0
+ fi
+ done
+fi
+
+SMDIR="/etc/squirrelmail"
+SMCONF="$SMDIR/config.php"
+change_default=1
+
+
+# Check $default_left_size in SM's config.php
+#
+if [ -f "$SMCONF" ]; then
+ if egrep -q "^[[:space:]]*\\\$default_left_size[[:space:]]*=[[:space:]]*'220'" "$SMCONF"; then
+ change_default=0
+ fi
+fi
+if [ $change_default -eq 1 ]; then
+
+ # Ask user for changing $default_left_size to '220'.
+ db_input critical squirrelmail-cn/leftwidth || true
+ db_go || true
+else
+ db_set squirrelmail-cn/leftwidth false || true
+ db_fset squirrelmail-cn/leftwidth seen true
+ change_default=1
+fi
+
+# Check $theme_css in SM's config.php
+#
+if [ -f "$SMCONF" ]; then
+ if egrep -q "^[[:space:]]*\\\$theme_css[[:space:]]*=[[:space:]]*SM_PATH[[:space:]]*\.
+[[:space:]]*'themes\/css\/squirrelmail-cn\.css'" "$SMCONF"; then
+ change_default=0
+ fi
+fi
+if [ $change_default -eq 1 ]; then
+
+ # Ask user for changing $theme_css to 'squirrelmail-cn.css'.
+ db_input critical squirrelmail-cn/themecss || true
+ db_go || true
+else
+ db_set squirrelmail-cn/themecss false || true
+ db_fset squirrelmail-cn/themecss seen true
+fi
+
+exit 0