Re: rough edges in transition from sendmail to dma

From: Mike Karels <mike_at_karels.net>
Date: Mon, 05 Dec 2022 18:12:07 UTC
On 5 Dec 2022, at 10:37, Baptiste Daroussin wrote:

> On Sun, Dec 04, 2022 at 11:40:20AM -0600, Mike Karels wrote:
>> 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.
>
> Fixed.

Thanks!  One nit: using sendmail_enable=“NO” restores the previous default
(sendmail submission without incoming).  That is a little counter-intuitive,
but that is the way that it has been.

>> 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.
>
> Yes it has been deprecated for more than 20 years, I first pushed the NONE
> configration, but people pointed that NONE was deprecated, so I switched to
> NO.
>
> After more cleanup in the sendmail infrastructure (which should have been done
> 20 years ago...) I decided to remove the deprecation notice, but forgot to
> switch back the default to NONE (sorry about that). I have just fixed that part.

Thanks, I think that’s the right solution.

>> 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
>
> The transition for the default setup is seamless, we need to cover in
> documentation how to convert from other common cases.

Almost seamless, there are still errors from the daily script.

There were some pre-existing issues, e.g. the default dma mailer.conf
does not agree with the mailer.conf(5) version.  I think the newalias
entry should be added, or newalias produces an error.  (It’s probably
a no-op.)  I also think it would be nice to mention the sendmail example
file in the dma mailer.conf, like dma is mentioned in the sendmail template.

> Would be nice if we could document your conversion case.

Conversion to dma?  It was actually fairly clear from the dma.conf
file and man page.  We’ll need to make sure that the release notes
are clear about how to revert to sendmail, although there is not as
much to it now.

> Best regards,
> Bapt

Thanks,
		Mike