Changeset View
Changeset View
Standalone View
Standalone View
docker/kolab/guam.conf
- This file was moved from docker/kolab/utils/10-change-port-numbers.sh.
Property | Old Value | New Value |
---|---|---|
File Mode | 100755 | 100644 |
#!/bin/bash | |||||
cat ${SSL_CERTIFICATE} ${SSL_CERTIFICATE_FULLCHAIN} ${SSL_CERTIFICATE_KEY} > /etc/pki/cyrus-imapd/cyrus-imapd.bundle.pem | |||||
chown cyrus:mail /etc/pki/cyrus-imapd/cyrus-imapd.bundle.pem | |||||
cp /etc/pki/cyrus-imapd/cyrus-imapd.bundle.pem /etc/pki/tls/private/postfix.pem | |||||
chown postfix:mail /etc/pki/tls/private/postfix.pem | |||||
chmod 655 /etc/pki/tls/private/postfix.pem | |||||
sed -i "s/tls_server_cert:.*/tls_server_cert: \/etc\/pki\/cyrus-imapd\/cyrus-imapd.bundle.pem/" /etc/imapd.conf | |||||
sed -i "s/tls_server_key:.*/tls_server_key: \/etc\/pki\/cyrus-imapd\/cyrus-imapd.bundle.pem/" /etc/imapd.conf | |||||
sed -i "s/tls_server_ca_file:.*/tls_server_ca_file: \/etc\/pki\/cyrus-imapd\/cyrus-imapd.bundle.pem/" /etc/imapd.conf | |||||
sed -i "s/smtpd_tls_key_file =.*/smtpd_tls_key_file = \/etc\/pki\/tls\/private\/postfix.pem/" /etc/postfix/main.cf | |||||
sed -i "s/smtpd_tls_cert_file =.*/smtpd_tls_cert_file = \/etc\/pki\/tls\/private\/postfix.pem/" /etc/postfix/main.cf | |||||
sed -i -r \ | |||||
-e '/allowplaintext/ a\ | |||||
guam_allowplaintext: yes' \ | |||||
-e '/allowplaintext/ a\ | |||||
nginx_allowplaintext: yes' \ | |||||
/etc/imapd.conf | |||||
sed -i \ | |||||
-e '/SERVICES/ a\ | |||||
nginx cmd="imapd" listen=127.0.0.1:12143 prefork=1' \ | |||||
-e '/SERVICES/ a\ | |||||
guam cmd="imapd" listen=127.0.0.1:13143 prefork=1' \ | |||||
-e '/SERVICES/ a\ | |||||
imap cmd="imapd" listen=127.0.0.1:11143 prefork=1' \ | |||||
-e 's/listen="127.0.0.1:9993"/listen=127.0.0.1:11993/g' \ | |||||
/etc/cyrus.conf | |||||
systemctl restart cyrus-imapd | |||||
# Remove the submission block, by matching from submission until the next empty line | |||||
sed -i -e '/submission inet/,/^$/d' /etc/postfix/master.cf | |||||
# Insert a new submission block with a modified port | |||||
cat >> /etc/postfix/master.cf << EOF | |||||
127.0.0.1:10587 inet n - n - - smtpd | |||||
-o cleanup_service_name=cleanup_submission | |||||
-o syslog_name=postfix/submission | |||||
#-o smtpd_tls_security_level=encrypt | |||||
-o smtpd_sasl_auth_enable=yes | |||||
-o smtpd_sasl_authenticated_header=yes | |||||
-o smtpd_client_restrictions=permit_sasl_authenticated,reject | |||||
-o smtpd_data_restrictions=\$submission_data_restrictions | |||||
-o smtpd_recipient_restrictions=\$submission_recipient_restrictions | |||||
-o smtpd_sender_restrictions=\$submission_sender_restrictions | |||||
127.0.0.1:10465 inet n - n - - smtpd | |||||
-o cleanup_service_name=cleanup_submission | |||||
-o rewrite_service_name=rewrite_submission | |||||
-o syslog_name=postfix/smtps | |||||
-o mydestination= | |||||
-o local_recipient_maps= | |||||
-o relay_domains= | |||||
-o relay_recipient_maps= | |||||
#-o smtpd_tls_wrappermode=yes | |||||
-o smtpd_sasl_auth_enable=yes | |||||
-o smtpd_sasl_authenticated_header=yes | |||||
-o smtpd_client_restrictions=permit_sasl_authenticated,reject | |||||
-o smtpd_sender_restrictions=\$submission_sender_restrictions | |||||
-o smtpd_recipient_restrictions=\$submission_recipient_restrictions | |||||
-o smtpd_data_restrictions=\$submission_data_restrictions | |||||
EOF | |||||
systemctl restart postfix | |||||
cat > /etc/guam/sys.config << EOF | |||||
%% Example configuration for Guam. | |||||
[ | [ | ||||
{ | { | ||||
kolab_guam, [ | kolab_guam, [ | ||||
{ | { | ||||
imap_servers, [ | imap_servers, [ | ||||
{ | { | ||||
imap, [ | imap, [ | ||||
{ host, "127.0.0.1" }, | { host, "127.0.0.1" }, | ||||
▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | %% SASL config | ||||
{ sasl_error_logger, { file, "log/sasl-error.log" } }, | { sasl_error_logger, { file, "log/sasl-error.log" } }, | ||||
{ errlog_type, error }, | { errlog_type, error }, | ||||
{ error_logger_mf_dir, "log/sasl" }, % Log directory | { error_logger_mf_dir, "log/sasl" }, % Log directory | ||||
{ error_logger_mf_maxbytes, 10485760 }, % 10 MB max file size | { error_logger_mf_maxbytes, 10485760 }, % 10 MB max file size | ||||
{ error_logger_mf_maxfiles, 5 } % 5 files max | { error_logger_mf_maxfiles, 5 } % 5 files max | ||||
] | ] | ||||
} | } | ||||
]. | ]. | ||||
EOF | |||||
systemctl restart guam |