aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald Klop <ronald-lists@klop.ws>2022-02-25 11:42:26 +0000
committerRenato Botelho <garga@FreeBSD.org>2022-02-25 11:42:26 +0000
commitf3c2313c5893bd9d17216ace83e131f0dfa8a660 (patch)
treed27f088dbbaa5493056ff737e905ad67c99c86e2
parent60cf11e094125756bf00b6420d9651d2b1964ead (diff)
downloadports-f3c2313c5893bd9d17216ace83e131f0dfa8a660.tar.gz
ports-f3c2313c5893bd9d17216ace83e131f0dfa8a660.zip
mail/dma: Implement cronjob to flush emails
Add a new cronjob to flush emails every 30 minutes and change pkg-message to let users know about it. PR: 261532 Sponsored by: Rubicon Communications, LLC ("Netgate")
-rw-r--r--mail/dma/Makefile6
-rw-r--r--mail/dma/files/dma_cron.in5
-rw-r--r--mail/dma/files/pkg-message.in6
-rw-r--r--mail/dma/pkg-plist1
4 files changed, 12 insertions, 6 deletions
diff --git a/mail/dma/Makefile b/mail/dma/Makefile
index cb5d91e5942c..9a497a47bb0c 100644
--- a/mail/dma/Makefile
+++ b/mail/dma/Makefile
@@ -28,7 +28,7 @@ CFLAGS+= -DCONF_PATH='\"${PREFIX}/etc/dma\"' -DDMA_GROUP='\"mail\"' \
LDFLAGS+= -L${OPENSSLLIB}
PORTSCOUT= limit:^[0-9\.]*$$
-SUB_FILES= pkg-message
+SUB_FILES= dma_cron pkg-message
BUILD_WRKSRC= ${WRKSRC}/bsd
INSTALL_WRKSRC= ${WRKSRC}/bsd
@@ -43,11 +43,13 @@ post-patch:
${WRKSRC}/bsd/dma-mbox-create/Makefile
post-install:
- ${MKDIR} ${STAGEDIR}${ETCDIR}
+ ${MKDIR} ${STAGEDIR}${ETCDIR}/cron.d
${MKDIR} ${STAGEDIR}/var/spool/dma
${INSTALL_DATA} ${WRKSRC}/dma.conf \
${STAGEDIR}${ETCDIR}/dma.conf.sample
${INSTALL_DATA} ${WRKSRC}/auth.conf \
${STAGEDIR}${ETCDIR}/auth.conf.sample
+ ${INSTALL_DATA} ${WRKDIR}/dma_cron \
+ ${STAGEDIR}${ETCDIR}/cron.d/dma
.include <bsd.port.mk>
diff --git a/mail/dma/files/dma_cron.in b/mail/dma/files/dma_cron.in
new file mode 100644
index 000000000000..43516fc904d8
--- /dev/null
+++ b/mail/dma/files/dma_cron.in
@@ -0,0 +1,5 @@
+SHELL=/bin/sh
+PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
+
+# See crontab(5) for field format.
+*/30 * * * * root %%PREFIX%%/libexec/dma -q
diff --git a/mail/dma/files/pkg-message.in b/mail/dma/files/pkg-message.in
index fcc59f37b315..56989bd39f2b 100644
--- a/mail/dma/files/pkg-message.in
+++ b/mail/dma/files/pkg-message.in
@@ -33,10 +33,8 @@ shutdown, add the following to rc.conf as well:
dma_flushq_enable="YES"
-you can also add a cronjob to do regular mailq flushes using the following
-command:
-
-%%PREFIX%%/libexec/dma -q
+A crontab configuration to flush every 30 minutes was added to
+%%PREFIX%%/etc/cron.d/dma.
And you can disable some sendmail specific daily maintenance routines in your
/etc/periodic.conf file:
diff --git a/mail/dma/pkg-plist b/mail/dma/pkg-plist
index 2e01fb01bc70..0f3dd105a0c8 100644
--- a/mail/dma/pkg-plist
+++ b/mail/dma/pkg-plist
@@ -1,3 +1,4 @@
+%%ETCDIR%%/cron.d/dma
@(root,mail,2555) libexec/dma
@(root,mail,4554) libexec/dma-mbox-create
@sample(root,mail,0644) etc/dma/dma.conf.sample