Commits

Zhang Huangbin committed eb8fbc9

* Allows plaintext mechanisms only over a TLS-encrypted smtp connection.
* Create Dovecot auth socket as /var/spool/postfix/private/dovecot-auth instead of /var/spool/postfix/dovecot-auth.
* New column for MySQL and PostgreSQL backends: domain.settings: used to store per-domain settings, userd in iRedAdmin-Pro.
* FreeBSD ports tree:
- Spamassassin is now mail/spamassassin.
- Add missing port: www/mod_php5.
* Update Roundcube webmail to the latest 1.0.0.

  • Participants
  • Parent commits fd4bed1

Comments (0)

Files changed (13)

File iRedMail/ChangeLog

 iRedMail-0.9.0:
+    * Allows plaintext mechanisms only over a TLS-encrypted smtp connection.
+    * Create Dovecot auth socket as /var/spool/postfix/private/dovecot-auth
+      instead of /var/spool/postfix/dovecot-auth.
     * Enable LMTP service in Dovecot by default.
       To use LMTP instead of Dovecot LDA as per-domain or per-user local
       deliver agent in Postfix, you need to use one of below:
         - LMTP inet listener: lmtp:inet:127.0.0.1:24
 
     * New columns for MySQL and PostgreSQL backends:
-        + mailbox.enablewebmail: used in Dovecot, so that we can disable
-          IMAP service for certain users, but still allow them to use webmail.
         + mailbox.enablelmtp: used by Dovecot LMTP server.
+        + domain.settings: used to store per-domain settings, userd in
+          iRedAdmin-Pro.
         + mailbox.settings: used to store per-user settings, used in
           iRedAdmin-Pro.
         + admin.settings: used to store per-user settings, used in
 
     * New LDAP attribute/value pairs for mail users:
         + enabledService=lmtp: used by Dovecot LMTP server.
-        + enabledService=webmail-127.0.0.1-imapsecured: used in Dovecot, so
-          that we can disable IMAP service for certain users, but still allow
-          them to use webmail hosted on localhost (127.0.0.1). If you have
-          multiple servers which runs webmail application, add more values
-          like 'enabledService=webmail-xx.xx.xx.xx-imapsecured'.
-
-    * Disable 'smtp_tls_security_level=may', doesn't work very well with
-      self-signed SSL certificate, especially sending email from Gmail.
 
     * Fixed issues:
         + Postfix cannot resolve IP address under chroot on RHEL/CentOS.
+        + FreeBSD ports tree:
+            - Spamassassin is now mail/spamassassin.
+            - Add missing port: www/mod_php5.
+
+    * Updated packages:
+        + Roundcube webmail -> 1.0.0
 
 iRedMail-0.8.6:
     * Works on new Linux/BSD distribution releases:

File iRedMail/conf/roundcube

 # ---------------------------------------
 # RoundcubeMail. http://roundcube.net
 # ---------------------------------------
-export RCM_VERSION='0.9.5'
+export RCM_VERSION='1.0.0'
 export RCM_TARBALL="roundcubemail-${RCM_VERSION}.tar.gz"
 export RCM_USE_SOURCE='YES'
+
 if [ X"${DISTRO}" == X'FREEBSD' -o X"${DISTRO}" == X'OPENBSD' ]; then
     # Install via ports tree or binary package
     export RCM_USE_SOURCE='NO'

File iRedMail/functions/dovecot.sh

     postconf -e dovecot_destination_recipient_limit='1'
 
     postconf -e smtpd_sasl_type='dovecot'
-    # It's '/var/spool/postfix/dovecot-auth'.
-    # Prepend './' to make postfix recognize it as socket path.
-    postconf -e smtpd_sasl_path='./dovecot-auth'
+    postconf -e smtpd_sasl_path='private/dovecot-auth'
 
     ECHO_DEBUG "Create directory for Dovecot plugin: Expire."
     dovecot_expire_dict_dir="$(dirname ${DOVECOT_EXPIRE_DICT_BDB})"

File iRedMail/functions/packages_freebsd.sh

         lang_perl5.18 \
         lang_php5-extensions \
         lang_php5 \
+        www_mod_php5 \
         lang_python27 \
         mail_dovecot2 \
         mail_policyd2 \
         net_openldap${WANT_OPENLDAP_VER}-sasl-client \
         net_openldap${WANT_OPENLDAP_VER}-server \
         net_openslp \
+        net_py-ldap2 \
         security_amavisd-new \
         security_ca_root_nss \
         security_clamav \
     fi
     rm -f /var/db/ports/www_apache${WANT_APACHE_VER}/options${SED_EXTENSION} &>/dev/null
 
-    ALL_PORTS="${ALL_PORTS} www/apache${WANT_APACHE_VER}"
+    ALL_PORTS="${ALL_PORTS} www/apache${WANT_APACHE_VER} www/mod_php5"
     ENABLED_SERVICES="${ENABLED_SERVICES} ${HTTPD_RC_SCRIPT_NAME}"
 
     # PHP5. REQUIRED.
         fi
     fi
 
+    cat > /var/db/ports/www_mod_php5/options <<EOF
+OPTIONS_FILE_UNSET+=AP2FILTER
+OPTIONS_FILE_UNSET+=DEBUG
+OPTIONS_FILE_UNSET+=DTRACE
+OPTIONS_FILE_SET+=IPV6
+OPTIONS_FILE_SET+=MAILHEAD
+OPTIONS_FILE_SET+=LINKTHR
+OPTIONS_FILE_UNSET+=ZTS
+EOF
+
     # Policyd v2.x
     cat > /var/db/ports/mail_policyd2/options <<EOF
 OPTIONS_FILE_UNSET+=MYSQL
         ENABLED_SERVICES="${ENABLED_SERVICES} fail2ban"
     fi
 
+    cat > /var/db/ports/net_py-ldap2/options <<EOF
+OPTIONS_FILE_SET+=SASL
+EOF
+
     # Misc
     ALL_PORTS="${ALL_PORTS} sysutils/logwatch sysutils/logrotate"
 

File iRedMail/functions/postfix.sh

     # References:
     #   - http://www.postfix.org/TLS_README.html#client_tls_may
     #   - http://www.postfix.org/postconf.5.html#smtp_tls_security_level
-    #postconf -e smtp_tls_security_level='may'
+    postconf -e smtp_tls_security_level='may'
     # Use the same CA file as smtpd.
-    #postconf -e smtp_tls_CAfile='$smtpd_tls_CAfile'
-    #postconf -e smtp_tls_loglevel='0'
-    #postconf -e smtp_tls_note_starttls_offer='yes'
+    postconf -e smtp_tls_CAfile='$smtpd_tls_CAfile'
+    postconf -e smtp_tls_loglevel='0'
+    postconf -e smtp_tls_note_starttls_offer='yes'
 
     # Sender restrictions
     postconf -e smtpd_sender_restrictions="permit_mynetworks, reject_sender_login_mismatch, permit_sasl_authenticated"
     postconf -e smtpd_sasl_auth_enable="yes"
     postconf -e smtpd_sasl_local_domain=''
     postconf -e broken_sasl_auth_clients="yes"
-    postconf -e smtpd_sasl_security_options="noanonymous"
+    #postconf -e smtpd_sasl_security_options="noanonymous"
 
-    # Report the SASL authenticated user name in Received message header.
-    # Default is 'no'.
-    postconf -e smtpd_sasl_authenticated_header='no'
+    # allows plaintext mechanisms, but only over a TLS-encrypted connection:
+    postconf -e smtpd_sasl_security_options='noanonymous, noplaintext'
+
+    # offer SASL authentication only after a TLS-encrypted session has been
+    # established
+    postconf -e smtpd_tls_auth_only='yes'
 
     POSTCONF_IREDAPD=''
     if [ X"${USE_IREDAPD}" == X"YES" ]; then

File iRedMail/functions/roundcubemail.sh

         # conf.d/roundcubemail.conf file after upgrade this component.
         ln -s ${RCM_HTTPD_ROOT} ${RCM_HTTPD_ROOT_SYMBOL_LINK} 2>/dev/null
 
+        # Patch for Roundcube 1.0.0:
+        # apply user-spefici replacements to group's base_dn property
+        cd ${RCM_HTTPD_ROOT}
+        patch -p1 < ${PATCH_DIR}/roundcubemail/ldap_group_base_dn_replacement.patch >/dev/null
+
         ECHO_DEBUG "Set correct permission for Roundcubemail: ${RCM_HTTPD_ROOT}."
         chown -R ${SYS_ROOT_USER}:${SYS_ROOT_GROUP} ${RCM_HTTPD_ROOT}
         chown -R ${HTTPD_USER}:${HTTPD_GROUP} ${RCM_HTTPD_ROOT}/{temp,logs}
         chmod 0000 ${RCM_HTTPD_ROOT}/{CHANGELOG,INSTALL,LICENSE,README*,UPGRADING,installer,SQL}
     fi
 
+    # Copy sample config files.
     cd ${RCM_HTTPD_ROOT}/config/
-    cp -f db.inc.php.dist db.inc.php
-    cp -f main.inc.php.dist main.inc.php
+    cp ${SAMPLE_DIR}/roundcubemail/config.inc.php .
     cp -f ${SAMPLE_DIR}/dovecot/dovecot.sieve.roundcube ${RCM_SIEVE_SAMPLE_FILE}
-    chown ${HTTPD_USER}:${HTTPD_GROUP} db.inc.php main.inc.php ${RCM_SIEVE_SAMPLE_FILE}
-    chmod 0640 db.inc.php main.inc.php ${RCM_SIEVE_SAMPLE_FILE}
+    chown ${HTTPD_USER}:${HTTPD_GROUP} config.inc.php ${RCM_SIEVE_SAMPLE_FILE}
+    chmod 0640 config.inc.php ${RCM_SIEVE_SAMPLE_FILE}
 
     echo 'export status_rcm_install="DONE"' >> ${STATUS_FILE}
 }
     fi
 
 
-    # Do not grant privileges while backend is not MySQL.
-    if [ X"${BACKEND}" == X"MYSQL" ]; then
+    # Grant privileges
+    if [ X"${BACKEND}" == X'MYSQL' ]; then
         ${MYSQL_CLIENT_ROOT} <<EOF
 -- Grant privileges for Roundcubemail, so that user can change
 -- their own password and setting mail forwarding.
 
 FLUSH PRIVILEGES;
 EOF
-    else
-        :
     fi
 
     echo 'export status_rcm_import_sql="DONE"' >> ${STATUS_FILE}
 
     cd ${RCM_HTTPD_ROOT}/config/
 
-    export RCM_DB_USER RCM_DB_PASSWD RCMD_DB SQL_SERVER FIRST_DOMAIN
+    #export RCM_DB_USER RCM_DB_PASSWD RCMD_DB SQL_SERVER FIRST_DOMAIN
+    #export RCM_DES_KEY
 
-    perl -pi -e 's#(.*db_dsnw.*= )(.*)#${1}"$ENV{PHP_CONN_TYPE}://$ENV{RCM_DB_USER}:$ENV{RCM_DB_PASSWD}\@$ENV{SQL_SERVER}/$ENV{RCM_DB}";#' db.inc.php
+    perl -pi -e 's#PH_PHP_CONN_TYPE#$ENV{PHP_CONN_TYPE}#g' config.inc.php
+    perl -pi -e 's#PH_RCM_DB_USER#$ENV{RCM_DB_USER}#g' config.inc.php
+    perl -pi -e 's#PH_RCM_DB_PASSWD#$ENV{RCM_DB_PASSWD}#g' config.inc.php
+    perl -pi -e 's#PH_RCM_DB#$ENV{RCM_DB}#g' config.inc.php
+    perl -pi -e 's#PH_SQL_SERVER#$ENV{SQL_SERVER}#g' config.inc.php
 
-    # ----------------------------------
-    # LOGGING/DEBUGGING
-    # ----------------------------------
-    # Logging
-    perl -pi -e 's#(.*log_driver.*=).*#${1} "syslog";#' main.inc.php
-    perl -pi -e 's#(.*syslog_id.*=).*#${1} "roundcube";#' main.inc.php
-    # syslog_facility should be a constant, not string. (Do *NOT* use quote.)
-    perl -pi -e 's#(.*syslog_facility.*=).*#${1} LOG_MAIL;#' main.inc.php
-
-    # Debugging
-    perl -pi -e 's#(.*sql_debug.*=).*#${1} false;#' main.inc.php
-    perl -pi -e 's#(.*imap_debug.*=).*#${1} false;#' main.inc.php
-    perl -pi -e 's#(.*ldap_debug.*=).*#${1} false;#' main.inc.php
-    perl -pi -e 's#(.*smtp_debug.*=).*#${1} false;#' main.inc.php
-
-    # ----------------------------------
-    # IMAP
-    # ----------------------------------
-    export IMAP_SERVER
-    perl -pi -e 's#(.*default_host.*=).*#${1} "$ENV{IMAP_SERVER}";#' main.inc.php
-    #perl -pi -e 's#(.*default_port.*=).*#${1} 143;#' main.inc.php
-    perl -pi -e 's#(.*imap_auth_type.*=).*#${1} "LOGIN";#' main.inc.php
-
-    # IMAP share folder.
-    perl -pi -e 's#(.*imap_delimiter.*=).*#${1} "/";#' main.inc.php
-    perl -pi -e 's#(.*imap_ns_personal.*=).*#${1} null;#' main.inc.php
-    perl -pi -e 's#(.*imap_ns_other.*=).*#${1} null;#' main.inc.php
-    perl -pi -e 's#(.*imap_ns_shared.*=).*#${1} null;#' main.inc.php
-
-    # ----------------------------------
-    # SMTP
-    # ----------------------------------
-    export SMTP_SERVER
-    perl -pi -e 's#(.*smtp_server.*= )(.*)#${1}"$ENV{SMTP_SERVER}";#' main.inc.php
-    #perl -pi -e 's#(.*smtp_port.*= )(.*)#${1} 25;#' main.inc.php
-    perl -pi -e 's#(.*smtp_user.*= )(.*)#${1}"%u";#' main.inc.php
-    perl -pi -e 's#(.*smtp_pass.*= )(.*)#${1}"%p";#' main.inc.php
-
-    # smtp_auth_type: empty to use best server supported one)
-    perl -pi -e 's#(.*smtp_auth_type.*= )(.*)#${1}"LOGIN";#' main.inc.php
-
-    # ----------------------------------
-    # SYSTEM
-    # ----------------------------------
-    # Disable installer.
-    perl -pi -e 's#(.*enable_installer.*=).*#${1} false;#' main.inc.php
-
-    # enable caching of messages and mailbox data in the local database.
-    # recommended if the IMAP server does not run on the same machine
-    #perl -pi -e 's#(.*enable_caching.*= )(.*)#${1}false;#' main.inc.php
-
-    # enforce connections over https
-    # with this option enabled, all non-secure connections will be redirected.
-    perl -pi -e 's#(.*force_https.*= )(.*)#${1}true;#' main.inc.php
-
-    # Allow browser-autocompletion on login form.
-    # 0 - disabled, 1 - username and host only, 2 - username, host, password
-    perl -pi -e 's#(.*login_autocomplete.*=)(.*)#${1} 2;#' main.inc.php
-
-    perl -pi -e 's#(.*ip_check.*=)(.*)#${1} true;#' main.inc.php
-
-    # If users authentication is not case sensitive this must be enabled
-    perl -pi -e 's#(.*login_lc.*=)(.*)#${1} true;#' main.inc.php
-
-    # Automatically create a new ROUNDCUBE USER when log-in the first time.
-    perl -pi -e 's#(.*auto_create_user.*=)(.*)#${1} true;#' main.inc.php
-
-    export RCM_DES_KEY
-    perl -pi -e 's#(.*des_key.*= )(.*)#${1}"$ENV{RCM_DES_KEY}";#' main.inc.php
-
-    # Set useragent, hide version number.
-    perl -pi -e 's#(.*useragent.*=).*#${1} "RoundCube Webmail";#' main.inc.php
-
-    # Set defeault domain.
-    perl -pi -e 's#(.*username_domain.*=)(.*)#${1} "$ENV{FIRST_DOMAIN}";#' main.inc.php
-
-    # Disable multiple identities.
-    # 0 - many identities with possibility to edit all params
-    # 1 - many identities with possibility to edit all params but not email address
-    # 2 - one identity with possibility to edit all params
-    # 3 - one identity with possibility to edit all params but not email address
-    perl -pi -e 's#(.*identities_level.*=).*#${1} 3;#' main.inc.php
-
-    # Spellcheck.
-    perl -pi -e 's#(.*enable_spellcheck.*=).*#${1} false;#' main.inc.php
-
-    # ----------------------------------
-    # PLUGINS
-    # ----------------------------------
-
-    # ----------------------------------
-    # USER INTERFACE
-    # ----------------------------------
-    # Automatic create and protect default IMAP folders.
-    perl -pi -e 's#(.*create_default_folders.*=)(.*)#${1} true;#' main.inc.php
-    perl -pi -e 's#(.*protect_default_folders.*=)(.*)#${1} true;#' main.inc.php
-
-    # Quota zero as unlimited.
-    perl -pi -e 's#(.*quota_zero_as_unlimited.*=).*#${1} true;#' main.inc.php
-
-    # ----------------------------------
-    # USER PREFERENCES
-    # ----------------------------------
-    perl -pi -e 's#(.*default_charset.*=).*#${1} "UTF-8";#' main.inc.php
-    perl -pi -e 's#(.*addressbook_sort_col.*=).*#${1} "name";#' main.inc.php
-
-    # display remote inline images
-    # 0 - Never, always ask
-    # 1 - Ask if sender is not in address book
-    # 2 - Always show inline images
-    perl -pi -e 's#(.*show_images.*=).*#${1} 1;#' main.inc.php
-
-    # save compose message every 60 seconds (1 minute)
-    perl -pi -e 's#(.*draft_autosave.*=).*#${1} 60;#' main.inc.php
-
-    # Enable preview pane by default.
-    perl -pi -e 's#(.*preview_pane.*=).*#${1} true;#' main.inc.php
-
-    # Mark as read when viewed in preview pane (delay in seconds)
-    # Set to -1 if messages in preview pane should not be marked as read
-    perl -pi -e 's#(.*preview_pane_mark_read.*=).*#${1} 0;#' main.inc.php
-
-    # Encoding of long/non-ascii attachment names:
-    # 0 - Full RFC 2231 compatible
-    # 1 - RFC 2047 for 'name' and RFC 2231 for 'filename' parameter (Thunderbird's default)
-    # 2 - Full 2047 compatible
-    perl -pi -e 's#(.*mime_param_folding.*=).*#${1} 1;#' main.inc.php
-
-    # Auto expand threads.
-    # 0 - Do not expand threads
-    # 1 - Expand all threads automatically
-    # 2 - Expand only threads with unread messages
-    perl -pi -e 's#(.*autoexpand_threads.*=).*#${1} 2;#' main.inc.php
-
-    # Set true if deleted messages should not be displayed
-    # This will make the application run slower
-    #perl -pi -e 's#(.*skip_deleted.*=).*#${1} true;#' main.inc.php
-
-    # Check all folders for recent messages.
-    perl -pi -e 's#(.*check_all_folders.*=)(.*)#${1} true;#' main.inc.php
-
-    # after message delete/move, the next message will be displayed
-    perl -pi -e 's#(.*display_next.*=).*#${1} true;#' main.inc.php
+    perl -pi -e 's#PH_SMTP_SERVER#$ENV{SMTP_SERVER}#g' config.inc.php
+    perl -pi -e 's#PH_RCM_DES_KEY#$ENV{RCM_DES_KEY}#g' config.inc.php
+    perl -pi -e 's#PH_FIRST_DOMAIN#$ENV{FIRST_DOMAIN}#g' config.inc.php
 
     if [ X"${BACKEND}" == X'OPENLDAP' ]; then
         export LDAP_SERVER_HOST LDAP_SERVER_PORT LDAP_BIND_VERSION LDAP_BASEDN LDAP_ATTR_DOMAIN_RDN LDAP_ATTR_USER_RDN
         cd ${RCM_HTTPD_ROOT}/config/
         ECHO_DEBUG "Setting global LDAP address book in Roundcube."
 
-        # Remove PHP end of file mark first.
-        cd ${RCM_HTTPD_ROOT}/config/ && perl -pi -e 's#\?\>##' main.inc.php
-
-        cat >> main.inc.php <<EOF
-// ----------------------------------
-// ADDRESSBOOK SETTINGS
-// ----------------------------------
+        cat >> config.inc.php <<EOF
 // Global LDAP address book.
-\$rcmail_config['ldap_public']["ldap_global"] = array(
+\$rcmail_config['ldap_public']["global_ldap_abook"] = array(
     'name'          => 'Global LDAP Address Book',
     'hosts'         => array('${LDAP_SERVER_HOST}'),
     'port'          => ${LDAP_SERVER_PORT},
     'use_tls'       => false,
     'ldap_version'  => '${LDAP_BIND_VERSION}',
-    'user_specific' => true, // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login.
+    'network_timeout' => 10,
+    'user_specific' => true,
 
-    // Search accounts in the same domain.
+    // Search mail users under same domain.
     'base_dn'       => '${LDAP_ATTR_DOMAIN_RDN}=%d,${LDAP_BASEDN}',
     'bind_dn'       => '${LDAP_ATTR_USER_RDN}=%u@%d,${LDAP_ATTR_GROUP_RDN}=${LDAP_ATTR_GROUP_USERS},${LDAP_ATTR_DOMAIN_RDN}=%d,${LDAP_BASEDN}',
 
     'hidden'        => false,
     'searchonly'    => false,
     'writable'      => false,
+
     'search_fields' => array('mail', 'cn', 'sn', 'givenName', 'street', 'telephoneNumber', 'mobile', 'stree', 'postalCode'),
 
     // mapping of contact fields to directory attributes
-    //   for every attribute one can specify the number of values (limit) allowed.
-    //   default is 1, a wildcard * means unlimited
     'fieldmap' => array(
-        // Roundcube  => LDAP:limit
         'name'        => 'cn',
         'surname'     => 'sn',
         'firstname'   => 'givenName',
         'phone:mobile' => 'mobile',
         'street'      => 'street',
         'zipcode'     => 'postalCode',
-        //'region'      => 'st',
         'locality'    => 'l',
         'department'  => 'departmentNumber',
         'notes'       => 'description',
-        // these currently don't work:
-        //'phone:workfax' => 'facsimileTelephoneNumber',
-        //'photo'        => 'jpegPhoto',
-        //'organization' => 'o',
-        //'manager'      => 'manager',
-        //'assistant'    => 'secretary',
+        'name'        => 'cn',
+        'surname'     => 'sn',
+        'firstname'   => 'givenName',
+        'title'       => 'title',
+        'email'       => 'mail:*',
+        'phone:work'  => 'telephoneNumber',
+        'phone:mobile' => 'mobile',
+        'phone:workfax' => 'facsimileTelephoneNumber',
+        'street'      => 'street',
+        'zipcode'     => 'postalCode',
+        'locality'    => 'l',
+        'department'  => 'departmentNumber',
+        'notes'       => 'description',
+        'photo'       => 'jpegPhoto',
     ),
     'sort'          => 'cn',
     'scope'         => 'sub',
     'sizelimit'     => '0',     // Enables you to limit the count of entries fetched. Setting this to 0 means no limit.
     'timelimit'     => '0',     // Sets the number of seconds how long is spend on the search. Setting this to 0 means no limit.
     'referrals'     => false,  // Sets the LDAP_OPT_REFERRALS option. Mostly used in multi-domain Active Directory setups
+
+    'group_filters' => array(
+        'departments' => array(
+            'name'    => 'Mailing Lists',
+            'scope'   => 'sub',
+            'base_dn' => '${LDAP_ATTR_DOMAIN_RDN}=%d,${LDAP_BASEDN}',
+            'filter'  => '(&(objectclass=mailList)(accountStatus=active)(enabledService=${LDAP_SERVICE_DISPLAYED_IN_ADDRBOOK}))',
+            'name_attr' => 'cn',
+            'email'     => 'mail',
+        ),
+    ),
 );
-
-// end of config file
-?>
 EOF
 
         # Store contacts in personal ldap address book.
         #perl -pi -e 's#(.*address_book_type.*=)(.*)#${1} "ldap";#' main.inc.php
 
         # Enable autocomplete for all address books.
-        perl -pi -e 's#(.*autocomplete_addressbooks.*=)(.*)#${1} array("sql", "ldap_global");#' main.inc.php
+        perl -pi -e 's#(.*autocomplete_addressbooks.*=)(.*)#${1} array("sql", "ldap_global");#' config.inc.php
         # Address template.
         # LDAP object class 'inetOrgPerson' doesn't contains country and region.
-        perl -pi -e 's#(.*address_template.*=)(.*)#${1} "{street}<br/>{locality} {zipcode}";#' main.inc.php
+        perl -pi -e 's#(.*address_template.*=)(.*)#${1} "{street}<br/>{locality} {zipcode}";#' config.inc.php
     fi
 
     # Attachment size.
 
 rcm_plugin_managesieve()
 {
-    ECHO_DEBUG "Enable and config plugin: managesieve."
-    cd ${RCM_HTTPD_ROOT}/config/ && \
-    perl -pi -e 's#(.*rcmail_config.*plugins.*=.*array\()(.*)#${1}"managesieve",${2}#' main.inc.php
+    ECHO_DEBUG "Config plugin: managesieve."
+    cd ${RCM_HTTPD_ROOT}/config/
 
     export MANAGESIEVE_BIND_HOST MANAGESIEVE_PORT RCM_SIEVE_SAMPLE_FILE
     cd ${RCM_HTTPD_ROOT}/plugins/managesieve/ && \
 rcm_plugin_password()
 {
     ECHO_DEBUG "Enable and config plugin: password."
-    cd ${RCM_HTTPD_ROOT}/config/ && \
-    perl -pi -e 's#(.*rcmail_config.*plugins.*=.*array\()(.*\).*)#${1}"password",${2}#' main.inc.php
+    cd ${RCM_HTTPD_ROOT}/config/
 
     cd ${RCM_HTTPD_ROOT}/plugins/password/ && \
         cp config.inc.php.dist config.inc.php

File iRedMail/pkgs/MD5.misc

 43a0a3653d17fed5a79fa871a631e094  misc/phpMyAdmin-4.0.10-all-languages.tar.bz2
 af334b09d503e0257080928eb8666837  misc/iRedAPD-1.4.2.tar.bz2
 ad8f05cef0c443d9ce2940bf36319c24  misc/phpPgAdmin-5.1.tar.bz2
-757f6ab3306d4abf8da6664ae65138d7  misc/roundcubemail-0.9.5.tar.gz
+325f79deeadb8993ca8a20f0077f2535  misc/roundcubemail-1.0.0.tar.gz

File iRedMail/pkgs/MD5.openbsd

 0c3406444444c15d1c76a38500693a1c  misc/iRedAdmin-0.3.tar.bz2
 af334b09d503e0257080928eb8666837  misc/iRedAPD-1.4.2.tar.bz2
-757f6ab3306d4abf8da6664ae65138d7  misc/roundcubemail-0.9.5.tar.gz
+325f79deeadb8993ca8a20f0077f2535  misc/roundcubemail-1.0.0.tar.gz

File iRedMail/samples/dovecot/dovecot2.conf

 #default_process_limit = 100
 
 service auth {
-    unix_listener PH_POSTFIX_CHROOT_DIR/dovecot-auth {
+    unix_listener PH_POSTFIX_CHROOT_DIR/private/dovecot-auth {
         user = PH_DOVECOT_AUTH_USER
         group = PH_DOVECOT_AUTH_GROUP
         mode = 0666

File iRedMail/samples/dovecot/dovecot22.conf

 #default_process_limit = 100
 
 service auth {
-    unix_listener PH_POSTFIX_CHROOT_DIR/dovecot-auth {
+    unix_listener PH_POSTFIX_CHROOT_DIR/private/dovecot-auth {
         user = PH_DOVECOT_AUTH_USER
         group = PH_DOVECOT_AUTH_GROUP
         mode = 0666

File iRedMail/samples/iredmail.mysql

     defaultlanguage VARCHAR(5) NOT NULL DEFAULT 'en_US',
     -- Default quota size for newly created mail account.
     defaultuserquota BIGINT(20) NOT NULL DEFAULT '1024',
+    -- Store per-domain settings. Used in iRedAdmin-Pro.
+    settings TEXT,
     -- List of mail alias addresses assigned to newly created user.
     defaultuseraliases TEXT,
     -- Disabled domain profiles which can not be viewed and updated by normal

File iRedMail/samples/iredmail.pgsql

     defaultlanguage VARCHAR(5) NOT NULL DEFAULT 'en_US',
     -- Default quota size for newly created mail account.
     defaultuserquota INT8 NOT NULL DEFAULT '1024',
+    -- Store per-domain settings. Used in iRedAdmin-Pro.
+    settings TEXT NOT NULL DEFAULT '',
     -- List of mail alias addresses assigned to newly created user.
     defaultuseraliases TEXT NOT NULL DEFAULT '',
     -- Disabled domain profiles which can not be viewed and updated by normal

File iRedMail/samples/roundcubemail/config.inc.php

+<?php
+
+// SQL DATABASE
+$config['db_dsnw'] = 'PH_PHP_CONN_TYPE://PH_RCM_DB_USER:PH_RCM_DB_PASSWD@PH_SQL_SERVER/PH_RCM_DB';
+
+// LOGGING
+$config['log_driver'] = 'syslog';
+$config['syslog_facility'] = LOG_MAIL;
+
+// IMAP
+//$config['default_host'] = 'localhost';
+//$config['default_port'] = 143;
+$config['imap_auth_type'] = 'LOGIN';
+$config['imap_delimiter'] = '/';
+
+// SMTP
+$config['smtp_server'] = 'PH_SMTP_SERVER';
+//$config['smtp_port'] = 25;
+$config['smtp_user'] = '%u';
+$config['smtp_pass'] = '%p';
+$config['smtp_auth_type'] = 'LOGIN';
+
+// SYSTEM
+$config['force_https'] = true;
+$config['login_autocomplete'] = 2;
+$config['ip_check'] = true;
+$config['des_key'] = 'PH_RCM_DES_KEY';
+$config['useragent'] = 'Roundcube Webmail'; // Hide version number
+//$config['username_domain'] = 'PH_FIRST_DOMAIN';
+$config['identities_level'] = 3;
+
+// USER INTERFACE
+$config['create_default_folders'] = true;
+$config['quota_zero_as_unlimited'] = true;
+
+// USER PREFERENCES
+$config['default_charset'] = 'UTF-8';
+//$config['addressbook_sort_col'] = 'name';
+$config['draft_autosave'] = 60;
+$config['preview_pane'] = true;
+$config['autoexpand_threads'] = 2;
+$config['check_all_folders'] = true;
+
+// PLUGINS
+$config['plugins'] = array('managesieve', 'password');
+