Bug 274988

Summary: add cron.d/dma to periodically flush the queue
Product: Base System Reporter: Ronald Klop <ronald>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Some People CC: emaste, michaelo, mslehto
Priority: ---    
Version: 15.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
git log -p to add a cron.d entry none

Description Ronald Klop freebsd_committer freebsd_triage 2023-11-09 12:31:33 UTC
Created attachment 246214 [details]
git log -p to add a cron.d entry

Mail agent libexec/dma is the new default MTA in FreeBSD 14.
It lacks a mechanism to flush the queue now and then which can lead to stuck mail.

The patch adds a cron entry in /etc/cron.d similar to "usr.bin/at" or the port mail/dma.
Comment 1 Mikko Lehto 2023-12-02 19:53:27 UTC
Cron setup of file "/etc/cron.d/dma" by attachment 246214 [details] works for me.
> # freebsd-version -rku
> 14.0-RELEASE
> 14.0-RELEASE
> 14.0-RELEASE-p1


My DMA spool in "/var/spool/dma" filled as I was troubleshooting mailer.conf(5)
setup with line "sendmail /usr/libexec/dma -bq".
(
  Actual, and unrelated, initial problem was broken local file
  "/usr/local/etc/mail/mailer.conf" that caused calls to non existing sendmail
  by mailwrapper(8) via user crontab entry:
  "mailed 295 bytes of output but got status 0x0047" (/var/log/cron)
  0x47 == 71 == sysexit.sh/EX_OSERR
)

Thank you.