diff --git a/apps/billion-mail/4.6.1/.env.simple b/apps/billion-mail/4.6.1/.env.simple new file mode 100644 index 000000000..97f3792e4 --- /dev/null +++ b/apps/billion-mail/4.6.1/.env.simple @@ -0,0 +1,52 @@ +# Default Billion Mail Username password +ADMIN_USERNAME=billion +ADMIN_PASSWORD=billion + +# Manage Safe entrance +SafePath=billion + +# BILLIONMAIL_HOSTNAME configuration, Postfix myhostname configuration +BILLIONMAIL_HOSTNAME=mail.example.com + +# pgsql NAME and USER and PASSWORD configuration + +DBNAME=billionmail +DBUSER=billionmail +DBPASS=NauF7ysRYyt9HTOiOn4JjIAL3QcRZnzj + +# REDIS PASSWORD configuration +REDISPASS=zKLnZQr3riFpcS2lEy3MOtfncztaCGKp + + +## MAIL Ports +SMTP_PORT=25 +SMTPS_PORT=465 +SUBMISSION_PORT=587 +IMAP_PORT=143 +IMAPS_PORT=993 +POP_PORT=110 +POPS_PORT=995 +REDIS_PORT=127.0.0.1:26379 +SQL_PORT=127.0.0.1:25432 + +## Manage Ports +HTTP_PORT=80 +HTTPS_PORT=443 + +# You can use this script to set the time zone for your container. +# See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for a list of timezones" +# echo -e "Use a column named "TZ identifier" + note the column named "Notes"" + +TZ=Etc/UTC + +# Default containers IPV4 intranet segment +IPV4_NETWORK=172.66.1 + +# Enable fail2ban Access restrictions, specify that the IP exceeds the access limit +FAIL2BAN_INIT=y + +# Console ip whitelist Disabled:false Enabled:true +IP_WHITELIST_ENABLE=false + +# Number of days to keep log backup +RETENTION_DAYS=7 \ No newline at end of file diff --git a/apps/billion-mail/4.6.1/data.yml b/apps/billion-mail/4.6.1/data.yml new file mode 100644 index 000000000..2fae1e9b0 --- /dev/null +++ b/apps/billion-mail/4.6.1/data.yml @@ -0,0 +1,254 @@ +additionalProperties: + formFields: + - default: ./data/billionmail + envKey: CORE_DATA_PATH + label: + en: Core service data path + zh: Core 数据持久化 + required: true + type: text + edit: true + rule: paramCommon + + - default: ./data/rspamd + envKey: RSPAMD_DATA_PATH + label: + en: Rspamd service data path + zh: Rspamd 数据持久化 + required: true + type: text + edit: true + rule: paramCommon + + - default: ./data/dovecot + envKey: DOCECOT_DATA_PATH + label: + en: Dovecot (IMAP/POP3) service data path + zh: Dovecot (IMAP/POP3) 数据持久化 + required: true + type: text + edit: true + rule: paramCommon + + - default: ./data/postfix + envKey: POSTFIX_DATA_PATH + label: + en: Postfix (SMTP) service data path + zh: Postfix (SMTP) 数据持久化 + required: true + type: text + edit: true + rule: paramCommon + + - default: ./data/roundcube + envKey: ROUNDCUBE_DATA_PATH + label: + en: Roundcube service data path + zh: Roundcube 数据持久化 + required: true + type: text + edit: true + rule: paramCommon + + - default: "80" + envKey: HTTP_PORT + label: + en: HTTP PORT + zh: HTTP 端口 + required: true + type: number + edit: true + rule: paramPort + + - default: "443" + envKey: HTTPS_PORT + label: + en: HTTPS PORT + zh: HTTPS 端口 + required: true + type: number + edit: true + rule: paramPort + + - default: "143" + envKey: IMAP_PORT + label: + en: IMAP PORT + zh: IMAP 端口 + required: true + type: number + edit: true + rule: paramPort + + - default: "993" + envKey: IMAPS_PORT + label: + en: IMAPS PORT + zh: IMAPS 端口 + required: true + type: number + edit: true + rule: paramPort + + - default: "110" + envKey: POP_PORT + label: + en: POP PORT + zh: POP 端口 + required: true + type: number + edit: true + rule: paramPort + + - default: "995" + envKey: POPS_PORT + label: + en: POPS PORT + zh: POPS 端口 + required: true + type: number + edit: true + rule: paramPort + + - default: "25" + envKey: SMTP_PORT + label: + en: SMTP PORT + zh: SMTP 端口 + required: true + type: number + edit: true + rule: paramPort + + - default: "465" + envKey: SMTPS_PORT + label: + en: SMTPS PORT + zh: SMTPS 端口 + required: true + type: number + edit: true + rule: paramPort + + - default: "587" + envKey: SUBMISSION_PORT + label: + en: SUBMISSION PORT + zh: SUBMISSION 端口 + required: true + type: number + edit: true + rule: paramPort + + - default: 127.0.0.1:5432 + envKey: SQL_PORT + label: + en: Postgres DB Address Port + zh: Postgres DB 地址端口 + required: true + type: text + edit: true + + - default: DB_BILLIONMAIL + envKey: DBNAME + label: + en: Postgres DB Name + zh: Postgres 数据库名 + required: true + type: text + edit: true + + - default: BILLIONMAIL + envKey: DBUSER + label: + en: Postgres DB User Name + zh: Postgres 数据库用户名 + required: true + type: text + edit: true + + - default: BILLIONMAIL_ + envKey: DBPASS + label: + en: Postgres DB Password + zh: Postgres 数据库密码 + required: true + type: password + edit: true + rule: paramComplexity + random: true + + - default: 127.0.0.1:6379 + envKey: REDIS_PORT + label: + en: REDIS Address Port + zh: REDIS 地址端口 + required: true + type: text + edit: true + + - default: REDISPASS_ + envKey: REDISPASS + label: + en: Redis Password + zh: Redis 密码 + required: true + type: password + edit: true + rule: paramComplexity + random: true + + - default: mail.example.com + envKey: BILLIONMAIL_HOSTNAME + label: + en: Billionmail myhostname + zh: Billionmail 邮箱域 + required: true + type: text + edit: true + + - default: "False" + envKey: IP_WHITELIST_ENABLE + label: + en: Console ip whitelist + zh: 控制台 ip 白名单 + required: false + type: select + edit: true + values: + - label: "True" + value: "true" + - label: "False" + value: "false" + + - default: "7" + envKey: RETENTION_DAYS + label: + en: Number of days to keep log backup + zh: 保留日志备份的天数 + required: false + type: text + edit: true + + - default: y + envKey: FAIL2BAN_INIT + label: + en: Enable fail2ban Access restrictions + zh: 启用fail2ban访问限制 + required: false + type: select + edit: true + values: + - label: "Yes" + value: "y" + - label: "No" + value: "n" + + - default: Etc/UTC + envKey: TZ + label: + en: Time Zone (TZ identifier) + zh: 时区 (时区标识符) + required: false + type: text + edit: true diff --git a/apps/billion-mail/4.6.1/docker-compose.yml b/apps/billion-mail/4.6.1/docker-compose.yml new file mode 100644 index 000000000..274dc9be2 --- /dev/null +++ b/apps/billion-mail/4.6.1/docker-compose.yml @@ -0,0 +1,158 @@ +name: billionmail + +services: + core-billionmail: + image: billionmail/core:4.6.1 + container_name: ${CONTAINER_NAME} + hostname: billionmail-core-manage + volumes: + - ${CORE_DATA_PATH}/ssl:/etc/ssl/mail + - ${CORE_DATA_PATH}/ssl-self-signed:/etc/ssl/ssl-self-signed + - ${CORE_DATA_PATH}/conf/core/fail2ban/filter.d:/etc/fail2ban/filter.d + - ${CORE_DATA_PATH}/conf/core/fail2ban/jail.d:/etc/fail2ban/jail.d + - ${CORE_DATA_PATH}/logs/fail2ban:/var/log/fail2ban + - ${CORE_DATA_PATH}/postgresql-socket:/opt/billionmail/postgresql-socket + - ${CORE_DATA_PATH}/php-sock:/opt/billionmail/php-sock + - ${CORE_DATA_PATH}/rspamd-data:/opt/billionmail/rspamd-data + - ${CORE_DATA_PATH}/webmail-data:/opt/billionmail/webmail-data + - ${CORE_DATA_PATH}/.env:/opt/billionmail/.env + - ${CORE_DATA_PATH}/conf:/opt/billionmail/conf + - ${CORE_DATA_PATH}/logs:/opt/billionmail/logs + - ${CORE_DATA_PATH}/logs/core:/opt/billionmail/core/logs + - ${CORE_DATA_PATH}/core-data:/opt/billionmail/core/data + - /var/run/docker.sock:/var/run/docker.sock:ro + environment: + - TZ=${TZ} + - FAIL2BAN_INIT=${FAIL2BAN_INIT:-y} + cap_add: + - NET_BIND_SERVICE + - NET_ADMIN + - NET_RAW + ports: + - ${HTTP_PORT}:80 + - ${HTTPS_PORT}:443 + restart: always + networks: + - 1panel-network + + rspamd-billionmail: + image: billionmail/rspamd:1.2 + container_name: ${CONTAINER_NAME}-rspamd + hostname: billionmail-rspamd + environment: + - TZ=${TZ} + - REDISPASS=${REDISPASS} + - RETENTION_DAYS=${RETENTION_DAYS:-7} + volumes: + - ${RSPAMD_DATA_PATH}/conf/rspamd/local.d:/etc/rspamd/local.d + - ${RSPAMD_DATA_PATH}/conf/rspamd/statistic.conf:/etc/rspamd/statistic.conf + - ${RSPAMD_DATA_PATH}/conf/rspamd/rspamd.conf:/etc/rspamd/rspamd.conf + - ${RSPAMD_DATA_PATH}/rspamd-data:/var/lib/rspamd + - ${RSPAMD_DATA_PATH}/logs/rspamd:/var/log/rspamd + restart: always + networks: + - 1panel-network + + dovecot-billionmail: + image: billionmail/dovecot:1.5 + container_name: ${CONTAINER_NAME}-dovecot + hostname: billionmail-dovecot + cap_add: + - NET_BIND_SERVICE + volumes: + - ${DOCECOT_DATA_PATH}/conf/dovecot/conf.d:/etc/dovecot/conf.d + - ${DOCECOT_DATA_PATH}/conf/dovecot/dovecot.conf:/etc/dovecot/dovecot.conf + - ${DOCECOT_DATA_PATH}/conf/dovecot/rsyslog.conf:/etc/rsyslog.conf + - ${DOCECOT_DATA_PATH}/logs/dovecot:/var/log/mail + - ${DOCECOT_DATA_PATH}/ssl:/etc/ssl/mail + - ${DOCECOT_DATA_PATH}/ssl-self-signed:/etc/ssl/ssl-self-signed + - ${DOCECOT_DATA_PATH}/vmail-data:/var/vmail + - ${DOCECOT_DATA_PATH}/rspamd-data:/var/lib/rspamd + - ${DOCECOT_DATA_PATH}/postgresql-socket:/var/run/postgresql + environment: + - DBNAME=${DBNAME} + - DBUSER=${DBUSER} + - DBPASS=${DBPASS} + - TZ=${TZ} + - BILLIONMAIL_HOSTNAME=${BILLIONMAIL_HOSTNAME} + - REDISPASS=${REDISPASS} + - RETENTION_DAYS=${RETENTION_DAYS:-7} + ports: + - "${IMAP_PORT}:143" + - "${IMAPS_PORT:-993}:993" + - "${POP_PORT:-110}:110" + - "${POPS_PORT:-995}:995" + restart: always + ulimits: + nproc: 65535 + nofile: + soft: 20000 + hard: 40000 + networks: + - 1panel-network + + postfix-billionmail: + image: billionmail/postfix:1.6 + container_name: ${CONTAINER_NAME}-postfix + hostname: billionmail-postfix + volumes: + - ${POSTFIX_DATA_PATH}/conf/postfix/main.cf:/etc/postfix/main.cf + - ${POSTFIX_DATA_PATH}/conf/postfix/master.cf:/etc/postfix/master.cf + - ${POSTFIX_DATA_PATH}/conf/postfix/conf:/etc/postfix/conf + - ${POSTFIX_DATA_PATH}/conf/postfix/sql:/etc/postfix/sql + - ${POSTFIX_DATA_PATH}/conf/postfix/rsyslog.conf:/etc/rsyslog.conf + - ${POSTFIX_DATA_PATH}/logs/postfix:/var/log/mail + - ${POSTFIX_DATA_PATH}/ssl:/etc/ssl/mail + - ${POSTFIX_DATA_PATH}/postfix-data:/var/spool/postfix + - ${POSTFIX_DATA_PATH}/rspamd-data:/var/lib/rspamd + - ${POSTFIX_DATA_PATH}/postgresql-socket:/var/run/postgresql + environment: + - TZ=${TZ} + - DBNAME=${DBNAME} + - DBUSER=${DBUSER} + - DBPASS=${DBPASS} + - REDISPASS=${REDISPASS} + - BILLIONMAIL_HOSTNAME=${BILLIONMAIL_HOSTNAME} + - RETENTION_DAYS=${RETENTION_DAYS:-7} + cap_add: + - NET_BIND_SERVICE + ports: + - "${SMTP_PORT}:25" + - "${SMTPS_PORT}:465" + - "${SUBMISSION_PORT}:587" + restart: always + networks: + - 1panel-network + + webmail-billionmail: + image: roundcube/roundcubemail:1.6.10-fpm-alpine + container_name: ${CONTAINER_NAME}-roundcube + hostname: billionmail-roundcube + depends_on: + - dovecot-billionmail + - postfix-billionmail + volumes: + - ${ROUNDCUBE_DATA_PATH}/webmail-data:/var/www/html + - ${ROUNDCUBE_DATA_PATH}/conf/webmail/mime.types:/var/roundcube/config/mime.types + - ${ROUNDCUBE_DATA_PATH}/conf/webmail:/var/roundcube/config + - ${ROUNDCUBE_DATA_PATH}/conf/php:/usr/local/etc + - ${ROUNDCUBE_DATA_PATH}/php-sock/:/var/run/ + environment: + - TZ=${TZ} + - ROUNDCUBEMAIL_DB_TYPE=pgsql + - ROUNDCUBEMAIL_DB_HOST=pgsql + - ROUNDCUBEMAIL_DB_NAME=${DBNAME} + - ROUNDCUBEMAIL_DB_USER=${DBUSER} + - ROUNDCUBEMAIL_DB_PASSWORD=${DBPASS} + - ROUNDCUBEMAIL_DEFAULT_HOST=dovecot + - ROUNDCUBEMAIL_DEFAULT_PORT=${IMAP_PORT} + - ROUNDCUBEMAIL_SMTP_SERVER=postfix + - ROUNDCUBEMAIL_SMTP_PORT=${SMTP_PORT} + - ROUNDCUBEMAIL_REQUEST_PATH=/roundcube + restart: always + networks: + - 1panel-network + +networks: + 1panel-network: + external: true \ No newline at end of file diff --git a/apps/billion-mail/README.md b/apps/billion-mail/README.md new file mode 100644 index 000000000..c1c0c6aca --- /dev/null +++ b/apps/billion-mail/README.md @@ -0,0 +1,83 @@ +