Bug 232785 - mail/dovecot: does not identify config error and presents bad error message
Summary: mail/dovecot: does not identify config error and presents bad error message
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Larry Rosenman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-29 16:11 UTC by Phillip R. Jaenke
Modified: 2018-10-29 23:29 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (ler)


Attachments
mail_dovecot_files_dovecot.in.patch (850 bytes, text/plain)
2018-10-29 16:11 UTC, Phillip R. Jaenke
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Phillip R. Jaenke 2018-10-29 16:11:02 UTC
Created attachment 198737 [details]
mail_dovecot_files_dovecot.in.patch

If dovecot fails the configuration check, it will attempt to start anyways, and present a misleading error message in the process.

Example of a config error attempting to start with the bad error message:

 root@draco /usr/local/etc/rc.d # ./dovecot onestart

usage: install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 file2
       install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 ... fileN directory
       install -dU [-vU] [-g group] [-m mode] [-N dbdir] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               directory ...
./dovecot: WARNING: failed precmd routine for dovecot

Attached patch updates rc.d to perform the configuration check before attempting to start, bails out if configuration check fails, and presents the user with the exact error message from dovecot.
Comment 1 Larry Rosenman freebsd_committer 2018-10-29 23:28:41 UTC
Committed, Thanks.
Comment 2 commit-hook freebsd_committer 2018-10-29 23:29:12 UTC
A commit references this bug:

Author: ler
Date: Mon Oct 29 23:28:27 UTC 2018
New revision: 483437
URL: https://svnweb.freebsd.org/changeset/ports/483437

Log:
  mail/dovecot: give better error message(s) when there are configuration errors.

  PR:		232785
  Submitted by:	prj@rootwyrm.com

Changes:
  head/mail/dovecot/Makefile
  head/mail/dovecot/files/dovecot.in