Postfix/Dovecot with Let's Encrypt

installieren, modifizeren, administrieren
Antworten
Benutzeravatar
h3rb3rn
Administrator
Beiträge: 161
Registriert: vor 5 Jahre

Postfix/Dovecot with Let's Encrypt

Beitrag von h3rb3rn » vor 4 Monate

Update Script

Code: Alles auswählen

#!/bin/bash

# Postfix
sudo postconf -e 'smtpd_tls_cert_file = /etc/letsencrypt/live/cloud.4noobs.de/fullchain.pem'
sudo postconf -e 'smtpd_tls_key_file = /etc/letsencrypt/live/cloud.4noobs.de/privkey.pem'
sudo postconf -e 'smtpd_sasl_type = dovecot'
sudo postconf -e 'smtpd_sasl_path = private/auth'
sudo postconf -e 'smtpd_sasl_local_domain ='
sudo postconf -e 'smtpd_sasl_security_options = noanonymous'
sudo postconf -e 'broken_sasl_auth_clients = yes'
sudo postconf -e 'smtpd_sasl_auth_enable = yes'
sudo postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination'
sudo postconf -e 'smtp_tls_security_level = may'
sudo postconf -e 'smtpd_tls_security_level = may'
sudo postconf -e 'smtp_tls_note_starttls_offer = yes'
sudo postconf -e 'smtpd_tls_loglevel = 1'
sudo postconf -e 'smtpd_tls_received_header = yes'

# Dovecot

# file: /etc/dovecot/dovecot.conf

# ssl_cert = </etc/postfix/smtpd.cert
# ssl_key = </etc/postfix/smtpd.key

# ssl_cert = </etc/letsencrypt/live/cloud.4noobs.de/fullchain.pem
# ssl_key = </etc/letsencrypt/live/cloud.4noobs.de/privkey.pem

sed -i "s/postfix\/smtpd.cert/letsencrypt\/live\/cloud.4noobs.de\/fullchain.pem/g" /etc/dovecot/dovecot.conf
sed -i "s/postfix\/smtpd.key/letsencrypt\/live\/cloud.4noobs.de\/privkey.pem/g" /etc/dovecot/dovecot.conf

systemctl restart postfix
systemctl restart dovecot
systemctl status postfix
systemctl status dovecot

Link:
BBcode:
HTML:
Hide post links
Show post links

Antworten