adjust system_aliases and enable userforward
This commit is contained in:
parent
ee02317ed5
commit
6d176d0900
|
@ -944,9 +944,15 @@ virtual_alias_catchall:
|
||||||
# listed below are the same as are used for .forward files; you might want
|
# listed below are the same as are used for .forward files; you might want
|
||||||
# to set up different ones for pipe and file deliveries from aliases.
|
# to set up different ones for pipe and file deliveries from aliases.
|
||||||
|
|
||||||
|
# System Aliases, and User Forwards below, are only enabled for primary_hostname & qualify_domain.
|
||||||
|
# primary_hostname is the server hostname (FQDN)
|
||||||
|
# qualify_domain can be set in exim_local.conf and defaults to the server domain name,
|
||||||
|
# which is the primary_hostname without the local part - what "hostname -d" returns.
|
||||||
|
# These routers do not get invoked for any other virtual email domains configured on the server.
|
||||||
|
|
||||||
system_aliases:
|
system_aliases:
|
||||||
driver = redirect
|
driver = redirect
|
||||||
domains = +local_domains
|
domains = $primary_hostname:$qualify_domain
|
||||||
allow_fail
|
allow_fail
|
||||||
allow_defer
|
allow_defer
|
||||||
data = ${lookup{$local_part}lsearch{/etc/aliases}}
|
data = ${lookup{$local_part}lsearch{/etc/aliases}}
|
||||||
|
@ -973,17 +979,18 @@ system_aliases:
|
||||||
# forwarding generates a direct delivery to a file, or to a pipe, or sets
|
# forwarding generates a direct delivery to a file, or to a pipe, or sets
|
||||||
# up an auto-reply, respectively.
|
# up an auto-reply, respectively.
|
||||||
|
|
||||||
#userforward:
|
userforward:
|
||||||
# driver = redirect
|
driver = redirect
|
||||||
# check_local_user
|
check_local_user
|
||||||
# file = $home/.forward
|
domains = $primary_hostname:$qualify_domain
|
||||||
# no_verify
|
file = $home/.forward
|
||||||
# no_expn
|
no_verify
|
||||||
# check_ancestor
|
no_expn
|
||||||
## allow_filter
|
check_ancestor
|
||||||
# file_transport = address_file
|
allow_filter
|
||||||
# pipe_transport = address_pipe
|
file_transport = address_file
|
||||||
# reply_transport = address_reply
|
pipe_transport = address_pipe
|
||||||
|
reply_transport = address_reply
|
||||||
|
|
||||||
|
|
||||||
# This router matches local user mailboxes.
|
# This router matches local user mailboxes.
|
||||||
|
|
19
install.sh
19
install.sh
|
@ -44,6 +44,14 @@ if [ ! -d "/etc/mysql/" ]; then
|
||||||
mysql -e "CREATE USER 'nagios'@'localhost' IDENTIFIED WITH mysql_native_password AS '';"
|
mysql -e "CREATE USER 'nagios'@'localhost' IDENTIFIED WITH mysql_native_password AS '';"
|
||||||
mysqladmin flush-privileges
|
mysqladmin flush-privileges
|
||||||
|
|
||||||
|
elif ! systemctl is-active --quiet mysql ; then
|
||||||
|
|
||||||
|
echo "MySQL config dir exists, but MySQL/MariaDB server is not running."
|
||||||
|
echo "Check your server config and either make sure MySQL is running"
|
||||||
|
echo "or purge MySQL/MariaDB and all related packages (e.g. mysql-common)"
|
||||||
|
echo "from the server and then re-run this installer."
|
||||||
|
exit 1
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# create vmail user & db
|
# create vmail user & db
|
||||||
|
@ -186,17 +194,12 @@ fi
|
||||||
if [[ -d /etc/fail2ban/ ]]; then
|
if [[ -d /etc/fail2ban/ ]]; then
|
||||||
chmod 644 etc/fail2ban/*/*.conf
|
chmod 644 etc/fail2ban/*/*.conf
|
||||||
cp -a etc/fail2ban/* /etc/fail2ban/
|
cp -a etc/fail2ban/* /etc/fail2ban/
|
||||||
sed -i "s|postmaster|postmaster@$maildomain|g" /etc/fail2ban/action.d/mail-ratelimit.conf
|
|
||||||
echo
|
|
||||||
echo "Fail2ban rate limit will email postmaster@$maildomain."
|
|
||||||
echo "Change postmaster@$maildomain in /etc/fail2ban/action.d/mail-ratelimit.conf to suit your needs."
|
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
echo "fail2ban not installed, skipping fail2ban email configs."
|
echo "fail2ban not installed, skipping fail2ban email configs."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "root: webmaster@$maildomain" >> /etc/aliases
|
echo "webmaster@$maildomain" > /root/.forward
|
||||||
echo
|
|
||||||
echo "Email for root user notifications are configured to go to webmaster@$maildomain."
|
|
||||||
echo "Update /etc/aliases to suit your needs."
|
|
||||||
|
|
||||||
|
echo "System emails are configured to forward to webmaster@$maildomain."
|
||||||
|
echo "Adjust /etc/aliases & /root/.forward as desired."
|
||||||
|
|
Loading…
Reference in New Issue
Block a user