Skip to content
Snippets Groups Projects
Commit 36f54f6a authored by daniel.pondruff's avatar daniel.pondruff
Browse files

Please enter the commit message for your changes. Lines starting

 with '#' will be ignored, and an empty message aborts the commit.
 On branch 7.10.3
 Your branch is up-to-date with 'origin/7.10.3'.

 Changes to be committed:
	new file:   config/dovecot/etc/dovecot/conf.d/10-auth.conf
	new file:   config/dovecot/etc/dovecot/conf.d/10-logging.conf
	new file:   config/dovecot/etc/dovecot/conf.d/10-mail.conf
	new file:   config/dovecot/etc/dovecot/conf.d/10-master.conf
	new file:   config/dovecot/etc/dovecot/conf.d/10-ssl.conf
	new file:   config/dovecot/etc/dovecot/conf.d/15-lda.conf
	new file:   config/dovecot/etc/dovecot/conf.d/20-imap.conf
	new file:   config/dovecot/etc/dovecot/conf.d/20-lmtp.conf
	new file:   config/dovecot/etc/dovecot/conf.d/20-managesieve.conf
	new file:   config/dovecot/etc/dovecot/conf.d/90-acl.conf
	new file:   config/dovecot/etc/dovecot/conf.d/auth-static.conf.ext
	new file:   config/dovecot/etc/dovecot/dovecot.conf
	new file:   config/dovecot/etc/entrypoint.sh
	new file:   config/dovecot/etc/initial-config.sh
	new file:   config/dovecot/etc/supervisor/conf.d/dovecot.conf
	new file:   config/dovecot/etc/supervisor/conf.d/postfix.conf
	new file:   config/dovecot/etc/supervisor/supervisord.conf
	modified:   features/codecept.sh
	new file:   features/dovecot.sh
	new file:   lib/dovecot.bash
	modified:   setup/install-dovecot.sh

-add dovecot --install, --enable and -disable. now have to remove static entries and replace them with variables.
parent 237adb04
No related branches found
No related tags found
1 merge request!7Issue16 7102
Showing
with 724 additions and 4 deletions
disable_plaintext_auth = no
auth_mechanisms = plain login
!include auth-static.conf.ext
##
## Log destination.
##
# Log file to use for error messages. "syslog" logs to syslog,
# /dev/stderr logs to stderr.
log_path = /var/log/dovecot/error.log
# Log file to use for informational messages. Defaults to log_path.
info_log_path = /var/log/dovecot/info.log
# Log file to use for debug messages. Defaults to info_log_path.
# debug_log_path = /var/log/dovecot/debug.log
# Syslog facility to use if you're logging to syslog. Usually if you don't
# want to use "mail", you'll use local0..local7. Also other standard
# facilities are supported.
#syslog_facility = mail
##
## Logging verbosity and debugging.
##
# Log filter is a space-separated list conditions. If any of the conditions
# match, the log filter matches (i.e. they're ORed together). Parenthesis
# are supported if multiple conditions need to be matched together.
# Supported conditions are:
# event:<name wildcard> - Match event name. '*' and '?' wildcards supported.
# source:<filename>[:<line number>] - Match source code filename [and line]
# field:<key>=<value wildcard> - Match field key to a value. Can be specified
# multiple times to match multiple keys.
# cat[egory]:<value> - Match a category. Can be specified multiple times to
# match multiple categories.
# For example: event:http_request_* (cat:error cat:storage)
# Filter to specify what debug logging to enable. This will eventually replace
# mail_debug and auth_debug settings.
#log_debug =
# Crash after logging a matching event. For example category:error will crash
# any time an error is logged, which can be useful for debugging.
#log_core_filter =
# Log unsuccessful authentication attempts and the reasons why they failed.
# auth_verbose = yes
# In case of password mismatches, log the attempted password. Valid values are
# no, plain and sha1. sha1 can be useful for detecting brute force password
# attempts vs. user simply trying the same password over and over again.
# You can also truncate the value to n chars by appending ":n" (e.g. sha1:6).
#auth_verbose_passwords = no
# Even more verbose logging for debugging purposes. Shows for example SQL
# queries.
#auth_debug = yes
# In case of password mismatches, log the passwords and used scheme so the
# problem can be debugged. Enabling this also enables auth_debug.
#auth_debug_passwords = no
# Enable mail process debugging. This can help you figure out why Dovecot
# isn't finding your mails.
# mail_debug = yes
# Show protocol level SSL errors.
#verbose_ssl = no
# mail_log plugin provides more event logging for mail processes.
#plugin {
# Events to log. Also available: flag_change append
#mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
# Available fields: uid, box, msgid, from, subject, size, vsize, flags
# size and vsize are available only for expunge and copy events.
#mail_log_fields = uid box msgid size
#}
plugin {
mail_log_events = delete undelete expunge copy flag_change append mailbox_delete mailbox_rename
mail_log_fields = uid box msgid size
}
##
## Log formatting.
##
# Prefix for each line written to log file. % codes are in strftime(3)
# format.
#log_timestamp = "%b %d %H:%M:%S "
# Space-separated list of elements we want to log. The elements which have
# a non-empty variable value are joined together to form a comma-separated
# string.
#login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c
# Login log format. %s contains login_log_format_elements string, %$ contains
# the data we want to log.
#login_log_format = %$: %s
# Log prefix for mail processes. See doc/wiki/Variables.txt for list of
# possible variables you can use.
#mail_log_prefix = "%s(%u)<%{pid}><%{session}>: "
# Format to use for logging mail deliveries:
# %$ - Delivery status message (e.g. "saved to INBOX")
# %m / %{msgid} - Message-ID
# %s / %{subject} - Subject
# %f / %{from} - From address
# %p / %{size} - Physical size
# %w / %{vsize} - Virtual size
# %e / %{from_envelope} - MAIL FROM envelope
# %{to_envelope} - RCPT TO envelope
# %{delivery_time} - How many milliseconds it took to deliver the mail
# %{session_time} - How long LMTP session took, not including delivery_time
# %{storage_id} - Backend-specific ID for mail, e.g. Maildir filename
#deliver_log_format = msgid=%m: %$
mail_vsize_bg_after_count = 100
mailbox_list_index = yes
mail_always_cache_fields = body.snippet
mail_location = maildir:~/Maildir
mail_uid = vmail
mail_gid = vmail
mail_plugins = $mail_plugins acl mail_log notify quota old_stats virtual zlib
namespace inbox {
inbox = yes
prefix = INBOX/
separator = /
}
namespace {
type = shared
separator = /
prefix = shared/%%u/
location = maildir:%%h/Maildir:INDEX=%h/shared/%%u:CONTROL=%h/shared/%%u
subscriptions = yes
list = children
}
namespace virtual {
prefix = virtual/
separator = /
hidden = yes
list = no
subscriptions = no
location = virtual:/var/lib/dovecot/virtual:INDEX=~/Maildir/virtual
mailbox all {
special_use = \All
}
}
#service auth {
# unix_listener auth-userdb {
# mode = 0666
# user = vmail
# group = vmail
# }
#}
ssl = no
#ssl_cert = </etc/dovecot/private/dovecot.pem
#ssl_key = </etc/dovecot/private/dovecot.key
#ssl_dh = </usr/share/dovecot/dh.pem
\ No newline at end of file
protocol lda {
mail_plugins = $mail_plugins sieve
}
postmaster_address = invalid@invalid.invalid
imap_capability = +SEARCH=X-MIMEPART XDOVECOT
protocol imap {
mail_plugins = $mail_plugins imap_acl imap_quota imap_old_stats imap_filter_sieve
}
##
## LMTP specific settings
##
# Support proxying to other LMTP/SMTP servers by performing passdb lookups.
#lmtp_proxy = no
# When recipient address includes the detail (e.g. user+detail), try to save
# the mail to the detail mailbox. See also recipient_delimiter and
# lda_mailbox_autocreate settings.
#lmtp_save_to_detail_mailbox = no
# Verify quota before replying to RCPT TO. This adds a small overhead.
#lmtp_rcpt_check_quota = no
# Which recipient address to use for Delivered-To: header and Received:
# header. The default is "final", which is the same as the one given to
# RCPT TO command. "original" uses the address given in RCPT TO's ORCPT
# parameter, "none" uses nothing. Note that "none" is currently always used
# when a mail has multiple recipients.
#lmtp_hdr_delivery_address = final
protocol lmtp {
# Space separated list of plugins to load (default is global mail_plugins).
mail_plugins = $mail_plugins sieve
}
protocols = $protocols sieve
service managesieve-login {
inet_listener sieve {
port = 4190
}
}
\ No newline at end of file
plugin {
acl = vfile
acl_shared_dict = file:/var/lib/dovecot/db/shared-mailboxes.db
}
passdb {
driver = static
args = password=secret
}
userdb {
driver = static
args = uid=vmail gid=vmail home=/home/vmail/%u
}
## Dovecot configuration file
# If you're in a hurry, see http://wiki2.dovecot.org/QuickConfiguration
# "doveconf -n" command gives a clean output of the changed settings. Use it
# instead of copy&pasting files when posting to the Dovecot mailing list.
# '#' character and everything after it is treated as comments. Extra spaces
# and tabs are ignored. If you want to use either of these explicitly, put the
# value inside quotes, eg.: key = "# char and trailing whitespace "
# Most (but not all) settings can be overridden by different protocols and/or
# source/destination IPs by placing the settings inside sections, for example:
# protocol imap { }, local 127.0.0.1 { }, remote 10.0.0.0/8 { }
# Default values are shown for each setting, it's not required to uncomment
# those. These are exceptions to this though: No sections (e.g. namespace {})
# or plugin settings are added by default, they're listed only as examples.
# Paths are also just examples with the real defaults being based on configure
# options. The paths listed here are for configure --prefix=/usr
# --sysconfdir=/etc --localstatedir=/var
# Enable installed protocols
!include_try /usr/share/dovecot/protocols.d/*.protocol
protocols = imap lmtp sieve
# A comma separated list of IPs or hosts where to listen in for connections.
# "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces.
# If you want to specify non-default ports or anything more complex,
# edit conf.d/master.conf.
#listen = *, ::
# Base directory where to store runtime data.
#base_dir = /var/run/dovecot/
# Name of this instance. In multi-instance setup doveadm and other commands
# can use -i <instance_name> to select which instance is used (an alternative
# to -c <config_path>). The instance name is also added to Dovecot processes
# in ps output.
#instance_name = dovecot
# Greeting message for clients.
#login_greeting = Dovecot ready.
# Space separated list of trusted network ranges. Connections from these
# IPs are allowed to override their IP addresses and ports (for logging and
# for authentication checks). disable_plaintext_auth is also ignored for
# these networks. Typically you'd specify your IMAP proxy servers here.
#login_trusted_networks =
# Space separated list of login access check sockets (e.g. tcpwrap)
#login_access_sockets =
# With proxy_maybe=yes if proxy destination matches any of these IPs, don't do
# proxying. This isn't necessary normally, but may be useful if the destination
# IP is e.g. a load balancer's IP.
#auth_proxy_self =
# Show more verbose process titles (in ps). Currently shows user name and
# IP address. Useful for seeing who are actually using the IMAP processes
# (eg. shared mailboxes or if same uid is used for multiple accounts).
#verbose_proctitle = no
# Should all processes be killed when Dovecot master process shuts down.
# Setting this to "no" means that Dovecot can be upgraded without
# forcing existing client connections to close (although that could also be
# a problem if the upgrade is e.g. because of a security fix).
#shutdown_clients = yes
# If non-zero, run mail commands via this many connections to doveadm server,
# instead of running them directly in the same process.
#doveadm_worker_count = 0
# UNIX socket or host:port used for connecting to doveadm server
#doveadm_socket_path = doveadm-server
# Space separated list of environment variables that are preserved on Dovecot
# startup and passed down to all of its child processes. You can also give
# key=value pairs to always set specific settings.
#import_environment = TZ
##
## Dictionary server settings
##
# Dictionary can be used to store key=value lists. This is used by several
# plugins. The dictionary can be accessed either directly or though a
# dictionary server. The following dict block maps dictionary names to URIs
# when the server is used. These can then be referenced using URIs in format
# "proxy::<name>".
dict {
#quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
#expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
}
# Most of the actual configuration gets included below. The filenames are
# first sorted by their ASCII value and parsed in that order. The 00-prefixes
# in filenames are intended to make it easier to understand the ordering.
!include conf.d/*.conf
# A config file can also tried to be included without giving an error if
# it's not found:
!include_try local.conf
#!/bin/bash -e
echo "all arguments: "$@
echo "0: "$0
echo "1: "$1
if [[ -z "${MAIL_DOMAIN}" ]]; then
echo "ERROR: MAIL_DOMAIN parameter not set ... exit ..."
exit 1
fi
# $1 as hostname for this dovecot instance
/etc/initial-config.sh "${MAIL_DOMAIN}"
if [[ "$1" == "bash" ]]; then
echo "Starting interactive shell ..."
bash
echo "Interactive shell stopped."
exit 0;
fi
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
# Tailing dovecot Logs as container output (auth)
tail -F /var/log/dovecot/*.log
#!/bin/bash
set -e
# TODO: .... everything ...
# todo check for $1 and to overwrite the config ...
if [[ -z "${MAIL_DOMAIN}" ]]; then
echo "ERROR: MAIL_DOMAIN parameter not set ... exit ..."
exit 1
fi
if [ ! -f "/etc/dovecot/dovecot.conf" ]; then
# Copy default config
echo "Copying default config from /etc/dovecot.dist"
cp -R /etc/dovecot.dist/* /etc/dovecot/
fi
INIT_STATE_FILE="/etc/dovecot/dovecot-init-done"
if [ ! -f ${INIT_STATE_FILE} ]; then
echo "Executing init-config script (dovecot-backend) "
echo "$0 $@"
echo "Creating user and group: vmail"
groupadd -g 5000 vmail
useradd -u 5000 -g 5000 -m -d /home/vmail -s /bin/false vmail
adduser dovecot vmail
# Create log dir and adjust permissions
mkdir -p /var/log/dovecot
touch /var/log/dovecot/debug.log
touch /var/log/dovecot/info.log
touch /var/log/dovecot/error.log
chown -R vmail:dovecot /var/log/dovecot*
echo "Creating directory for dovecot acl informations"
mkdir -p /var/lib/dovecot/db
chmod 0770 /var/lib/dovecot
echo "Creating dictionary for shared namespace"
touch /var/lib/dovecot/db/shared-mailboxes.db
echo "Creating virtual directories"
mkdir -p /var/lib/dovecot/virtual/all
chmod -R 700 /var/lib/dovecot/virtual
echo "*
-INBOX/Trash
-INBOX/Trash/*
-INBOX/Spam
-INBOX/Spam/*
all" > /var/lib/dovecot/virtual/all/dovecot-virtual
chown -R vmail:vmail /var/lib/dovecot
LDA_PATH="/usr/lib/dovecot/dovecot-lda"
echo "dovecot unix - n n - - pipe" >> /etc/postfix/master.cf
echo " flags=DRhu user=vmail:vmail argv=${LDA_PATH} -f \${sender} -d \${user}" >> /etc/postfix/master.cf
echo "$(date)" > ${INIT_STATE_FILE}
fi
if [[ "${MAIL_DEBUG_LOG}" == "1" ]]; then
echo "Enabling debug logging for dovecot ..."
echo "debug_log_path = /var/log/dovecot/debug.log" >> /etc/dovecot/conf.d/10-logging.conf
echo "auth_verbose = yes" >> /etc/dovecot/conf.d/10-logging.conf
echo "mail_debug = yes" >> /etc/dovecot/conf.d/10-logging.conf
fi
echo "Configure postfix main.cf"
postconf -e "myhostname = dovecot"
postconf -e "smtpd_use_tls = no"
postconf -e "myorigin = \$mydomain"
postconf -e "mydestination = "
postconf -e "relayhost = "\$mydomain
#postconf -e "smtpd_tls_cert_file=${SSL_DIR}/certs/${FQDN}.crt"
#postconf -e "smtpd_tls_key_file=${SSL_DIR}/private/${FQDN}.key"
postconf -e "dovecot_destination_recipient_limit = 1"
postconf -e "virtual_mailbox_domains = ${MAIL_DOMAIN}"
postconf -e "virtual_transport = dovecot"
postconf -e "myorigin = \$mydomain"
postconf -e "mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 ${ENV_SUBNET}"
# set home permissions every time ...
chown -R vmail:vmail /home/vmail
chmod 2770 /home/vmail
[program:dovecot]
command=/usr/sbin/dovecot -c /etc/dovecot/dovecot.conf -F
autorestart=true
user=root ; TODO: switch to dovecot user
\ No newline at end of file
[program:rsyslog]
command=/usr/sbin/rsyslogd -n
[program:postfix]
process_name=postfix
directory=/etc/postfix
command=/usr/sbin/postfix -c /etc/postfix start
autorestart=false ; it will be marked as failed, postfix is running anyway ...
startretries=1
user=root ; TODO: switch to postfix user
[supervisord]
nodaemon=false ; start in background
#nodaemon=true ; start in foreground
[unix_http_server]
file=/var/run/supervisor.sock ; (the path to the socket file)
chmod=0700 ; sockef file mode (default 0700)
[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket
; The [include] section can just contain the "files" setting. This
; setting can list multiple files (separated by whitespace or
; newlines). It can also contain wildcards. The filenames are
; interpreted as relative to this file. Included files *cannot*
; include files themselves.
[include]
files = /etc/supervisor/conf.d/*.conf
\ No newline at end of file
......@@ -114,14 +114,16 @@ git clone --depth 1 -b master https://gitlab.open-xchange.com/frontend/core /op
cd /opt/open-xchange/tests/frontend/ui
npm install -g allure-commandline --save-dev
setOXProperty PROVISIONING_URL "http://localhost/" /opt/open-xchange/tests/frontend/ui/.env
setOXProperty PROVISIONING_URL "http://192.168.33.211/" /opt/open-xchange/tests/frontend/ui/.env
setOXProperty CONTEXT_ID "1337" /opt/open-xchange/tests/frontend/ui/.env
setOXProperty SELENIUM_HOST "localhost" /opt/open-xchange/tests/frontend/ui/.env
setOXProperty LAUNCH_URL "http://localhost/appsuite/" /opt/open-xchange/tests/frontend/ui/.env
setOXProperty PROVISIONING_URL "http://localhost/" /opt/open-xchange/tests/frontend/ui/.env
setOXProperty LAUNCH_URL "http://192.168.33.211/appsuite/" /opt/open-xchange/tests/frontend/ui/.env
setOXProperty SMTP_SERVER "192.168.33.211" /opt/open-xchange/tests/frontend/ui/.env
setOXProperty IMAP_SERVER "192.168.33.211" /opt/open-xchange/tests/frontend/ui/.env
yarn
[ ! "$(docker ps -a | grep "hA4uYS")" ] && docker run --name "hA4uYS" -d -p 4444:4444 -p 5900:5900 -v /dev/shm:/dev/shm selenium/standalone-chrome-debug:latest
yarn e2e --verbose --debug
yarn e2e
elif [[ "${FEATURE_ENABLE}" = false ]]; then
......
#!/bin/bash
#
# Copyright (C) 2019 OX Software GmbH
#
# This file is part of OX Automation.
#
# OX Automation is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OX Automation is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OX Automation. If not, see <http://www.gnu.org/licenses/>.
#
#
# Authors:
# Daniel Pondruff <daniel.pondruffopen-xchange.com>
#
set -e
SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P)"
# sourcing some commonly used functions and executing basic checks
source ${SCRIPT_DIR}/../lib/common.bash
source ${SCRIPT_DIR}/../lib/setup.bash
source ${SCRIPT_DIR}/../lib/dovecot.bash
checkRootPrivileges
detectDistribution
## Help text
show_usage() {
echo -n "
$0 [OPTIONS]
--install
--enable
--disable
--restart
-k | --key <value>
"
}
### reading config from command line; overriding defaults
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-h|--help)
show_usage
exit 0
shift
;;
--debug)
echo "WARNING: Debug flag set (--debug)"
set -x
shift
;;
--enable)
FEATURE_ENABLE=true
shift
;;
--disable)
FEATURE_ENABLE=false
shift
;;
--install)
FEATURE_INSTALL=true
shift
;;
-k|--key)
value="$2"
shift
shift
;;
--restart)
RESTART_OX=true
shift
;;
*) # unknown option
POSITIONAL+=("$1") # save it in an array for later
shift
;;
esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters
if [[ "${FEATURE_INSTALL}" = true ]]; then
installDovecot
INIT_STATE_FILE="/etc/dovecot/dovecot-init-done"
if [ ! -f "/etc/dovecot/dovecot.conf" ]; then
# Copy default config
echo "Copying default config from /etc/dovecot.dist"
cp -R /etc/dovecot.dist/* /etc/dovecot/
fi
if [ ! -f ${INIT_STATE_FILE} ]; then
echo "Executing init-config script (dovecot-backend) "
echo "$0 $@"
echo "Creating user and group: vmail"
groupadd -g 5000 vmail
useradd -u 5000 -g 5000 -m -d /home/vmail -s /bin/false vmail
adduser dovecot vmail
# Create log dir and adjust permissions
mkdir -p /var/log/dovecot
touch /var/log/dovecot/debug.log
touch /var/log/dovecot/info.log
touch /var/log/dovecot/error.log
chown -R vmail:dovecot /var/log/dovecot*
echo "Creating directory for dovecot acl informations"
mkdir -p /var/lib/dovecot/db
chmod 0770 /var/lib/dovecot
echo "Creating dictionary for shared namespace"
touch /var/lib/dovecot/db/shared-mailboxes.db
echo "Creating virtual directories"
mkdir -p /var/lib/dovecot/virtual/all
chmod -R 700 /var/lib/dovecot/virtual
echo "*
-INBOX/Trash
-INBOX/Trash/*
-INBOX/Spam
-INBOX/Spam/*
all" > /var/lib/dovecot/virtual/all/dovecot-virtual
chown -R vmail:vmail /var/lib/dovecot
LDA_PATH="/usr/lib/dovecot/dovecot-lda"
echo "dovecot unix - n n - - pipe" >> /etc/postfix/master.cf
echo " flags=DRhu user=vmail:vmail argv=${LDA_PATH} -f \${sender} -d \${user}" >> /etc/postfix/master.cf
echo "$(date)" > ${INIT_STATE_FILE}
echo "Configure postfix main.cf"
postconf -e "myhostname = dovecot"
postconf -e "smtpd_use_tls = no"
postconf -e "myorigin = \$mydomain"
postconf -e "mydestination = "
postconf -e "relayhost = "\$mydomain
#postconf -e "smtpd_tls_cert_file=${SSL_DIR}/certs/${FQDN}.crt"
#postconf -e "smtpd_tls_key_file=${SSL_DIR}/private/${FQDN}.key"
postconf -e "dovecot_destination_recipient_limit = 1"
postconf -e "virtual_mailbox_domains = ${MAIL_DOMAIN}"
postconf -e "virtual_transport = dovecot"
postconf -e "myorigin = \$mydomain"
postconf -e "mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 ${ENV_SUBNET}"
# set home permissions every time ...
chown -R vmail:vmail /home/vmail
chmod 2770 /home/vmail
fi
elif [[ "${FEATURE_ENABLE}" = true ]]; then
INPUT=${SCRIPT_DIR}/../config/environment/qa/users.csv
OLDIFS=$IFS
IFS=','
[ ! -f $INPUT ] && { echo "$INPUT file not found"; exit 99; }
while read username password
do
if [[ "$username" == "#"* ]]; then
# skipping commented out line
continue
fi
#echo "username : $username"
/opt/open-xchange/sbin/changeuser -u $username -c 10 -A oxadmin -P secret --imapserver "dovecot.qa.open-xchange.com" --smtpserver "dovecot.qa.open-xchange.com"
# echo "password : $password"
done < $INPUT
IFS=$OLDIFS
elif [[ "${FEATURE_ENABLE}" = false ]]; then
INPUT=${SCRIPT_DIR}/../config/environment/qa/users.csv
OLDIFS=$IFS
IFS=','
[ ! -f $INPUT ] && { echo "$INPUT file not found"; exit 99; }
while read username password
do
if [[ "$username" == "#"* ]]; then
# skipping commented out line
continue
fi
#echo "username : $username"
/opt/open-xchange/sbin/changeuser -u $username -c 10 -A oxadmin -P secret --imapserver "localhost" --smtpserver "localhost"
# echo "password : $password"
done < $INPUT
IFS=$OLDIFS
fi
if [[ "${RESTART_OX}" = true ]]; then
restartService dovecot
fi
#
# Copyright (C) 2019 OX Software GmbH
#
# This file is part of OX Automation.
#
# OX Automation is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OX Automation is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OX Automation. If not, see <http://www.gnu.org/licenses/>.
#
#
# Authors:
# Daniel Pondruff <daniel.pondruff@open-xchange.com>
#
# This restarts the provided service name with the configured service managers
function installDovecot {
echo "Add Dovecot Build key & Repo"
wget https://repo.dovecot.org/DOVECOT-REPO-GPG && apt-key add DOVECOT-REPO-GPG && \
echo "deb https://repo.dovecot.org/ce-2.3-latest/debian/stretch stretch main" > /etc/apt/sources.list.d/dovecot.list
echo "Install Dovecot CE packages"
apt-get update && apt-get install -y dovecot-core \
dovecot-imapd \
dovecot-lmtpd \
dovecot-managesieved \
dovecot-sieve \
dovecot-pop3d \
dovecot-ldap \
postfix \
rsyslog
echo "Copy Dovecot Configs"
rm -rf /etc/dovecot/*
cp -R config/dovecot/etc/dovecot/* /etc/dovecot/
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment