forked from docker/proxmoxbackupserver
postfix config initial
This commit is contained in:
parent
672a1579d3
commit
eb46e76973
|
|
@ -9,7 +9,10 @@ RUN apt-get update && \
|
|||
echo "deb http://download.proxmox.com/debian/pbs buster pbs-no-subscription" > /etc/apt/sources.list.d/pbs-no-subscription.list && \
|
||||
wget http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg && \
|
||||
apt-get update && \
|
||||
apt-get install -y proxmox-backup-server
|
||||
apt-get install -y proxmox-backup-server postfix
|
||||
|
||||
ENV POSTFIX_RELAY_HOST=127.0.0.1
|
||||
COPY main.cf /etc/postfix/main.cf
|
||||
|
||||
#Activate backup user
|
||||
RUN chsh -s /bin/bash backup
|
||||
|
|
|
|||
|
|
@ -8,10 +8,16 @@ chmod -R 700 /var/lib/proxmox-backup
|
|||
chown -R backup:backup /datastore
|
||||
chmod -R 700 /datastore
|
||||
|
||||
#Change postfix config
|
||||
sed -i "s/smtp unix - - y - - smtp/smtp unix - - n - - smtp/g" /etc/postfix/master.cf
|
||||
sed -i "s/docker_hostname/$(hostname)/g" /etc/postfix/main.cf
|
||||
sed -i "s/\#relayhost = /\relayhost = $(POSTFIX_RELAY_HOST)/g" /etc/postfix/main.cf
|
||||
|
||||
#Set password from environment variable
|
||||
echo "root:$ROOT_PASSWD" | chpasswd
|
||||
|
||||
# Start the first process
|
||||
/usr/bin/postfix start
|
||||
./usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-api &
|
||||
sleep 10
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
|
||||
|
||||
|
||||
# Debian specific: Specifying a file name will cause the first
|
||||
# line of that file to be used as the name. The Debian default
|
||||
# is /etc/mailname.
|
||||
myorigin = docker_hostname
|
||||
|
||||
smtpd_banner = $myhostname ESMTP (Debian/GNU)
|
||||
biff = no
|
||||
|
||||
# appending .domain is the MUA's job.
|
||||
append_dot_mydomain = no
|
||||
|
||||
# Uncomment the next line to generate "delayed mail" warnings
|
||||
#delay_warning_time = 4h
|
||||
|
||||
readme_directory = no
|
||||
|
||||
# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
|
||||
# fresh installs.
|
||||
compatibility_level = 2
|
||||
maillog_file=/var/log/postfix.log
|
||||
|
||||
|
||||
# TLS parameters
|
||||
smtp_use_tls=no
|
||||
|
||||
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
|
||||
# information on enabling SSL in the smtp client.
|
||||
|
||||
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated
|
||||
myhostname = docker_hostname
|
||||
alias_maps = hash:/etc/aliases
|
||||
alias_database = hash:/etc/aliases
|
||||
mydestination = $myhostname, docker_hostname, localhost.localdomain, localhost
|
||||
#relayhost =
|
||||
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
|
||||
mailbox_size_limit = 0
|
||||
recipient_delimiter = +
|
||||
inet_interfaces = all
|
||||
inet_protocols = all
|
||||
Loading…
Reference in New Issue