Commits

Zhang Huangbin  committed 72b5cc9

Use submission (port 587) in Roundcube for sending email.

  • Participants
  • Parent commits eb8fbc9

Comments (0)

Files changed (5)

File iRedMail/ChangeLog

 iRedMail-0.9.0:
-    * Allows plaintext mechanisms only over a TLS-encrypted smtp connection.
+    * Allows sasl authentication 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.

File iRedMail/conf/roundcube

 export RCM_TARBALL="roundcubemail-${RCM_VERSION}.tar.gz"
 export RCM_USE_SOURCE='YES'
 
-if [ X"${DISTRO}" == X'FREEBSD' -o X"${DISTRO}" == X'OPENBSD' ]; then
+if [ X"${DISTRO}" == X'FREEBSD' ]; then
     # Install via ports tree or binary package
     export RCM_USE_SOURCE='NO'
 fi
     if [ X"${DISTRO}" == X'FREEBSD' ]; then
         export RCM_HTTPD_ROOT="${HTTPD_SERVERROOT}/roundcube"
         export RCM_HTTPD_ROOT_SYMBOL_LINK="${RCM_HTTPD_ROOT}"
-    elif [ X"${DISTRO}" == X'OPENBSD' ]; then
-        export RCM_HTTPD_ROOT="${HTTPD_SERVERROOT}/roundcubemail"
-        export RCM_HTTPD_ROOT_SYMBOL_LINK="${RCM_HTTPD_ROOT}"
+    #elif [ X"${DISTRO}" == X'OPENBSD' ]; then
+    #    export RCM_HTTPD_ROOT="${HTTPD_SERVERROOT}/roundcubemail"
+    #    export RCM_HTTPD_ROOT_SYMBOL_LINK="${RCM_HTTPD_ROOT}"
     fi
 fi
 

File iRedMail/functions/postfix.sh

     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"
-
-    # allows plaintext mechanisms, but only over a TLS-encrypted connection:
-    postconf -e smtpd_sasl_security_options='noanonymous, noplaintext'
+    postconf -e smtpd_sasl_security_options="noanonymous"
 
     # offer SASL authentication only after a TLS-encrypted session has been
     # established

File iRedMail/functions/roundcubemail.sh

 
         cat >> config.inc.php <<EOF
 // Global LDAP address book.
-\$rcmail_config['ldap_public']["global_ldap_abook"] = array(
+\$config['ldap_public']["global_ldap_abook"] = array(
     'name'          => 'Global LDAP Address Book',
     'hosts'         => array('${LDAP_SERVER_HOST}'),
     'port'          => ${LDAP_SERVER_PORT},
         ),
     ),
 );
+\$config['autocomplete_addressbooks'] = array('sql', 'global_ldap_abook');
 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");#' 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}";#' config.inc.php
     fi
 
     # Attachment size.
 \$rcmail_config['password_query'] = "SELECT * from dblink_exec(E'host=\'${SQL_SERVER}\' user=\'${RCM_DB_USER}\' password=\'${RCM_DB_PASSWD}\' dbname=\'${VMAIL_DB}\'', E'UPDATE mailbox SET password=%c,passwordlastchange=NOW() WHERE username=%u')";
 EOF
 
-        #perl -pi -e 's#(.*password_query.*)##' config.inc.php.tmp
         sed '1,/password_query/d' config.inc.php.dist >> config.inc.php.tmp
         rm -f config.inc.php &>/dev/null && \
             mv config.inc.php.tmp config.inc.php

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

 $config['syslog_facility'] = LOG_MAIL;
 
 // IMAP
-//$config['default_host'] = 'localhost';
-//$config['default_port'] = 143;
+$config['default_host'] = '127.0.0.1';
+$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_server'] = 'tls://PH_SMTP_SERVER';
+$config['smtp_port'] = 587;
 $config['smtp_user'] = '%u';
 $config['smtp_pass'] = '%p';
 $config['smtp_auth_type'] = 'LOGIN';