Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
Mail iRedMail.tips to postmaster each time you launch the container.
Browse files Browse the repository at this point in the history
  • Loading branch information
iredmail committed May 9, 2020
1 parent 727ff2b commit a6325ee
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/etc/amavisd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ $policy_bank{'NO_BAD_HEADER_CHECK'} = {
$do_syslog = 1; # log via syslogd (preferred)
$syslog_facility = 'mail'; # Syslog facility as a string
$log_level = 0; # Amavisd log level.
# Verbosity: 0, 1, 2, 3, 4, 5, -d.
# Verbosity: 0, 1, 2, 3, 4, 5.
$sa_debug = 0; # SpamAssassin debugging (require $log_level).
# Default if off (0).

Expand Down
2 changes: 2 additions & 0 deletions config/etc/postfix/main.cf
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ mydomain = PH_HOSTNAME
#
# trusted_networks X.X.X.X Y.Y.Y.0/24
#
# NOTE: IPv6 address must be put inside "[]", otherwise it will be mistakenly
# considered as a "type:table" pattern.
mynetworks = 127.0.0.1 192.168.1.1 172.0.0.0/8 172.16.0.0/12

# Accepted local emails
Expand Down
3 changes: 3 additions & 0 deletions config/root/iRedMail/iRedMail.tips
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Set Docker env `MAIL_THE_TIP_FILE=NO` to disable sending this file to
postmaster each time you launch the container.

###########################################################################
# iRedMail: https://www.iredmail.org/
# Version: 2020041601
Expand Down
4 changes: 4 additions & 0 deletions entrypoints/tip_file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ ${CMD_SED} "s#PH_IREDAPD_DB_PASSWORD#${IREDAPD_DB_PASSWORD}#g" ${TIP_FILE}
${CMD_SED} "s#PH_IREDADMIN_DB_PASSWORD#${IREDADMIN_DB_PASSWORD}#g" ${TIP_FILE}
${CMD_SED} "s#PH_FAIL2BAN_DB_PASSWORD#${FAIL2BAN_DB_PASSWORD}#g" ${TIP_FILE}
${CMD_SED} "s#PH_SA_BAYES_DB_PASSWORD#${SA_BAYES_DB_PASSWORD}#g" ${TIP_FILE}

if [ X"${MAIL_THE_TIP_FILE}" == X'YES' ]; then
mail -s "Details of this iRedMail container" ${POSTMASTER_EMAIL} < ${TIP_FILE}
fi
2 changes: 1 addition & 1 deletion scripts/install_all_pkgs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#

# Required binary packages.
PKGS_BASE="ca-certificates logrotate rsyslog rsyslog-openrc supervisor"
PKGS_BASE="ca-certificates logrotate mailx rsyslog rsyslog-openrc supervisor"
PKGS_MYSQL="mariadb mariadb-client"
PKGS_NGINX="nginx"
PKGS_PHP_FPM="php7 php7-bz2 php7-curl php7-dom php7-fileinfo php7-fpm php7-session php7-gd php7-gettext php7-iconv php7-imap php7-intl php7-json php7-mbstring php7-openssl php7-xml php7-zip"
Expand Down
4 changes: 3 additions & 1 deletion settings.conf
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ USE_SOGO=YES
#
# Enable/disable features
#
FAIL2BAN_STORE_BANNED_IP_IN_DB=YES
# Send /root/iRedMail.tips to postmaster@ each time launching the container.
MAIL_THE_TIP_FILE=YES

FAIL2BAN_STORE_BANNED_IP_IN_DB=YES
POSTFIX_ENABLE_SRS=YES
IREDAPD_SRS_SECRET=

Expand Down

0 comments on commit a6325ee

Please sign in to comment.