Skip to content

Commit

Permalink
Changed small parts
Browse files Browse the repository at this point in the history
  • Loading branch information
dimapin committed May 18, 2024
1 parent dafe62b commit 09a7176
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
#!/bin/sh

# Konfiguriere Postfix mit Umgebungsvariablen
postconf -e "relayhost = ${RELAY_HOST}" \
-e "smtp_sasl_auth_enable = ${SMTP_SASL_AUTH_ENABLE}" \
-e "smtp_sasl_security_options = ${SMTP_SASL_SECURITY_OPTIONS}" \
-e "smtp_sasl_password_maps = ${SMTP_SASL_PASSWORD_MAPS}" \
-e 'smtpd_sasl_local_domain = $myhostname' \
-e "smtpd_recipient_restrictions=${SMTPD_RECIPIENT_RESTRICTIONS}" \
-e "smtp_tls_security_level = ${SMTP_TLS_SECURITY_LEVEL}" \
-e "smtp_tls_CAfile = ${SMTP_TLS_CAFILE}"
postconf -e "relayhost=${RELAY_HOST}"
postconf -e "smtp_sasl_auth_enable=${SMTP_SASL_AUTH_ENABLE}"
postconf -e "smtp_sasl_security_options=${SMTP_SASL_SECURITY_OPTIONS}"
postconf -e "smtp_sasl_password_maps=${SMTP_SASL_PASSWORD_MAPS}"
postconf -e 'smtpd_sasl_local_domain=$myhostname'
postconf -e "smtpd_recipient_restrictions=${SMTPD_RECIPIENT_RESTRICTIONS}"
postconf -e "smtp_tls_security_level=${SMTP_TLS_SECURITY_LEVEL}"
postconf -e "smtp_tls_CAfile=${SMTP_TLS_CAFILE}"

# Erstelle smtpd.conf für Cyrus-SASL
mkdir -p /etc/sasl2
echo "pwcheck_method: ${PW_CHECK_METHOD}" > /etc/sasl2/smtpd.conf
echo "mech_list: ${MECH_LIST}" >> /etc/sasl2/smtpd.conf

mkdir -p /var/spool/postfix/var/run/saslauthd
saslauthd -a shadow -c -m /var/spool/postfix/var/run/saslauthd

adduser -D ${SMTP_USER} -s /bin/false && echo "${SMTP_USER}:${SMTP_PASSWORD}" | chpasswd
Expand All @@ -26,5 +27,5 @@ if [ -f "/etc/postfix/sasl_passwd" ]; then
fi

# Starte Postfix im Vordergrund
postfix start-fg
postfix -v start-fg
# tail -f /var/log/mail.log

0 comments on commit 09a7176

Please sign in to comment.