diff --git a/Dockerfile b/Dockerfile index 0386481044f2..382db1ed3784 100644 --- a/Dockerfile +++ b/Dockerfile @@ -92,8 +92,9 @@ RUN apt-get update && \ vim \ python3-lxml \ jq && \ - mkfifo /var/spool/postfix/public/pickup && \ ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +COPY dspace/src/main/docker/cron/postfix.sh /usr/local/bin/postfix.sh # End UMD Customization # On startup, run DSpace Runnable JAR ENTRYPOINT ["java", "-jar", "webapps/server-boot.jar", "--dspace.dir=$DSPACE_INSTALL"] diff --git a/dspace/src/main/docker/cron/postfix.sh b/dspace/src/main/docker/cron/postfix.sh new file mode 100755 index 000000000000..4afcda66a2c2 --- /dev/null +++ b/dspace/src/main/docker/cron/postfix.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +# The contents of this file are subject to the license and copyright +# detailed in the LICENSE and NOTICE files at the root of the source +# tree and available online at +# +# http://www.dspace.org/license/ +# + +# Prepare Postfix directories and start Postfix +mkdir -p /var/spool/postfix/etc +cp /etc/resolv.conf /var/spool/postfix/etc/ +cp /etc/nsswitch.conf /var/spool/postfix/etc/ +cp /etc/hosts /var/spool/postfix/etc/ +chown -R postfix:postfix /var/lib/postfix/ +chmod 755 /var/spool/postfix/ /var/lib/postfix/ +postfix start