diff options
author | Danilo G. Baio <dbaio@FreeBSD.org> | 2018-04-22 21:35:38 +0000 |
---|---|---|
committer | Danilo G. Baio <dbaio@FreeBSD.org> | 2018-04-22 21:35:38 +0000 |
commit | bd62adb53610d4a73c2b50f1d6e7034de0d22bf2 (patch) | |
tree | d7c722907cf2c912c36908ac5857ada8af7a6eec /mail/dovecot22/files | |
parent | p5-CGI-Application-Plugin-Authentication: Update version 0.21=>0.23 (diff) |
Add mail/dovecot22 (v2.2.35) and mail/dovecot-pigeonhole04 (v0.4.23)
This brings back Dovecot 2.2.35 to the tree because there is an issue
with version 2.3.1 and replication in some scenarios [1].
Keep this version until this problem gets fixed upstream.
1 - https://www.dovecot.org/list/dovecot/2018-April/111477.html
Approved by: adamw (maintainer of mail/dovecot)
Approved by: ler (maintainer of mail/dovecot-pigeonhole)
Notes
Notes:
svn path=/head/; revision=468060
Diffstat (limited to 'mail/dovecot22/files')
-rw-r--r-- | mail/dovecot22/files/dovecot.in | 74 | ||||
-rw-r--r-- | mail/dovecot22/files/patch-src_plugins_fts_decode2text.sh | 18 | ||||
-rw-r--r-- | mail/dovecot22/files/pkg-message.in | 30 |
3 files changed, 122 insertions, 0 deletions
diff --git a/mail/dovecot22/files/dovecot.in b/mail/dovecot22/files/dovecot.in new file mode 100644 index 000000000000..7a7ce56644e8 --- /dev/null +++ b/mail/dovecot22/files/dovecot.in @@ -0,0 +1,74 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: dovecot +# REQUIRE: %%REQUIRE%% +# KEYWORD: shutdown + +# dovecot_enable (bool): Set it to YES to enable dovecot +# Default: NO +# dovecot_config (str): Path to dovecot.conf +# Default: %%ETCDIR%%/dovecot.conf +# Set it to a space-separated list to start +# multiple dovecot instances +# dovecot_flags (str): Extra flags to pass to dovecot +# Default: empty + +# Define dovecot_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/dovecot + +. /etc/rc.subr + +name=dovecot +rcvar=dovecot_enable + +# read configuration and set defaults +load_rc_config ${name} +: ${dovecot_enable:="NO"} +: ${dovecot_config:="%%ETCDIR%%/${name}.conf"} + +command="%%PREFIX%%/sbin/${name}" +start_precmd="start_precmd" +stop_postcmd="stop_postcmd" +restart_cmd="restart_cmd" +extra_commands="reload" + +start_precmd() +{ # Ensure runtime directories exist with correct permissions + local login_user login_gid + login_user=$(${command} ${command_args} -a | /usr/bin/awk -F '= ' '/^default_login_user =/ { print $2 }') + login_gid=$(/usr/sbin/pw usershow -n "${login_user}" 2>/dev/null | /usr/bin/cut -d: -f4) + /usr/bin/install -o root -g wheel -m 0755 -d ${base_dir} +} + +stop_postcmd() +{ # Cleanup runtime directories + rm -rf ${base_dir} 2>/dev/null +} + +restart_cmd() +{ # Overriding makes rc.subr run this once for each instance + run_rc_command stop + run_rc_command start +} + +# To start multiple instances of dovecot set dovecot_config to +# a space separated list of configuration files. +for config in ${dovecot_config}; do + required_files="${config}" + command_args="-c ${config}" + if [ -s ${config} ]; then + base_dir=$(${command} ${command_args} -a | /usr/bin/awk -F '= ' '/^base_dir =/ { print $2 }') + pidfile="${base_dir}/master.pid" + else + echo "==Error==" + echo "Config file ${config} does not exist. If this is" + echo "a new installation, please create the config files as outlined in" + echo " # pkg info -D dovecot2" + fi + run_rc_command "$1" +done diff --git a/mail/dovecot22/files/patch-src_plugins_fts_decode2text.sh b/mail/dovecot22/files/patch-src_plugins_fts_decode2text.sh new file mode 100644 index 000000000000..036303ba8079 --- /dev/null +++ b/mail/dovecot22/files/patch-src_plugins_fts_decode2text.sh @@ -0,0 +1,18 @@ +/usr gets changed to ${LOCALBASE} in post-patch:, so we +cheat and set xpdf's path to /usr/lib. + +--- src/plugins/fts/decode2text.sh.orig 2015-12-12 16:32:01 UTC ++++ src/plugins/fts/decode2text.sh +@@ -79,7 +79,11 @@ wait_timeout() { + LANG=en_US.UTF-8 + export LANG + if [ $fmt = "pdf" ]; then +- /usr/bin/pdftotext $path - 2>/dev/null& ++ if [ -x /usr/lib/xpdf/pdftotext ]; then ++ /usr/lib/xpdf/pdftotext $path - 2>/dev/null& ++ else ++ /usr/bin/pdftotext $path - 2>/dev/null& ++ fi + wait_timeout 2>/dev/null + elif [ $fmt = "doc" ]; then + (/usr/bin/catdoc $path; true) 2>/dev/null& diff --git a/mail/dovecot22/files/pkg-message.in b/mail/dovecot22/files/pkg-message.in new file mode 100644 index 000000000000..905b3401815a --- /dev/null +++ b/mail/dovecot22/files/pkg-message.in @@ -0,0 +1,30 @@ +--------------------------------------------------------------------- + + You must create the configuration files yourself. Copy them over + to %%ETCDIR%% and edit them as desired: + + cp -R %%ETCDIR%%/example-config/* \ + %%ETCDIR%% + + The default configuration includes IMAP and POP3 services, will + authenticate users agains the system's passwd file, and will use + the default /var/mail/$USER mbox files. + + Next, enable dovecot in /etc/rc.conf: + + dovecot_enable="YES" + + +--------------------------------------------------------------------- + +To avoid a risk of mailbox corruption, do not set the +security.bsd.see_other_uids or .see_other_gids sysctls to 0 +if Dovecot is storing mail for multiple concurrent users (PR 218392). + +--------------------------------------------------------------------- + + If you want to be able to search within attachments using the + decode2text plugin, you'll need to install textproc/catdoc, and + one of graphics/xpdf or graphics/poppler-utils. + +--------------------------------------------------------------------- |