mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
corrected linting and removed generate ssl bin
This commit is contained in:
parent
0ebb54016d
commit
dc8f49de54
|
@ -11,7 +11,6 @@ This is a list of all configuration files and directories which are optional or
|
||||||
- **sieve-filter:** directory for sieve filter scripts. (Docs: [Sieve][docs-sieve])
|
- **sieve-filter:** directory for sieve filter scripts. (Docs: [Sieve][docs-sieve])
|
||||||
- **sieve-pipe:** directory for sieve pipe scripts. (Docs: [Sieve][docs-sieve])
|
- **sieve-pipe:** directory for sieve pipe scripts. (Docs: [Sieve][docs-sieve])
|
||||||
- **opendkim:** DKIM directory. Auto-configurable via [`setup.sh config dkim`][docs-setupsh]. (Docs: [DKIM][docs-dkim])
|
- **opendkim:** DKIM directory. Auto-configurable via [`setup.sh config dkim`][docs-setupsh]. (Docs: [DKIM][docs-dkim])
|
||||||
- **ssl:** SSL Certificate directory. Auto-configurable via [`setup.sh config ssl`][docs-setupsh]. (Docs: [SSL][docs-ssl])
|
|
||||||
|
|
||||||
## Files
|
## Files
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,6 @@ OPTIONS
|
||||||
|
|
||||||
COMMAND config :=
|
COMMAND config :=
|
||||||
./setup.sh config dkim [ ARGUMENTS... ]
|
./setup.sh config dkim [ ARGUMENTS... ]
|
||||||
./setup.sh config ssl <FQDN> (ATTENTION: This is deprecated and will be removed soon.)
|
|
||||||
|
|
||||||
COMMAND relay :=
|
COMMAND relay :=
|
||||||
./setup.sh relay add-domain <DOMAIN> <HOST> [<PORT>]
|
./setup.sh relay add-domain <DOMAIN> <HOST> [<PORT>]
|
||||||
|
|
38
setup.sh
38
setup.sh
|
@ -163,35 +163,35 @@ ${ORANGE}OPTIONS${RESET}
|
||||||
|
|
||||||
${RED}[${ORANGE}SUB${RED}]${ORANGE}COMMANDS${RESET}
|
${RED}[${ORANGE}SUB${RED}]${ORANGE}COMMANDS${RESET}
|
||||||
${LBLUE}COMMAND${RESET} email ${RED}:=${RESET}
|
${LBLUE}COMMAND${RESET} email ${RED}:=${RESET}
|
||||||
${0} email add <EMAIL ADDRESS> [<PASSWORD>]
|
${0} email ${CYAN}add${RESET} <EMAIL ADDRESS> [<PASSWORD>]
|
||||||
${0} email update <EMAIL ADDRESS> [<PASSWORD>]
|
${0} email ${CYAN}update${RESET} <EMAIL ADDRESS> [<PASSWORD>]
|
||||||
${0} email del [ OPTIONS${RED}...${RESET} ] <EMAIL ADDRESS> [ <EMAIL ADDRESS>${RED}...${RESET} ]
|
${0} email ${CYAN}del${RESET} [ OPTIONS${RED}...${RESET} ] <EMAIL ADDRESS> [ <EMAIL ADDRESS>${RED}...${RESET} ]
|
||||||
${0} email restrict <add${RED}|${RESET}del${RED}|${RESET}list> <send${RED}|${RESET}receive> [<EMAIL ADDRESS>]
|
${0} email ${CYAN}restrict${RESET} <add${RED}|${RESET}del${RED}|${RESET}list> <send${RED}|${RESET}receive> [<EMAIL ADDRESS>]
|
||||||
${0} email list
|
${0} email ${CYAN}list${RESET}
|
||||||
|
|
||||||
${LBLUE}COMMAND${RESET} alias ${RED}:=${RESET}
|
${LBLUE}COMMAND${RESET} alias ${RED}:=${RESET}
|
||||||
${0} alias add <EMAIL ADDRESS> <RECIPIENT>
|
${0} alias ${CYAN}add${RESET} <EMAIL ADDRESS> <RECIPIENT>
|
||||||
${0} alias del <EMAIL ADDRESS> <RECIPIENT>
|
${0} alias ${CYAN}del${RESET} <EMAIL ADDRESS> <RECIPIENT>
|
||||||
${0} alias list
|
${0} alias ${CYAN}list${RESET}
|
||||||
|
|
||||||
${LBLUE}COMMAND${RESET} quota ${RED}:=${RESET}
|
${LBLUE}COMMAND${RESET} quota ${RED}:=${RESET}
|
||||||
${0} quota set <EMAIL ADDRESS> [<QUOTA>]
|
${0} quota ${CYAN}set${RESET} <EMAIL ADDRESS> [<QUOTA>]
|
||||||
${0} quota del <EMAIL ADDRESS>
|
${0} quota ${CYAN}del${RESET} <EMAIL ADDRESS>
|
||||||
|
|
||||||
${LBLUE}COMMAND${RESET} config ${RED}:=${RESET}
|
${LBLUE}COMMAND${RESET} config ${RED}:=${RESET}
|
||||||
${0} config dkim [ ARGUMENTS${RED}...${RESET} ]
|
${0} config ${CYAN}dkim${RESET} [ ARGUMENTS${RED}...${RESET} ]
|
||||||
|
|
||||||
${LBLUE}COMMAND${RESET} relay ${RED}:=${RESET}
|
${LBLUE}COMMAND${RESET} relay ${RED}:=${RESET}
|
||||||
${0} relay add-domain <DOMAIN> <HOST> [<PORT>]
|
${0} relay ${CYAN}add-domain${RESET} <DOMAIN> <HOST> [<PORT>]
|
||||||
${0} relay add-auth <DOMAIN> <USERNAME> [<PASSWORD>]
|
${0} relay ${CYAN}add-auth${RESET} <DOMAIN> <USERNAME> [<PASSWORD>]
|
||||||
${0} relay exclude-domain <DOMAIN>
|
${0} relay ${CYAN}exclude-domain${RESET} <DOMAIN>
|
||||||
|
|
||||||
${LBLUE}COMMAND${RESET} debug ${RED}:=${RESET}
|
${LBLUE}COMMAND${RESET} debug ${RED}:=${RESET}
|
||||||
${0} debug fetchmail
|
${0} debug ${CYAN}fetchmail${RESET}
|
||||||
${0} debug fail2ban [unban <IP>]
|
${0} debug ${CYAN}fail2ban${RESET} [unban <IP>]
|
||||||
${0} debug show-mail-logs
|
${0} debug ${CYAN}show-mail-logs${RESET}
|
||||||
${0} debug inspect
|
${0} debug ${CYAN}inspect${RESET}
|
||||||
${0} debug login <COMMANDS>
|
${0} debug ${CYAN}login${RESET} <COMMANDS>
|
||||||
|
|
||||||
${ORANGE}EXAMPLES${RESET}
|
${ORANGE}EXAMPLES${RESET}
|
||||||
${WHITE}./setup.sh email add test@domain.tld${RESET}
|
${WHITE}./setup.sh email add test@domain.tld${RESET}
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
#! /bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# check if FQDN was passed as arguement in setup.sh
|
|
||||||
if [[ -z ${1} ]]
|
|
||||||
then
|
|
||||||
FQDN="$(hostname --fqdn)"
|
|
||||||
else
|
|
||||||
FQDN="${1}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SSL_CFG_PATH="/tmp/docker-mailserver/ssl"
|
|
||||||
|
|
||||||
if [[ ! -d ${SSL_CFG_PATH} ]]
|
|
||||||
then
|
|
||||||
mkdir --parents "${SSL_CFG_PATH}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "${SSL_CFG_PATH}" || { echo "cd ${SSL_CFG_PATH} error" ; exit ; }
|
|
||||||
|
|
||||||
# Create CA certificate
|
|
||||||
/usr/lib/ssl/misc/CA.pl -newca
|
|
||||||
|
|
||||||
# Create an unpassworded private key and create an unsigned public key certificate
|
|
||||||
openssl req -new -nodes -keyout "${SSL_CFG_PATH}"/"${FQDN}"-key.pem -out "${SSL_CFG_PATH}"/"${FQDN}"-req.pem -days 3652
|
|
||||||
|
|
||||||
# Sign the public key certificate with CA certificate
|
|
||||||
openssl ca -out "${SSL_CFG_PATH}"/"${FQDN}"-cert.pem -infiles "${SSL_CFG_PATH}"/"${FQDN}"-req.pem
|
|
||||||
|
|
||||||
# Combine certificates for courier
|
|
||||||
cat "${SSL_CFG_PATH}"/"${FQDN}"-key.pem "${SSL_CFG_PATH}"/"${FQDN}"-cert.pem > "${SSL_CFG_PATH}"/"${FQDN}"-combined.pem
|
|
Loading…
Reference in a new issue