aboutsummaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorLarry Rosenman <ler@FreeBSD.org>2018-10-29 23:28:26 +0000
committerLarry Rosenman <ler@FreeBSD.org>2018-10-29 23:28:26 +0000
commitd3bf037d5244ccd3a5ef3a50e952c467315bbeab (patch)
tree80a8253c98dc7ae2eecc71270fb97ed8ffca39e4 /mail
parent16dca32152f8cc15d8a1da6a35306a8d2cb9def0 (diff)
downloadports-d3bf037d5244ccd3a5ef3a50e952c467315bbeab.tar.gz
ports-d3bf037d5244ccd3a5ef3a50e952c467315bbeab.zip
mail/dovecot: give better error message(s) when there are configuration errors.
PR: 232785 Submitted by: prj@rootwyrm.com
Notes
Notes: svn path=/head/; revision=483437
Diffstat (limited to 'mail')
-rw-r--r--mail/dovecot/Makefile2
-rw-r--r--mail/dovecot/files/dovecot.in8
2 files changed, 9 insertions, 1 deletions
diff --git a/mail/dovecot/Makefile b/mail/dovecot/Makefile
index 9deef42bc432..cde1cabd8118 100644
--- a/mail/dovecot/Makefile
+++ b/mail/dovecot/Makefile
@@ -8,7 +8,7 @@
PORTNAME= dovecot
PORTVERSION= 2.3.3
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= mail ipv6
MASTER_SITES= https://www.dovecot.org/releases/2.3/
diff --git a/mail/dovecot/files/dovecot.in b/mail/dovecot/files/dovecot.in
index cc3b43efc02b..e5a5c166c9f7 100644
--- a/mail/dovecot/files/dovecot.in
+++ b/mail/dovecot/files/dovecot.in
@@ -60,6 +60,14 @@ for config in ${dovecot_config}; do
required_files="${config}"
command_args="-c ${config}"
if [ -s ${config} ]; then
+ ${command} ${command_args} -a 2>/dev/null
+ if [ $? -ne 0 ]; then
+ echo "==Error=="
+ echo "Configuration file check failed."
+ # Use dovecot to print the config error.
+ ${command} ${command_args} -a
+ exit $?
+ fi
base_dir=$(${command} ${command_args} -a 2>/dev/null | /usr/bin/awk -F '= ' '/^base_dir =/ { print $2 }')
pidfile="${base_dir}/master.pid"
else