1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

- Update to 1.1.3

- Add support for Berkeley DB used by the expire plugin.
- Install more DOCS.
- Move the SCRIPT_ENV substitutions to SUB_FILES
  otherwise DOVECOT_[UG]ID settings do not propagate to the binary package.
- Change from .if defined(WITHOUT_*)to .if defined(WITH_*) && !defined(WITHOUT_*)
- Make the PROTOCOLS substitution include all the protocols which are built
  into the example config file.
- Clean up patch-dovecot-example.conf and perform some post-patch processing
  to reflect more closely how this port actually installs. This is necessary
  because of the optional ManageSieve patch.
- Modify files/dovecot.sh.in to ensure runtime directories exist with correct
  permissions.
- Rework the install so all the example config files get installed into
  EXAMPLESDIR as per hier(7) independent of the NOPORTDOCS tunable. Install
  the relevant config files into etc/ if no prior version exists.
- Ensure that 'make install' and pkg_add(1) produce identical installs and
  that everything is accounted for in the PLIST.

PR:		ports/127200
Submitted by:	Yarema <yds@CoolRat.org> (maintainer)
This commit is contained in:
Beech Rintoul 2008-09-08 06:42:28 +00:00
parent e10e305cb9
commit 19ba3fc457
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=220270
9 changed files with 362 additions and 210 deletions

View File

@ -7,8 +7,7 @@
#
PORTNAME= dovecot
DISTVERSION= 1.1.2
PORTREVISION= 1
DISTVERSION= 1.1.3
CATEGORIES= mail ipv6
MASTER_SITES= http://www.dovecot.org/releases/1.1/
@ -19,7 +18,8 @@ USE_ICONV= yes
USE_RC_SUBR= dovecot.sh
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --without-shadow --localstatedir=/var
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS= --localstatedir=/var --without-shadow
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
USE_LDCONFIG= ${PREFIX}/lib/dovecot \
@ -27,16 +27,17 @@ USE_LDCONFIG= ${PREFIX}/lib/dovecot \
${PREFIX}/lib/dovecot/pop3 \
${PREFIX}/lib/dovecot/lda
.if !defined(NOPORTDOCS)
PORTDOCS= *.txt wiki
.else
.if defined(NOPORTDOCS)
CONFIGURE_ARGS+= --without-docs
.else
DOCS= AUTHORS COPYING COPYING.LGPL COPYING.MIT INSTALL NEWS TODO README
PORTDOCS= *.txt wiki ${DOCS}
.endif
DOVECOT_UID?= 143
DOVECOT_GID?= 143
SCRIPT_ENV+= DOVECOT_UID=${DOVECOT_UID} \
DOVECOT_GID=${DOVECOT_GID}
PROTOCOLS= imap
OPTIONS= KQUEUE "kqueue(2) support" on \
SSL "SSL support" on \
@ -46,6 +47,7 @@ OPTIONS= KQUEUE "kqueue(2) support" on \
MANAGESIEVE "ManageSieve support" off \
GSSAPI "GSSAPI support" off \
VPOPMAIL "VPopMail support" off \
BDB "BerkleyDB support" off \
LDAP "OpenLDAP support" off \
PGSQL "PostgreSQL support" off \
MYSQL "MySQL support" off \
@ -56,6 +58,15 @@ OPTIONS= KQUEUE "kqueue(2) support" on \
# Default requirement for dovecot rc script
_REQUIRE= LOGIN
# sed script for dovecot.conf
SED_CONF= s!%%PROTOCOLS%%!${PROTOCOLS}!g;\
s!/usr/!${PREFIX}/!g;\
s!=/usr!=${PREFIX}!g;\
s!=/etc !=${PREFIX}/etc !g;\
s!/etc/dovecot!${PREFIX}&!g;\
s![[:<:]]doc/(dovecot-[^-]+)-example.conf[[:>:]]!${EXAMPLESDIR}/\1.conf!g;\
s!\#sendmail_path = /usr/.*!sendmail_path = /usr/sbin/sendmail!g;
## kqueue(2) support
#
.if !defined(WITHOUT_KQUEUE)
@ -64,7 +75,9 @@ CONFIGURE_ARGS+= --with-ioloop=kqueue
## SSL support
#
.if defined(WITHOUT_SSL)
.if defined(WITH_SSL) && !defined(WITHOUT_SSL)
PROTOCOLS+= imaps
.else
CONFIGURE_ARGS+= --without-ssl
.endif
@ -78,10 +91,12 @@ CONFIGURE_ARGS+= --disable-ipv6
#
.if defined(WITHOUT_POP3)
CONFIGURE_ARGS+= --without-pop3d
PROTOCOLS= imap
PLIST_SUB+= POP3="@comment "
.else
PROTOCOLS= imap pop3
PROTOCOLS+= pop3
.if defined(WITH_SSL) && !defined(WITHOUT_SSL)
PROTOCOLS+= pop3s
.endif
PLIST_SUB+= POP3=""
.endif
@ -96,16 +111,18 @@ PLIST_SUB+= LDA=""
## ManageSieve support
#
.if defined(WITH_MANAGESIEVE)
.if defined(WITH_MANAGESIEVE) && !defined(WITHOUT_MANAGESIEVE)
MANAGESIEVEVERSION!= ${MAKE} -C ${.CURDIR}/../dovecot-managesieve -V PORTVERSION
PATCH_SITES!= ${MAKE} -C ${.CURDIR}/../dovecot-managesieve -V MASTER_SITES
PATCHFILES+= dovecot-${PORTVERSION}-managesieve-${MANAGESIEVEVERSION}.diff.gz
PATCH_DIST_STRIP= -p1
PROTOCOLS+= managesieve
DOCS+= README.managesieve
.endif
## GSSAPI support
#
.if defined(WITH_GSSAPI)
.if defined(WITH_GSSAPI) && !defined(WITHOUT_GSSAPI)
CONFIGURE_ARGS+= --with-gssapi
.else
CONFIGURE_ARGS+= --without-gssapi
@ -113,7 +130,7 @@ CONFIGURE_ARGS+= --without-gssapi
## VPopMail Support
#
.if defined(WITH_VPOPMAIL)
.if defined(WITH_VPOPMAIL) && !defined(WITHOUT_VPOPMAIL)
VPOPMAIL= ${LOCALBASE}/vpopmail/bin/vchkpw
BUILD_DEPENDS+= ${VPOPMAIL}:${PORTSDIR}/mail/vpopmail
CONFIGURE_ARGS+= --with-vpopmail
@ -121,67 +138,104 @@ CONFIGURE_ARGS+= --with-vpopmail
CONFIGURE_ARGS+= --without-vpopmail
.endif
## BDB Support
#
.if defined(WITH_BDB) && !defined(WITHOUT_BDB)
USE_BDB= yes
CONFIGURE_ARGS+= --with-db
CFLAGS+= -I${BDB_INCLUDE_DIR} -L${BDB_LIB_DIR}
PLIST_SUB+= BDB=""
SED_CONF+= s!^\#(dict_db_config)!\1!;
.else
PLIST_SUB+= BDB="@comment "
.endif
## OpenLDAP Support
#
.if defined(WITH_LDAP)
.if defined(WITH_LDAP) && !defined(WITHOUT_LDAP)
USE_OPENLDAP= yes
CONFIGURE_ARGS+= --with-ldap
PLIST_SUB+= LDAP=""
_REQUIRE+= slapd
.else
CONFIGURE_ARGS+= --without-ldap
PLIST_SUB+= LDAP="@comment "
.endif
## PostgreSQL Support
#
.if defined(WITH_PGSQL)
.if defined(WITH_PGSQL) && !defined(WITHOUT_PGSQL)
USE_PGSQL= yes
CONFIGURE_ARGS+= --with-pgsql
PLIST_SUB+= SQL=""
_REQUIRE+= postgresql
.else
CONFIGURE_ARGS+= --without-pgsql
PLIST_SUB+= SQL="@comment "
.endif
## MySQL Support
#
.if defined(WITH_MYSQL)
.if defined(WITH_MYSQL) && !defined(WITHOUT_MYSQL)
USE_MYSQL= yes
CONFIGURE_ARGS+= --with-mysql
PLIST_SUB+= SQL=""
_REQUIRE+= mysql
.else
CONFIGURE_ARGS+= --without-mysql
PLIST_SUB+= SQL="@comment "
.endif
## SQLite Support
#
.if defined(WITH_SQLITE)
.if defined(WITH_SQLITE) && !defined(WITHOUT_SQLITE)
USE_SQLITE= 3
CONFIGURE_ARGS+= --with-sqlite
PLIST_SUB+= SQL=""
.else
CONFIGURE_ARGS+= --without-sqlite
PLIST_SUB+= SQL="@comment "
.endif
SUB_LIST+= REQUIRE="${_REQUIRE}"
SUB_LIST+= REQUIRE="${_REQUIRE}" DOVECOT_UID=${DOVECOT_UID} DOVECOT_GID=${DOVECOT_GID}
SUB_FILES+= pkg-install pkg-deinstall pkg-message
post-patch:
.if defined(WITH_GSSAPI)
@${REINPLACE_CMD} -e 's,<gssapi/gssapi\.h>,<gssapi.h>,' \
${WRKSRC}/src/auth/mech-gssapi.c \
${WRKSRC}/configure
.endif
post-build:
@${REINPLACE_CMD} \
-e 's,%%PREFIX%%,${PREFIX},g' \
-e 's,%%PROTOCOLS%%,${PROTOCOLS},g' \
@${REINPLACE_CMD} -E -e '${SED_CONF}' \
${WRKSRC}/dovecot-example.conf
@${REINPLACE_CMD} -E -e'\
s!-example\.conf[[:>:]]!.conf!g;\
s!^(confdir[[:space:]]+=[[:space:]]+)\$$\(sysconfdir\)!\1${EXAMPLESDIR}!g;\
' ${WRKSRC}/*/Makefile.in ${WRKSRC}/Makefile.in
.if defined(WITH_GSSAPI)
@${REINPLACE_CMD} -e '\
s!<gssapi/gssapi\.h>!<gssapi.h>!;\
' ${WRKSRC}/src/auth/mech-gssapi.c ${WRKSRC}/configure
.endif
@${LN} -f ${WRKSRC}/dovecot-example.conf ${WRKSRC}/dovecot.conf
@${LN} -f ${WRKSRC}/doc/dovecot-db-example.conf ${WRKSRC}/doc/dovecot-db.conf
@${LN} -f ${WRKSRC}/doc/dovecot-ldap-example.conf ${WRKSRC}/doc/dovecot-ldap.conf
@${LN} -f ${WRKSRC}/doc/dovecot-sql-example.conf ${WRKSRC}/doc/dovecot-sql.conf
pre-install:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
@${MKDIR} ${DATADIR}
${INSTALL_SCRIPT} ${WRKSRC}/doc/mkcert.sh ${DATADIR}
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-openssl.cnf ${DATADIR}
${INSTALL_DATA} ${WRKSRC}/dovecot.conf ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-db.conf ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-ldap.conf ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-sql.conf ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-openssl.cnf ${EXAMPLESDIR}
${INSTALL_SCRIPT} ${WRKSRC}/doc/mkcert.sh ${EXAMPLESDIR}
@${GREP} '^@exec ' ${TMPPLIST} \
| ${SED} -e 's:^@exec ::; s:%D:${PREFIX}:g;' \
> ${WRKDIR}/.PLIST.exec \
&& ${SH} ${WRKDIR}/.PLIST.exec
.if !defined(NOPORTDOCS)
.for f in ${DOCS}
${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
.endfor
.endif
@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}

View File

@ -1,6 +1,6 @@
MD5 (dovecot-1.1.2.tar.gz) = fcebb6c099421049632b2f1f019f55cd
SHA256 (dovecot-1.1.2.tar.gz) = 693981dbaa3bfda0796a88995b42c17f8c48d3cc8630a4762557db01170ca91e
SIZE (dovecot-1.1.2.tar.gz) = 2300564
MD5 (dovecot-1.1.2-managesieve-0.10.3.diff.gz) = 72e1532ddd5df4ee5f8cf190a1b53cfe
SHA256 (dovecot-1.1.2-managesieve-0.10.3.diff.gz) = 67a2b7ca49d5dc96e57b534008593c9702cecd768801aaba2f588087e5fe5980
SIZE (dovecot-1.1.2-managesieve-0.10.3.diff.gz) = 6117
MD5 (dovecot-1.1.3.tar.gz) = 103ff0ffb4bcb37f22c27779553e48bc
SHA256 (dovecot-1.1.3.tar.gz) = e07d52e6d61a653672c5173d6d27fe119970c792478cbbd23b87f9fdfc0c13c7
SIZE (dovecot-1.1.3.tar.gz) = 2306933
MD5 (dovecot-1.1.3-managesieve-0.10.3.diff.gz) = 3e1755a2ca4dab1a8d1cb00d8ea9e451
SHA256 (dovecot-1.1.3-managesieve-0.10.3.diff.gz) = 045520404c0928e63a7127d9a38b7c12ff68ff74dc423f88f8af9e93f129e756
SIZE (dovecot-1.1.3-managesieve-0.10.3.diff.gz) = 5837

View File

@ -7,20 +7,31 @@
# REQUIRE: %%REQUIRE%%
# KEYWORD: shutdown
# Define these dovecot_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/dovecot
#
# Add the following lines to /etc/rc.conf to enable dovecot:
#
#dovecot_enable="YES"
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
: ${dovecot_enable:="NO"}
. %%RC_SUBR%%
name=dovecot
rcvar=`set_rcvar`
: ${dovecot_enable:="NO"}
command=%%PREFIX%%/sbin/${name}
required_files=%%PREFIX%%/etc/${name}.conf
start_precmd="${name}_prestart"
extra_commands="restart"
dovecot_prestart()
{ # Ensure runtime directories exist with correct permissions
base=/var/run/dovecot
/usr/bin/install -o root -g wheel -m 0755 -d ${base}
/usr/bin/install -o root -g dovecot -m 0750 -d ${base}/login
}
load_rc_config ${name}
run_rc_command "$1"

View File

@ -0,0 +1,10 @@
--- configure.orig 2008-07-23 19:47:03.000000000 -0400
+++ configure 2008-08-01 07:13:03.765264947 -0400
@@ -1003,6 +1003,7 @@
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+examplesdir='${datarootdir}/examples/${PACKAGE_TARNAME}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'

View File

@ -1,213 +1,288 @@
--- dovecot-example.conf.orig 2008-06-21 21:21:38.422213158 +0100
+++ dovecot-example.conf 2008-06-21 21:29:47.638914442 +0100
@@ -12,7 +12,7 @@
# Default values are shown for each setting, it's not required to uncomment
# any of the lines. Exception to this are paths, they're just examples with
# the real defaults being based on configure options. The paths listed here
-# are for configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+# are for configure --prefix=%%PREFIX%% --sysconfdir=%%PREFIX%%/etc --localstatedir=/var
# --with-ssldir=/etc/ssl
--- dovecot-example.conf.orig 2008-08-28 06:53:28.000000000 -0400
+++ dovecot-example.conf 2008-08-28 06:53:28.000000000 -0400
@@ -20,7 +20,7 @@
# Base directory where to store runtime data.
@@ -21,6 +21,7 @@
# Protocols we want to be serving: imap imaps pop3 pop3s
# If you only want to use dovecot-auth, you can set this to "none".
#protocols = imap imaps
-#protocols = imap imaps
+protocols = %%PROTOCOLS%%
# A space separated list of IP or host addresses where to listen in for
# connections. "*" listens in all IPv4 interfaces. "[::]" listens in all IPv6
@@ -213,6 +214,7 @@
@@ -44,7 +44,7 @@
# SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP
# matches the local IP (ie. you're connecting from the same computer), the
# connection is considered secure and plaintext authentication is allowed.
-#disable_plaintext_auth = yes
+disable_plaintext_auth = no
# Should all IMAP and POP3 processes be killed when Dovecot master process
# shuts down. Setting this to "no" means that Dovecot can be upgraded without
@@ -211,7 +211,7 @@
#
# <doc/wiki/MailLocation.txt>
#
#mail_location =
-#mail_location =
+mail_location = mbox:~/mail/:INBOX=/var/mail/%u
# If you need to set multiple mailbox locations or want to change default
# namespace settings, you can do it by defining namespace sections.
@@ -273,6 +275,7 @@
@@ -271,7 +271,7 @@
# Group to enable temporarily for privileged operations. Currently this is
# used only with INBOX when either its initial creation or dotlocking fails.
# Typically this is set to "mail" to give access to /var/mail.
#mail_privileged_group =
-#mail_privileged_group =
+mail_privileged_group = mail
# Grant access to these supplementary groups for mail processes. Typically
# these are used to set up access to shared mailboxes. Note that it may be
@@ -340,6 +343,7 @@
@@ -310,7 +310,7 @@
# Rely on O_EXCL to work when creating dotlock files. NFS supports O_EXCL
# since version 3, so this should be safe to use nowadays by default.
-#dotlock_use_excl = yes
+dotlock_use_excl = yes
# Don't use fsync() or fdatasync() calls. This makes the performance better
# at the cost of potential data loss if the server (or the file server)
@@ -338,20 +338,20 @@
# Show more verbose process titles (in ps). Currently shows user name and
# IP address. Useful for seeing who are actually using the IMAP processes
# (eg. shared mailboxes or if same uid is used for multiple accounts).
#verbose_proctitle = no
-#verbose_proctitle = no
+verbose_proctitle = yes
# Valid UID range for users, defaults to 500 and above. This is mostly
# to make sure that users can't log in as daemons or other system users.
@@ -353,6 +357,7 @@
# Note that denying root logins is hardcoded to dovecot binary and can't
# be done even if first_valid_uid is set to 0.
-#first_valid_uid = 500
+first_valid_uid = 1000
#last_valid_uid = 0
# Valid GID range for users, defaults to non-root/wheel. Users having
# non-valid GID as primary group ID aren't allowed to log in. If user
# belongs to supplementary groups with non-valid GIDs, those groups are
# not set.
#first_valid_gid = 1
+first_valid_gid = 0
-#first_valid_gid = 1
+first_valid_gid = 1000
#last_valid_gid = 0
# Maximum number of running mail processes. When this limit is reached,
@@ -503,19 +508,19 @@
@@ -418,7 +418,7 @@
protocol imap {
# Login executable location.
- #login_executable = /usr/libexec/dovecot/imap-login
+ #login_executable = %%PREFIX%%/libexec/dovecot/imap-login
# When copying a message, do it with hard links whenever possible. This makes
# the performance much better, and it's unlikely to have any side effects.
-#maildir_copy_with_hardlinks = yes
+maildir_copy_with_hardlinks = yes
# IMAP executable location. Changing this allows you to execute other
# binaries before the imap process is executed.
#
# This would write rawlogs into ~/dovecot.rawlog/ directory:
- # mail_executable = /usr/libexec/dovecot/rawlog /usr/libexec/dovecot/imap
+ # mail_executable = %%PREFIX%%/libexec/dovecot/rawlog %%PREFIX%%/libexec/dovecot/imap
#
# This would attach gdb into the imap process and write backtraces into
# /tmp/gdbhelper.* files:
- # mail_executable = /usr/libexec/dovecot/gdbhelper /usr/libexec/dovecot/imap
+ # mail_executable = %%PREFIX%%/libexec/dovecot/gdbhelper %%PREFIX%%/libexec/dovecot/imap
#
- #mail_executable = /usr/libexec/dovecot/imap
+ #mail_executable = %%PREFIX%%/libexec/dovecot/imap
# Maximum IMAP command line length in bytes. Some clients generate very long
# command lines with huge mailboxes, so you may need to raise this if you get
@@ -529,7 +534,7 @@
# Support for dynamically loadable plugins. mail_plugins is a space separated
# list of plugins to load.
#mail_plugins =
- #mail_plugin_dir = /usr/lib/dovecot/imap
+ #mail_plugin_dir = %%PREFIX%%/lib/dovecot/imap
# When copying a message, try to preserve the base filename. Only if the
# destination mailbox already contains the same name (ie. the mail is being
@@ -426,7 +426,7 @@
# done only by looking at dovecot-uidlist file, so if something outside
# Dovecot does similar filename preserving copies, you may run into problems.
# NOTE: This setting requires maildir_copy_with_hardlinks = yes to work.
-#maildir_copy_preserve_filename = no
+maildir_copy_preserve_filename = yes
##
## mbox-specific settings
@@ -533,7 +533,7 @@
# Send IMAP capabilities in greeting message. This makes it unnecessary for
# clients to request it with CAPABILITY command, so it saves one round-trip.
@@ -564,6 +569,7 @@
# Many clients however don't understand it and ask the CAPABILITY anyway.
- #login_greeting_capability = no
+ login_greeting_capability = yes
# IMAP logout format string:
# %i - total number of bytes read from client
@@ -562,7 +562,7 @@
# but not both. Thunderbird separates these two by forcing server to
# accept '/' suffix in mailbox names in subscriptions list.
# The list is space-separated.
#imap_client_workarounds =
- #imap_client_workarounds =
+ imap_client_workarounds = delay-newmail netscape-eoh tb-extra-mailbox-sep
}
##
@@ -572,11 +578,11 @@
@@ -585,7 +585,7 @@
# Support LAST command which exists in old POP3 specs, but has been removed
# from new ones. Some clients still wish to use this though. Enabling this
# makes RSET command clear all \Seen flags from messages.
- #pop3_enable_last = no
+ pop3_enable_last = yes
protocol pop3 {
# Login executable location.
- #login_executable = /usr/libexec/dovecot/pop3-login
+ #login_executable = %%PREFIX%%/libexec/dovecot/pop3-login
# If mail has X-UIDL header, use it as the mail's UIDL.
#pop3_reuse_xuidl = no
@@ -614,7 +614,7 @@
# Dovecot's default, so if you're building a new server it would be a good
# idea to change this. %08Xu%08Xv should be pretty fail-safe.
#
- #pop3_uidl_format = %08Xu%08Xv
+ pop3_uidl_format = %08Xu%08Xv
# POP3 executable location. See IMAP's mail_executable above for examples
# how this could be changed.
- #mail_executable = /usr/libexec/dovecot/pop3
+ #mail_executable = %%PREFIX%%/libexec/dovecot/pop3
# Don't try to set mails non-recent or seen with POP3 sessions. This is
# mostly intended to reduce disk I/O. With maildir it doesn't move files
@@ -636,7 +642,7 @@
# Support for dynamically loadable plugins. mail_plugins is a space separated
# list of plugins to load.
#mail_plugins =
- #mail_plugin_dir = /usr/lib/dovecot/pop3
+ #mail_plugin_dir = %%PREFIX%%/lib/dovecot/pop3
# Workarounds for various client bugs:
# outlook-no-nuls:
@@ -647,6 +653,7 @@
# POP3 logout format string:
# %i - total number of bytes read from client
@@ -645,7 +645,7 @@
# Outlook Express and Netscape Mail breaks if end of headers-line is
# missing. This option simply sends it if it's missing.
# The list is space-separated.
#pop3_client_workarounds =
- #pop3_client_workarounds =
+ pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}
##
@@ -664,7 +671,7 @@
# Support for dynamically loadable plugins. mail_plugins is a space separated
# list of plugins to load.
#mail_plugins =
- #mail_plugin_dir = /usr/lib/dovecot/lda
+ #mail_plugin_dir = %%PREFIX%%/lib/dovecot/lda
@@ -667,7 +667,7 @@
# If user is over quota, return with temporary failure instead of
# bouncing the mail.
@@ -679,6 +686,7 @@
- #quota_full_tempfail = no
+ quota_full_tempfail = yes
# Binary to use for sending mails.
#sendmail_path = /usr/lib/sendmail
+ sendmail_path = /usr/sbin/sendmail
# Format to use for logging mail deliveries. You can use variables:
# %$ - Delivery status message (e.g. "saved to INBOX")
@@ -736,7 +736,7 @@
# the standard variables here, eg. %Lu would lowercase the username, %n would
# drop away the domain if it was given, or "%n-AT-%d" would change the '@' into
# "-AT-". This translation is done after auth_username_translation changes.
-#auth_username_format =
+auth_username_format = %Ln
# Human readable error message for rejection mails. Use can use variables:
# %n = CRLF, %r = reason, %s = subject, %t = recipient
@@ -693,7 +701,7 @@
##
# If you want to allow master users to log in by specifying the master
# username within the normal username string (ie. not using SASL mechanism's
@@ -792,7 +792,7 @@
# plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi otp skey
# gss-spnego
# NOTE: See also disable_plaintext_auth setting.
- mechanisms = plain
+ mechanisms = plain login
# Executable location
-#auth_executable = /usr/libexec/dovecot/dovecot-auth
+#auth_executable = %%PREFIX%%/libexec/dovecot/dovecot-auth
#
# Password database is used to verify user's password (and nothing more).
@@ -854,6 +854,7 @@
# args = session=yes %Ls
# args = cache_key=%u dovecot
#args = dovecot
+ args = session=yes dovecot
}
# Set max. process size in megabytes.
#auth_process_size = 256
@@ -783,7 +791,7 @@
#auth_ntlm_use_winbind = no
# System users (NSS, /etc/passwd, or similiar)
@@ -897,14 +898,16 @@
# Path for Samba's ntlm_auth helper binary.
-#auth_winbind_helper_path = /usr/bin/ntlm_auth
+#auth_winbind_helper_path = %%PREFIX%%/bin/ntlm_auth
# Number of seconds to delay before replying to failed authentications.
#auth_failure_delay = 2
@@ -816,7 +824,7 @@
#passdb passwd-file {
# File contains a list of usernames, one per line
- #args = /etc/dovecot.deny
+ #args = %%PREFIX%%/etc/dovecot.deny
#deny = yes
# SQL database <doc/wiki/AuthDatabase.SQL.txt>
#passdb sql {
- # Path for SQL configuration file, see doc/dovecot-sql-example.conf
- #args =
+ # Path for SQL configuration file.
+ # See doc/dovecot-sql-example.conf
+ #args = /etc/dovecot-sql.conf
#}
@@ -1053,7 +1061,7 @@
# referenced using URIs in format "proxy:<name>".
# LDAP database <doc/wiki/AuthDatabase.LDAP.txt>
#passdb ldap {
- # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf
- #args =
+ # Path for LDAP configuration file.
+ # See doc/dovecot-ldap-example.conf
+ #args = /etc/dovecot-ldap.conf
#}
dict {
- #quota = mysql:/etc/dovecot-dict-quota.conf
+ #quota = mysql:%%PREFIX%%/etc/dovecot-dict-quota.conf
# vpopmail authentication <doc/wiki/AuthDatabase.VPopMail.txt>
@@ -931,7 +934,7 @@
# proceses. Useful with remote NSS lookups that may block.
# NOTE: Be sure to use this setting with nss_ldap or users might get
# logged in as each others!
- #args =
+ args = blocking=yes
}
# passwd-like file with specified location
@@ -960,14 +963,16 @@
# SQL database <doc/wiki/AuthDatabase.SQL.txt>
#userdb sql {
- # Path for SQL configuration file, see doc/dovecot-sql-example.conf
- #args =
+ # Path for SQL configuration file.
+ # See doc/dovecot-sql-example.conf
+ #args = /etc/dovecot-sql.conf
#}
# LDAP database <doc/wiki/AuthDatabase.LDAP.txt>
#userdb ldap {
- # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf
- #args =
+ # Path for LDAP configuration file.
+ # See doc/dovecot-ldap-example.conf
+ #args = /etc/dovecot-ldap.conf
#}
# vpopmail <doc/wiki/AuthDatabase.VPopMail.txt>
@@ -1007,25 +1012,25 @@
#ssl_username_from_cert = no
# It's possible to export the authentication interface to other programs:
- #socket listen {
- #master {
+ socket listen {
+ master {
# Master socket provides access to userdb information. It's typically
# used to give Dovecot's local delivery agent access to userdb so it
# can find mailbox locations.
- #path = /var/run/dovecot/auth-master
- #mode = 0600
+ path = /var/run/dovecot/auth-master
+ mode = 0600
# Default user/group is the one who started dovecot-auth (root)
#user =
#group =
- #}
- #client {
+ }
+ client {
# The client socket is generally safe to export to everyone. Typical use
# is to export it to your SMTP server so it can do SMTP AUTH lookups
# using it.
- #path = /var/run/dovecot/auth-client
- #mode = 0660
- #}
- #}
+ path = /var/run/dovecot/auth-client
+ mode = 0660
+ }
+ }
}
# Path to Berkeley DB's configuration file. See doc/dovecot-db.conf for an
@@ -1095,8 +1103,8 @@
# If you wish to use another authentication server than dovecot-auth, you can
@@ -1055,8 +1060,9 @@
#quota = mysql:/etc/dovecot-dict-quota.conf
}
-# Path to Berkeley DB's configuration file. See doc/dovecot-db-example.conf
-#dict_db_config =
+# Path to Berkeley DB's configuration file.
+# See doc/dovecot-db-example.conf
+#dict_db_config = /etc/dovecot-db.conf
##
## Plugin settings
@@ -1093,8 +1099,8 @@
# Each quota root has separate limits. Only the command for the first
# exceeded limit is excecuted, so put the highest limit first.
# Note that % needs to be escaped as %%, otherwise "% " expands to empty.
- # quota_warning = storage=95%% /usr/local/bin/quota-warning.sh 95
- # quota_warning2 = storage=80%% /usr/local/bin/quota-warning.sh 80
+ # quota_warning = storage=95%% %%PREFIX%%/local/bin/quota-warning.sh 95
+ # quota_warning2 = storage=80%% %%PREFIX%%/local/bin/quota-warning.sh 80
+ # quota_warning = storage=95%% /usr/bin/quota-warning.sh 95
+ # quota_warning2 = storage=80%% /usr/bin/quota-warning.sh 80
#quota = maildir
# ACL plugin. vfile backend reads ACLs from "dovecot-acl" file from maildir
@@ -1105,7 +1113,7 @@
# one file for each mailbox, eg. INBOX or sub.mailbox. cache_secs parameter
# specifies how many seconds to wait between stat()ing dovecot-acl file
# to see if it changed.
- #acl = vfile:/etc/dovecot-acls:cache_secs=300
+ #acl = vfile:%%PREFIX%%/etc/dovecot-acls:cache_secs=300
# Convert plugin. If set, specifies the source storage path which is
# converted to destination storage (mail_location) when the user logs in.
@@ -1124,14 +1132,14 @@
# until the message can be saved within quota limits. The configuration file
# is a text file where each line is in format: <priority> <mailbox name>
# Mails are first deleted in lowest -> highest priority number order
- #trash = /etc/dovecot-trash.conf
+ #trash = %%PREFIX%%/etc/dovecot-trash.conf
# Expire plugin. Mails are expunged from mailboxes after being there the
# configurable time. The first expiration date for each mailbox is stored in
# a dictionary so it can be quickly determined which mailboxes contain
# expired mails. The actual expunging is done in a nightly cronjob, which
@@ -1131,7 +1137,7 @@
# you must set up:
- # dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool
+ # dovecot --exec-mail ext %%PREFIX%%/libexec/dovecot/expire-tool
# dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool
#expire = Trash 7 Spam 30
#expire_dict = db:/var/lib/dovecot/expire.db
- #expire_dict = db:/var/lib/dovecot/expire.db
+ #expire_dict = db:/var/db/dovecot/expire.db
# Lazy expunge plugin. Currently works only with maildirs. When a user
# expunges mails, the mails are moved to a mailbox in another namespace

View File

@ -1,5 +1,7 @@
#! /bin/sh
#
# $FreeBSD: /tmp/pcvs/ports/mail/dovecot/files/pkg-deinstall.in,v 1.1 2008-09-08 06:42:28 beech Exp $
#
# ex:ts=4
ask() {
@ -37,7 +39,8 @@ delete_account() {
group=${3%:*}
gid=${3#*:}
echo "If you do not intend to reinstall ${port}, you should manually remove the user '${user}' (uid='${uid}') and the group '${group}' (gid='${gid}')."
echo "If you do not intend to reinstall ${port}, you should manually"
echo "remove user '${user}' (uid='${uid}') and group '${group}' (gid='${gid}')."
}
case $2 in
@ -52,7 +55,9 @@ DEINSTALL)
fi
fi
delete_account Dovecot dovecot:${DOVECOT_UID:-143} dovecot:${DOVECOT_GID:-143}
delete_account Dovecot dovecot:${DOVECOT_UID:-%%DOVECOT_UID%%} dovecot:${DOVECOT_GID:-%%DOVECOT_GID%%}
echo "Also manually rm -rf /var/db/dovecot if anything was stored there."
base=/var/run/dovecot
DIRLIST="${base}/login ${base}"

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $FreeBSD$
# $FreeBSD: /tmp/pcvs/ports/mail/dovecot/files/pkg-install.in,v 1.1 2008-09-08 06:42:28 beech Exp $
#
# ex:ts=4
@ -85,23 +85,13 @@ create_account() {
case $2 in
PRE-INSTALL)
create_account Dovecot dovecot:${DOVECOT_UID:-143} dovecot:${DOVECOT_GID:-143} "Dovecot User" /var/empty /usr/sbin/nologin
create_account Dovecot dovecot:${DOVECOT_UID:-%%DOVECOT_UID%%} dovecot:${DOVECOT_GID:-%%DOVECOT_GID%%} "Dovecot User" /var/empty /usr/sbin/nologin
;;
POST-INSTALL)
base=/var/run/dovecot
DIRLIST="${base} ${base}/login"
echo "Fixing ownerships and modes in \"${base}\"."
for directory in ${DIRLIST}; do
if [ ! -d "${directory}" ]; then
mkdir -p ${directory}
echo "Created directory: ${directory}"
fi
done
chown -R root:wheel ${base}
chmod -R 0755 ${base}
chown -R root:dovecot ${base}/login
chmod -R 0750 ${base}/login
/usr/bin/install -o root -g wheel -m 0755 -d ${base}
/usr/bin/install -o root -g dovecot -m 0750 -d ${base}/login
;;
esac

View File

@ -1,10 +1,4 @@
@comment $FreeBSD$
@unexec if cmp -s %D/etc/dovecot-example.conf %D/etc/dovecot.conf; then rm -f %D/etc/dovecot.conf; fi
etc/dovecot-example.conf
@exec if [ ! -f %D/etc/dovecot.conf ] ; then cp -p %D/%F %B/dovecot.conf; fi
%%PORTDOCS%%etc/dovecot-db-example.conf
%%PORTDOCS%%etc/dovecot-ldap-example.conf
%%PORTDOCS%%etc/dovecot-sql-example.conf
@dirrmtry include/dovecot
lib/dovecot/imap/lib01_acl_plugin.so
lib/dovecot/imap/lib02_lazy_expunge_plugin.so
@ -29,7 +23,7 @@ lib/dovecot/lda/lib20_expire_plugin.so
lib/dovecot/lda/lib20_fts_plugin.so
lib/dovecot/lda/lib20_mail_log_plugin.so
lib/dovecot/lda/lib21_fts_squat_plugin.so
@dirrm lib/dovecot/lda
@dirrmtry lib/dovecot/lda
lib/dovecot/pop3/lib02_lazy_expunge_plugin.so
lib/dovecot/pop3/lib10_quota_plugin.so
lib/dovecot/pop3/lib20_convert_plugin.so
@ -40,6 +34,7 @@ lib/dovecot/pop3/lib20_mbox_snarf_plugin.so
lib/dovecot/pop3/lib20_zlib_plugin.so
lib/dovecot/pop3/lib21_fts_squat_plugin.so
@dirrm lib/dovecot/pop3
@exec install -o root -g wheel -m 0755 -d %D/lib/dovecot/auth
@dirrm lib/dovecot/auth
lib/dovecot/lib01_acl_plugin.a
lib/dovecot/lib01_acl_plugin.la
@ -74,7 +69,7 @@ lib/dovecot/lib20_zlib_plugin.la
lib/dovecot/lib21_fts_squat_plugin.a
lib/dovecot/lib21_fts_squat_plugin.la
lib/dovecot/lib21_fts_squat_plugin.so
@dirrm lib/dovecot
@dirrmtry lib/dovecot
libexec/dovecot/checkpassword-reply
libexec/dovecot/convert-tool
%%LDA%%libexec/dovecot/deliver
@ -92,9 +87,21 @@ libexec/dovecot/maildirlock
%%POP3%%libexec/dovecot/pop3-login
libexec/dovecot/rawlog
libexec/dovecot/ssl-build-param
@dirrm libexec/dovecot
@dirrmtry libexec/dovecot
sbin/dovecot
sbin/dovecotpw
%%DATADIR%%/dovecot-openssl.cnf
%%DATADIR%%/mkcert.sh
@dirrm %%DATADIR%%
@unexec if cmp -s %D/%%EXAMPLESDIR%%/dovecot.conf %D/etc/dovecot.conf; then rm -f %D/etc/dovecot.conf; fi
%%EXAMPLESDIR%%/dovecot.conf
@exec if [ ! -f %D/etc/dovecot.conf ]; then cp -p %D/%%EXAMPLESDIR%%/dovecot.conf %D/etc/dovecot.conf; fi
%%BDB%%@unexec if cmp -s %D/%%EXAMPLESDIR%%/dovecot-db.conf %D/etc/dovecot-db.conf; then rm -f %D/etc/dovecot-db.conf; fi
%%EXAMPLESDIR%%/dovecot-db.conf
%%BDB%%@exec if [ ! -f %D/etc/dovecot-db.conf ]; then cp -p %D/%%EXAMPLESDIR%%/dovecot-db.conf %D/etc/dovecot-db.conf; fi
%%LDAP%%@unexec if cmp -s %D/%%EXAMPLESDIR%%/dovecot-ldap.conf %D/etc/dovecot-ldap.conf; then rm -f %D/etc/dovecot-ldap.conf; fi
%%EXAMPLESDIR%%/dovecot-ldap.conf
%%LDAP%%@exec if [ ! -f %D/etc/dovecot-ldap.conf ]; then cp -p %D/%%EXAMPLESDIR%%/dovecot-ldap.conf %D/etc/dovecot-ldap.conf; fi
%%SQL%%@unexec if cmp -s %D/%%EXAMPLESDIR%%/dovecot-sql.conf %D/etc/dovecot-sql.conf; then rm -f %D/etc/dovecot-sql.conf; fi
%%EXAMPLESDIR%%/dovecot-sql.conf
%%SQL%%@exec if [ ! -f %D/etc/dovecot-sql.conf ]; then cp -p %D/%%EXAMPLESDIR%%/dovecot-sql.conf %D/etc/dovecot-sql.conf; fi
%%EXAMPLESDIR%%/dovecot-openssl.cnf
%%EXAMPLESDIR%%/mkcert.sh
@dirrm %%EXAMPLESDIR%%