diff --git a/postfix/Dockerfile b/postfix/Dockerfile index 1bf7fab..084c7be 100755 --- a/postfix/Dockerfile +++ b/postfix/Dockerfile @@ -53,6 +53,7 @@ RUN apt-get update; \ procmail \ sasl2-bin \ python3 \ + python3-full \ python3-pip \ python3-venv \ supervisor \ @@ -61,8 +62,8 @@ RUN apt-get update; \ RUN apt-get install -yqq --no-install-recommends --no-install-suggests \ opendmarc -RUN python3 -m venv /root/venv; \ - . /root/venv/bin/activate; \ +RUN python3 -m venv /usr/local/bin/venv; \ + . /usr/local/bin/venv/bin/activate; \ pip3 install --no-cache-dir envtpl awscli RUN apt-get --quiet --quiet clean all \ diff --git a/postfix/usr/local/bin/entrypoint.sh b/postfix/usr/local/bin/entrypoint.sh index 705a17e..a4f4aae 100644 --- a/postfix/usr/local/bin/entrypoint.sh +++ b/postfix/usr/local/bin/entrypoint.sh @@ -20,7 +20,7 @@ EOF chmod +r /usr/local/bin/.mailparse.env echo "Create config file from template" -. /root/venv/bin/activate +. /usr/local/bin/venv/bin/activate envtpl < /etc/pdns/recursor.conf.tpl > /etc/pdns/recursor.conf echo "Create PowerDNS directories" diff --git a/postfix/usr/local/bin/mailparse.sh b/postfix/usr/local/bin/mailparse.sh index 7163329..f5c89b1 100644 --- a/postfix/usr/local/bin/mailparse.sh +++ b/postfix/usr/local/bin/mailparse.sh @@ -48,7 +48,7 @@ rm -f "$TEMP_EMAIL_FILE" # Function to send email to Kinesis send_to_kinesis() { - . /root/venv/bin/activate; + . /usr/local/bin/venv/bin/activate; if ! command -v aws &> /dev/null; then echo "AWS CLI not found. Cannot send email to Kinesis."