-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add smtp_tls_security_level and smtp_tls_loglevel
- Loading branch information
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
# shellcheck shell=bash | ||
|
||
SMTP_TLS_POLICY_MAPS_HASH_FILE="/etc/postfix/smtp_tls_policy.hash" | ||
SMTP_TLS_POLICY_MAPS_HASH_FILE_LOCAL="/etc/postfix/tables/smtp_tls_policy.hash" | ||
|
||
# Remove existing transport.hash | ||
rm "${TRANSPORT_MAPS_HASH_FILE}" > /dev/null 2>&1 | ||
touch "${TRANSPORT_MAPS_HASH_FILE}" | ||
|
||
# TODO: add fail2ban file | ||
|
||
{ | ||
# Import local entries into transport.hash | ||
if [ -f "${TRANSPORT_MAPS_HASH_FILE_LOCAL}" ]; then | ||
echo "" | ||
echo "## Entries from ${TRANSPORT_MAPS_HASH_FILE_LOCAL}" | ||
cat "${TRANSPORT_MAPS_HASH_FILE_LOCAL}" | ||
echo "" | ||
fi | ||
} > "${TRANSPORT_MAPS_HASH_FILE}" | ||
|
||
postmap "${TRANSPORT_MAPS_HASH_FILE}" | ||
|
||
# If postfix is running, update | ||
if postfix status > /dev/null 2>&1; then | ||
postfix reload | ||
fi |