From c6bba84f4ede3b65de8787f12e987ffbfa60df65 Mon Sep 17 00:00:00 2001 From: Mohamed Abdul Rasheed Date: Wed, 24 Sep 2025 18:26:41 -0400 Subject: [PATCH 1/2] LIBDEVOPS-83. Add script to prepare and run postfix. https://umd-dit.atlassian.net/browse/LIBDEVOPS-83 --- Dockerfile | 3 ++- dspace/src/main/docker/cron/postfix.sh | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 dspace/src/main/docker/cron/postfix.sh 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..8e793c8cbe16 --- /dev/null +++ b/dspace/src/main/docker/cron/postfix.sh @@ -0,0 +1,8 @@ +# 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 From a33e7dba06554ec4a472d924eae5ff3efc230e76 Mon Sep 17 00:00:00 2001 From: "David P. Steelman" Date: Fri, 26 Sep 2025 08:01:04 -0400 Subject: [PATCH 2/2] LIBDEVOPS-83. Added license comment to satisfy Maven "license:check" Added boiler-plate DRUM license notice to "postfix.sh" to satisfy the Maven "license:check" task that is run as part of GitHub action. Without this comment, the build fails with the following error: > Failed to execute goal com.mycila:license-maven-plugin:3.0:check > (check-headers) on project dspace: Some files do not have the expected > license header https://umd-dit.atlassian.net/browse/LIBDEVOPS-83 --- dspace/src/main/docker/cron/postfix.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dspace/src/main/docker/cron/postfix.sh b/dspace/src/main/docker/cron/postfix.sh index 8e793c8cbe16..4afcda66a2c2 100755 --- a/dspace/src/main/docker/cron/postfix.sh +++ b/dspace/src/main/docker/cron/postfix.sh @@ -1,3 +1,12 @@ +#!/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/