1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-20 08:27:15 +00:00

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")
This commit is contained in:
Ronald Klop 2022-02-25 08:42:26 -03:00 committed by Renato Botelho
parent 60cf11e094
commit f3c2313c58
4 changed files with 12 additions and 6 deletions

View File

@ -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>

View File

@ -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

View File

@ -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:

View File

@ -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