Commit 27c11f86 authored by ale's avatar ale
Browse files

Merge branch 'clean-heldmsg' into 'master'

added clean-heldmsg cron

See merge request !3
parents e53dd8b4 a1076b17
Pipeline #4909 canceled with stages
......@@ -4,6 +4,7 @@ COPY conf /tmp/conf
COPY build.sh /tmp/build.sh
COPY start.sh /start.sh
COPY apply-forced-params /usr/local/bin/apply-forced-params
COPY clean-heldmsg /usr/local/bin/clean-heldmsg
COPY sendmail.py /usr/sbin/sendmail
RUN /tmp/build.sh && rm -fr /tmp/build.sh /tmp/conf
......
......@@ -99,6 +99,8 @@ mkdir /var/empty
chmod 755 /usr/local/bin/apply-forced-params
chmod 755 /usr/local/bin/clean-heldmsg
chmod 755 /usr/sbin/sendmail
# Install python-mailman-api.
......
#!/bin/sh
test -d /data/data || exit 0
test -e /var/lib/mailman/bin/discard || exit 0
find /data/data/ -name heldmsg\* -mtime +20 -print | xargs -n 1 /var/lib/mailman/bin/discard >/dev/null 2>&1
exit 0
clean-heldmsg-cron.service: {
type: cron,
interval: "50 4 * * *",
command: "/usr/local/bin/clean-heldmsg",
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment