From 4fcaf89aa8c555597813fd33796fd4df176c103c Mon Sep 17 00:00:00 2001 From: Disassembler Date: Sat, 14 Oct 2017 12:07:15 +0200 Subject: [PATCH] Add Postfix configuration, restrict to IPv4, related to #121 --- 01-basic.sh | 6 ++++++ basic/etc/postfix/main.cf | 13 +++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 basic/etc/postfix/main.cf diff --git a/01-basic.sh b/01-basic.sh index 236a37e..da57b39 100755 --- a/01-basic.sh +++ b/01-basic.sh @@ -71,6 +71,12 @@ echo postfix postfix/relayhost string "" | debconf-set-selections # Install packages apt-get -y --no-install-recommends install postfix +# Configure Postfix +cp ${SOURCE_DIR}/basic/etc/postfix/main.cf /etc/postfix/main.cf + +# Restart services +systemctl restart postfix + ##### # LXC diff --git a/basic/etc/postfix/main.cf b/basic/etc/postfix/main.cf new file mode 100644 index 0000000..2b9e3c5 --- /dev/null +++ b/basic/etc/postfix/main.cf @@ -0,0 +1,13 @@ +append_dot_mydomain = no +biff = no +compatibility_level = 2 +inet_interfaces = loopback-only +inet_protocols = ipv4 +mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 +recipient_delimiter = + +smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem +smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key +smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache +smtpd_use_tls=yes +smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache +smtp_use_tls=yes