mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-23 02:27:05 +00:00
auto formatting, no change in logic
This commit is contained in:
parent
a7beb72168
commit
09fb6d0ad8
@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
# The DNS configuration for DKIM is done in the management daemon.
|
# The DNS configuration for DKIM is done in the management daemon.
|
||||||
|
|
||||||
source setup/functions.sh # load our functions
|
source setup/functions.sh # load our functions
|
||||||
source /etc/mailinabox.conf # load global vars
|
source /etc/mailinabox.conf # load global vars
|
||||||
|
|
||||||
# Install DKIM...
|
# Install DKIM...
|
||||||
@ -14,12 +14,12 @@ echo "Installing OpenDKIM/OpenDMARC..."
|
|||||||
apt_install opendkim opendkim-tools opendmarc
|
apt_install opendkim opendkim-tools opendmarc
|
||||||
|
|
||||||
# Make sure configuration directories exist.
|
# Make sure configuration directories exist.
|
||||||
mkdir -p /etc/opendkim;
|
mkdir -p /etc/opendkim
|
||||||
mkdir -p "$STORAGE_ROOT/mail/dkim"
|
mkdir -p "$STORAGE_ROOT/mail/dkim"
|
||||||
|
|
||||||
# Used in InternalHosts and ExternalIgnoreList configuration directives.
|
# Used in InternalHosts and ExternalIgnoreList configuration directives.
|
||||||
# Not quite sure why.
|
# Not quite sure why.
|
||||||
echo "127.0.0.1" > /etc/opendkim/TrustedHosts
|
echo "127.0.0.1" >/etc/opendkim/TrustedHosts
|
||||||
|
|
||||||
# We need to at least create these files, since we reference them later.
|
# We need to at least create these files, since we reference them later.
|
||||||
# Otherwise, opendkim startup will fail
|
# Otherwise, opendkim startup will fail
|
||||||
@ -30,7 +30,7 @@ if grep -q "ExternalIgnoreList" /etc/opendkim.conf; then
|
|||||||
true # already done #NODOC
|
true # already done #NODOC
|
||||||
else
|
else
|
||||||
# Add various configuration options to the end of `opendkim.conf`.
|
# Add various configuration options to the end of `opendkim.conf`.
|
||||||
cat >> /etc/opendkim.conf << EOF;
|
cat >>/etc/opendkim.conf <<EOF
|
||||||
Canonicalization relaxed/simple
|
Canonicalization relaxed/simple
|
||||||
MinimumKeyBits 1024
|
MinimumKeyBits 1024
|
||||||
ExternalIgnoreList refile:/etc/opendkim/TrustedHosts
|
ExternalIgnoreList refile:/etc/opendkim/TrustedHosts
|
||||||
@ -71,7 +71,7 @@ tools/editconf.py /etc/opendmarc.conf -s \
|
|||||||
# used by spamassassin to evaluate the mail for spamminess.
|
# used by spamassassin to evaluate the mail for spamminess.
|
||||||
|
|
||||||
tools/editconf.py /etc/opendmarc.conf -s \
|
tools/editconf.py /etc/opendmarc.conf -s \
|
||||||
"SPFIgnoreResults=true"
|
"SPFIgnoreResults=true"
|
||||||
|
|
||||||
# SPFSelfValidate causes the filter to perform a fallback SPF check itself
|
# SPFSelfValidate causes the filter to perform a fallback SPF check itself
|
||||||
# when it can find no SPF results in the message header. If SPFIgnoreResults
|
# when it can find no SPF results in the message header. If SPFIgnoreResults
|
||||||
@ -80,13 +80,13 @@ tools/editconf.py /etc/opendmarc.conf -s \
|
|||||||
# spamassassin to evaluate the mail for spamminess.
|
# spamassassin to evaluate the mail for spamminess.
|
||||||
|
|
||||||
tools/editconf.py /etc/opendmarc.conf -s \
|
tools/editconf.py /etc/opendmarc.conf -s \
|
||||||
"SPFSelfValidate=true"
|
"SPFSelfValidate=true"
|
||||||
|
|
||||||
# Disables generation of failure reports for sending domains that publish a
|
# Disables generation of failure reports for sending domains that publish a
|
||||||
# "none" policy.
|
# "none" policy.
|
||||||
|
|
||||||
tools/editconf.py /etc/opendmarc.conf -s \
|
tools/editconf.py /etc/opendmarc.conf -s \
|
||||||
"FailureReportsOnNone=false"
|
"FailureReportsOnNone=false"
|
||||||
|
|
||||||
# AlwaysAddARHeader Adds an "Authentication-Results:" header field even to
|
# AlwaysAddARHeader Adds an "Authentication-Results:" header field even to
|
||||||
# unsigned messages from domains with no "signs all" policy. The reported DKIM
|
# unsigned messages from domains with no "signs all" policy. The reported DKIM
|
||||||
@ -95,7 +95,7 @@ tools/editconf.py /etc/opendmarc.conf -s \
|
|||||||
# is used by spamassassin to evaluate the mail for spamminess.
|
# is used by spamassassin to evaluate the mail for spamminess.
|
||||||
|
|
||||||
tools/editconf.py /etc/opendkim.conf -s \
|
tools/editconf.py /etc/opendkim.conf -s \
|
||||||
"AlwaysAddARHeader=true"
|
"AlwaysAddARHeader=true"
|
||||||
|
|
||||||
# Add OpenDKIM and OpenDMARC as milters to postfix, which is how OpenDKIM
|
# Add OpenDKIM and OpenDMARC as milters to postfix, which is how OpenDKIM
|
||||||
# intercepts outgoing mail to perform the signing (by adding a mail header)
|
# intercepts outgoing mail to perform the signing (by adding a mail header)
|
||||||
@ -110,7 +110,7 @@ tools/editconf.py /etc/opendkim.conf -s \
|
|||||||
# configuring smtpd_milters there to only list the OpenDKIM milter
|
# configuring smtpd_milters there to only list the OpenDKIM milter
|
||||||
# (see mail-postfix.sh).
|
# (see mail-postfix.sh).
|
||||||
tools/editconf.py /etc/postfix/main.cf \
|
tools/editconf.py /etc/postfix/main.cf \
|
||||||
"smtpd_milters=inet:127.0.0.1:8891 inet:127.0.0.1:8893"\
|
"smtpd_milters=inet:127.0.0.1:8891 inet:127.0.0.1:8893" \
|
||||||
non_smtpd_milters=\$smtpd_milters \
|
non_smtpd_milters=\$smtpd_milters \
|
||||||
milter_default_action=accept
|
milter_default_action=accept
|
||||||
|
|
||||||
@ -121,4 +121,3 @@ hide_output systemctl enable opendmarc
|
|||||||
restart_service opendkim
|
restart_service opendkim
|
||||||
restart_service opendmarc
|
restart_service opendmarc
|
||||||
restart_service postfix
|
restart_service postfix
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user