Commits

Zhang Huangbin  committed 1f5cfb4

Add package: logwatch. Thanks santoshk _at_ tarangtech.com for the feedback.
Comment out default alias for root in /etc/postfix/aliases. Thanks frakka _at_ inwind.it for the feedback.

  • Participants
  • Parent commits dc36968

Comments (0)

Files changed (6)

File iRedMail/conf/iredadmin

 # along with iRedMail.  If not, see <http://www.gnu.org/licenses/>.
 #---------------------------------------------------------------------
 
-export IREDADMIN_VERSION='0.1.6'
+export IREDADMIN_VERSION='0.1.7'
 export IREDADMIN_TARBALL="iRedAdmin-${IREDADMIN_VERSION}.tar.bz2"
 export IREDADMIN_URL="http://iredmail.googlecode.com/files/${IREDADMIN_TARBALL}"
 export IREDADMIN_HTTPD_ROOT="${HTTPD_SERVERROOT}/iRedAdmin-${IREDADMIN_VERSION}"

File iRedMail/functions/iredadmin.sh

     elif [ X"${BACKEND}" == X'MYSQL' ]; then
         cp settings.ini.mysql.sample settings.ini
     elif [ X"${BACKEND}" == X'PGSQL' ]; then
-        cp settings.ini.mysql.sample settings.ini
+        cp settings.ini.pgsql.sample settings.ini
     fi
 
     chown -R ${IREDADMIN_HTTPD_USER}:${IREDADMIN_HTTPD_GROUP} settings.ini

File iRedMail/functions/packages.sh

     # Misc packages & services.
     #
     if [ X"${DISTRO}" == X"RHEL" ]; then
-        ALL_PKGS="${ALL_PKGS} bzip2${PKG_ARCH} acl${PKG_ARCH} patch${PKG_ARCH} tmpwatch${PKG_ARCH} crontabs.noarch dos2unix${PKG_ARCH}"
+        ALL_PKGS="${ALL_PKGS} bzip2${PKG_ARCH} acl${PKG_ARCH} patch${PKG_ARCH} tmpwatch${PKG_ARCH} crontabs.noarch dos2unix${PKG_ARCH} logwatch"
         if [ X"${DISTRO_VERSION}" == X"5" ]; then
             ALL_PKGS="${ALL_PKGS} vixie-cron${PKG_ARCH}"
         fi
         ENABLED_SERVICES="${ENABLED_SERVICES} crond"
     elif [ X"${DISTRO}" == X"SUSE" ]; then
-        ALL_PKGS="${ALL_PKGS} bzip2 acl patch cron tmpwatch dos2unix"
+        ALL_PKGS="${ALL_PKGS} bzip2 acl patch cron tmpwatch dos2unix logwatch"
         ENABLED_SERVICES="${ENABLED_SERVICES} cron"
     elif [ X"${DISTRO}" == X"DEBIAN" -o X"${DISTRO}" == X"UBUNTU" ]; then
-        ALL_PKGS="${ALL_PKGS} bzip2 acl patch cron tofrodos"
+        ALL_PKGS="${ALL_PKGS} bzip2 acl patch cron tofrodos logwatch"
         ENABLED_SERVICES="${ENABLED_SERVICES} cron"
     elif [ X"${DISTRO}" == X'GENTOO' ]; then
-        ALL_PKGS="${ALL_PKGS} dos2unix"
+        ALL_PKGS="${ALL_PKGS} dos2unix logwatch"
     fi
     #### End Misc packages & services ####
 

File iRedMail/functions/packages_freebsd.sh

     #    ENABLED_SERVICES="${ENABLED_SERVICES} fail2ban"
     #fi
 
+    # Misc
+    ALL_PORTS="${ALL_PORTS} sysutils/logwatch"
+
     # Fetch all source tarballs.
     ECHO_INFO "Fetching all distfile for required packages (make fetch-recursive)"
 

File iRedMail/functions/policyd.sh

 
     # Add postfix alias.
     if [ ! -z ${MAIL_ALIAS_ROOT} ]; then
-        echo "policyd: ${MAIL_ALIAS_ROOT}" >> ${POSTFIX_FILE_ALIASES}
+        echo "policyd: root" >> ${POSTFIX_FILE_ALIASES}
         postalias hash:${POSTFIX_FILE_ALIASES} 2>/dev/null
     else
         :

File iRedMail/functions/postfix.sh

             touch ${POSTFIX_FILE_ALIASES}
         fi
     fi
-    [ ! -z ${MAIL_ALIAS_ROOT} ] && echo "root: ${MAIL_ALIAS_ROOT}" >> ${POSTFIX_FILE_ALIASES}
+
+    # Comment out default aliases for root
+    perl -pi -e 's/^(root:.*)/#${1}/g' ${POSTFIX_FILE_ALIASES}
+
+    if [ ! -z ${MAIL_ALIAS_ROOT} ]; then
+        echo "root: ${MAIL_ALIAS_ROOT}" >> ${POSTFIX_FILE_ALIASES}
+    fi
+    postalias hash:${POSTFIX_FILE_ALIASES} &>/dev/null
 
     postconf -e alias_maps="hash:${POSTFIX_FILE_ALIASES}"
     postconf -e alias_database="hash:${POSTFIX_FILE_ALIASES}"