rough edges in transition from sendmail to dma

From: Mike Karels <mike_at_karels.net>
Date: Sun, 04 Dec 2022 17:40:20 UTC
This is a followup/response to the series of commits switching the default
MTA to Dragonfly Mail Agent.  I finally upgraded a -current system that
submits email that I read, including the daily script output, and ran into
some rough edges.

I knew about the changes from reading the git commit messages, so I checked
for an UPDATING entry.  There is none; there should be.  I see the RELNOTES
entry, but it is quite minimal.  So I thought I'd watch what happened
overnight.  This box has a non-default sendmail configuration.  Somewhat
to my surprise, I received the email from the daily script on my mail
server, but it included some errors.  I decided to switch back to sendmail,
and it was not obvious how to do it without referring to some of the commit
messages.

Apparently switching back to sendmail currently requires adding three
(or maybe two) sendmail_*_enable="YES" lines to /etc/rc.conf, as well
as replacing the /etc/mail/mailer.conf file.  I didn't find the sendmail
example in /usr/share until after I had copied the file from a 13.1 system.
A pointer to the sendmail version in the default mailer.conf would be
helpful.  Also, the sendmail and dma examples in mailer.conf(5) do not
correspond to the example files.

It might also be useful to have a check in /etc/rc.d/sendmail to see that
sendmail is configured in mailer.conf if sendmail is enabled.  As it was,
I tried "service sendmail start" before replacing the mailer.conf, and it
appeared to succeed, but the processes all exited quickly.

Is sendmail_enable="NONE" really deprecated?  I see that most of the
comments were restored.  It would be simpler (if not obvious) to put
sendmail_enable="NO" in /etc/rc.conf if /etc/defaults/rc.conf used NONE
as it did for a while, rather than having to enable multiple components.

Here is the relevant part of the email from the daily script, using all
default settings:

    Removing stale entries from sendmail host status cache:
    mailwrapper: no mapping in /etc/mail/mailer.conf

    Mail in local queue:
    Mail queue is empty

    Mail in submit queue:
    mailq: invalid arguments

It seems that we shouldn't get errors in a stock configuration, but I'd
also prefer not to have to change periodic.conf as well as rc.conf and
mailer.conf to get the old behavior.

For what it's worth, I configured dma on another -current system, using
the equivalent settings for my sendmail configuration (SMARTHOST and
MASQUERADE), and this seems to have gone smoothly.

I'm willing to help out with smoothing rough edges, including testing,
editing, maybe implementing (when/where I know what to do).

		Mike