diff options
Diffstat (limited to 'mail/dovecot')
-rw-r--r-- | mail/dovecot/Makefile | 10 | ||||
-rw-r--r-- | mail/dovecot/distinfo | 12 | ||||
-rw-r--r-- | mail/dovecot/files/dovecot.sh.in | 42 | ||||
-rw-r--r-- | mail/dovecot/files/patch-dovecot-example.conf | 71 | ||||
-rw-r--r-- | mail/dovecot/files/pkg-deinstall.in | 16 | ||||
-rw-r--r-- | mail/dovecot/files/pkg-install.in | 11 |
6 files changed, 67 insertions, 95 deletions
diff --git a/mail/dovecot/Makefile b/mail/dovecot/Makefile index 10aa9c023025..b27d95740097 100644 --- a/mail/dovecot/Makefile +++ b/mail/dovecot/Makefile @@ -1,4 +1,3 @@ -# ex:ts=8 # New ports collection makefile for: dovecot # Date created: 12/08/2002 # Whom: Dominic Marks <dominic.marks@btinternet.com> @@ -7,12 +6,11 @@ # PORTNAME= dovecot -PORTVERSION= 1.1.3 -PORTREVISION= 1 +PORTVERSION= 1.1.7 CATEGORIES= mail ipv6 MASTER_SITES= http://www.dovecot.org/releases/1.1/ -MAINTAINER= yds@coolrat.org +MAINTAINER= yds@CoolRat.org COMMENT= Secure and compact IMAP and POP3 servers USE_ICONV= yes @@ -20,7 +18,9 @@ USE_RC_SUBR= dovecot.sh GNU_CONFIGURE= yes CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} -CONFIGURE_ARGS= --localstatedir=/var --without-shadow +CONFIGURE_ARGS= --localstatedir=/var \ + --with-statedir=/var/db/dovecot \ + --without-shadow CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" USE_LDCONFIG= ${PREFIX}/lib/dovecot \ diff --git a/mail/dovecot/distinfo b/mail/dovecot/distinfo index d31aa6ec0fa5..91db5e342bec 100644 --- a/mail/dovecot/distinfo +++ b/mail/dovecot/distinfo @@ -1,6 +1,6 @@ -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 +MD5 (dovecot-1.1.7.tar.gz) = ea83ea2000a5b2e1744c7c97eb5585d1 +SHA256 (dovecot-1.1.7.tar.gz) = 915cae7684438c6335d0472ff20ec2fe44d620aa61f404ce91fd02a27434cf9f +SIZE (dovecot-1.1.7.tar.gz) = 2325617 +MD5 (dovecot-1.1.7-managesieve-0.10.4.diff.gz) = 57a751fb10ac3fcb700d5cc434546be2 +SHA256 (dovecot-1.1.7-managesieve-0.10.4.diff.gz) = dc13a3c231c7bd29a452e16f3654c941bfc2a89c31e6b392ac76ca47cd897a76 +SIZE (dovecot-1.1.7-managesieve-0.10.4.diff.gz) = 5912 diff --git a/mail/dovecot/files/dovecot.sh.in b/mail/dovecot/files/dovecot.sh.in index 25fb7281c054..edf7033e0ab0 100644 --- a/mail/dovecot/files/dovecot.sh.in +++ b/mail/dovecot/files/dovecot.sh.in @@ -7,34 +7,44 @@ # REQUIRE: %%REQUIRE%% # KEYWORD: shutdown -# Define these dovecot_* variables in one of these files: +# Define dovecot_* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local # /etc/rc.conf.d/dovecot -# -# DO NOT CHANGE THESE DEFAULT VALUES HERE -# -: ${dovecot_enable:="NO"} . %%RC_SUBR%% name=dovecot rcvar=`set_rcvar` -command=%%PREFIX%%/sbin/${name} -required_files=%%PREFIX%%/etc/${name}.conf -start_precmd="${name}_prestart" +# read configuration and set defaults +load_rc_config ${name} +: ${dovecot_enable:="NO"} + +command="%%PREFIX%%/sbin/${name}" +command_args="-c ${dovecot_config:="%%PREFIX%%/etc/${name}.conf"}" +required_files="${dovecot_config}" +start_precmd="start_precmd" +stop_postcmd="stop_postcmd" extra_commands="restart" -dovecot_prestart() +base_dir=$(${command} ${command_args} -a | /usr/bin/awk -F ': ' '/^base_dir:/ { print $2 }') +login_dir=$(${command} ${command_args} -a | /usr/bin/awk -F ': ' '/^login_dir:/ { print $2 }') +login_user=$(${command} ${command_args} -a | /usr/bin/awk -F ': ' '/^login_user:/ { print $2 }') + +pidfile="${base_dir}/master.pid" + +start_precmd() { # Ensure runtime directories exist with correct permissions - local base user gid - base=/var/run/${name} - user=$(awk -F '[[:space:]]*=[[:space:]]*' '/^[[:space:]]*login_user[[:space:]]*=/ { print $2 }' ${required_files}) - gid=$(pw usershow -n "${user:-${name}}" 2>/dev/null | cut -d: -f4) - /usr/bin/install -o root -g wheel -m 0755 -d ${base} - /usr/bin/install -o root -g ${gid} -m 0750 -d ${base}/login + local gid + 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} + /usr/bin/install -o root -g ${gid} -m 0750 -d ${login_dir} +} + +stop_postcmd() +{ # Cleanup runtime directories + rm -rf ${base_dir} 2>/dev/null } -load_rc_config ${name} run_rc_command "$1" diff --git a/mail/dovecot/files/patch-dovecot-example.conf b/mail/dovecot/files/patch-dovecot-example.conf index ba0fe1984864..d6f4519ee045 100644 --- a/mail/dovecot/files/patch-dovecot-example.conf +++ b/mail/dovecot/files/patch-dovecot-example.conf @@ -1,5 +1,5 @@ ---- dovecot-example.conf.orig 2008-08-28 06:53:28.000000000 -0400 -+++ dovecot-example.conf 2008-08-28 06:53:28.000000000 -0400 +--- dovecot-example.conf.orig 2008-11-23 16:53:53.000000000 -0500 ++++ dovecot-example.conf 2008-11-23 16:53:53.000000000 -0500 @@ -20,7 +20,7 @@ # Protocols we want to be serving: imap imaps pop3 pop3s @@ -18,7 +18,7 @@ # 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 @@ +@@ -213,7 +213,7 @@ # # <doc/wiki/MailLocation.txt> # @@ -27,7 +27,7 @@ # If you need to set multiple mailbox locations or want to change default # namespace settings, you can do it by defining namespace sections. -@@ -271,7 +271,7 @@ +@@ -273,7 +273,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. @@ -36,7 +36,7 @@ # 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 -@@ -310,7 +310,7 @@ +@@ -312,7 +312,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. @@ -45,7 +45,7 @@ # 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 @@ +@@ -340,20 +340,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). @@ -69,7 +69,7 @@ #last_valid_gid = 0 # Maximum number of running mail processes. When this limit is reached, -@@ -418,7 +418,7 @@ +@@ -420,7 +420,7 @@ # 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. @@ -78,16 +78,7 @@ # 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 @@ +@@ -535,7 +535,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. # Many clients however don't understand it and ask the CAPABILITY anyway. @@ -96,7 +87,7 @@ # IMAP logout format string: # %i - total number of bytes read from client -@@ -562,7 +562,7 @@ +@@ -564,7 +564,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. @@ -105,16 +96,7 @@ } ## -@@ -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 - - # If mail has X-UIDL header, use it as the mail's UIDL. - #pop3_reuse_xuidl = no -@@ -614,7 +614,7 @@ +@@ -616,7 +616,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. # @@ -123,7 +105,7 @@ # POP3 logout format string: # %i - total number of bytes read from client -@@ -645,7 +645,7 @@ +@@ -647,7 +647,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. @@ -132,25 +114,16 @@ } ## -@@ -667,7 +667,7 @@ - - # If user is over quota, return with temporary failure instead of - # bouncing the mail. -- #quota_full_tempfail = no -+ quota_full_tempfail = yes - - # Format to use for logging mail deliveries. You can use variables: - # %$ - Delivery status message (e.g. "saved to INBOX") -@@ -736,7 +736,7 @@ +@@ -738,7 +738,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 ++auth_username_format = %Lu # 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 @@ +@@ -794,7 +794,7 @@ # plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi otp skey # gss-spnego # NOTE: See also disable_plaintext_auth setting. @@ -159,7 +132,7 @@ # # Password database is used to verify user's password (and nothing more). -@@ -854,6 +854,7 @@ +@@ -856,6 +856,7 @@ # args = session=yes %Ls # args = cache_key=%u dovecot #args = dovecot @@ -167,7 +140,7 @@ } # System users (NSS, /etc/passwd, or similiar) -@@ -897,14 +898,16 @@ +@@ -899,14 +900,16 @@ # SQL database <doc/wiki/AuthDatabase.SQL.txt> #passdb sql { @@ -188,7 +161,7 @@ #} # vpopmail authentication <doc/wiki/AuthDatabase.VPopMail.txt> -@@ -931,7 +934,7 @@ +@@ -933,7 +936,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! @@ -197,7 +170,7 @@ } # passwd-like file with specified location -@@ -960,14 +963,16 @@ +@@ -962,14 +965,16 @@ # SQL database <doc/wiki/AuthDatabase.SQL.txt> #userdb sql { @@ -218,7 +191,7 @@ #} # vpopmail <doc/wiki/AuthDatabase.VPopMail.txt> -@@ -1007,25 +1012,25 @@ +@@ -1009,25 +1014,25 @@ #ssl_username_from_cert = no # It's possible to export the authentication interface to other programs: @@ -254,7 +227,7 @@ } # If you wish to use another authentication server than dovecot-auth, you can -@@ -1055,8 +1060,9 @@ +@@ -1057,8 +1062,9 @@ #quota = mysql:/etc/dovecot-dict-quota.conf } @@ -266,7 +239,7 @@ ## ## Plugin settings -@@ -1093,8 +1099,8 @@ +@@ -1095,8 +1101,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. @@ -277,7 +250,7 @@ #quota = maildir # ACL plugin. vfile backend reads ACLs from "dovecot-acl" file from maildir -@@ -1131,7 +1137,7 @@ +@@ -1133,7 +1139,7 @@ # you must set up: # dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool #expire = Trash 7 Spam 30 diff --git a/mail/dovecot/files/pkg-deinstall.in b/mail/dovecot/files/pkg-deinstall.in index 30ae84752a39..d4192f7efbed 100644 --- a/mail/dovecot/files/pkg-deinstall.in +++ b/mail/dovecot/files/pkg-deinstall.in @@ -1,8 +1,9 @@ #! /bin/sh # -# $FreeBSD: /tmp/pcvs/ports/mail/dovecot/files/pkg-deinstall.in,v 1.1 2008-09-08 06:42:28 beech Exp $ +# $FreeBSD: /tmp/pcvs/ports/mail/dovecot/files/pkg-deinstall.in,v 1.2 2008-11-28 14:38:26 wxs Exp $ # -# ex:ts=4 + +PKG_PREFIX=${PKG_PREFIX:=/usr/local} ask() { local question default answer @@ -48,7 +49,7 @@ case $2 in DEINSTALL) if ps -axc | grep -qw dovecot; then if yesno "Dovecot is still running. Shall I stop it?" y; then - killall dovecot + ${PKG_PREFIX}/etc/rc.d/dovecot stop sleep 2 else echo "OK ... I hope you know what you are doing." @@ -57,14 +58,7 @@ DEINSTALL) 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}" - echo "Cleaning up \"${base}\"." - for directory in ${DIRLIST}; do - rmdir ${directory} 2>/dev/null || : - done + echo "Also manually 'rm -rf /var/db/dovecot' if anything was stored there." ;; esac diff --git a/mail/dovecot/files/pkg-install.in b/mail/dovecot/files/pkg-install.in index 93faa0f3e36f..d1b52d5d8941 100644 --- a/mail/dovecot/files/pkg-install.in +++ b/mail/dovecot/files/pkg-install.in @@ -1,8 +1,9 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/mail/dovecot/files/pkg-install.in,v 1.1 2008-09-08 06:42:28 beech Exp $ +# $FreeBSD: /tmp/pcvs/ports/mail/dovecot/files/pkg-install.in,v 1.2 2008-11-28 14:38:26 wxs Exp $ # -# ex:ts=4 + +PKG_PREFIX=${PKG_PREFIX:=/usr/local} ask() { local question default answer @@ -88,10 +89,4 @@ PRE-INSTALL) 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 - /usr/bin/install -o root -g wheel -m 0755 -d ${base} - /usr/bin/install -o root -g dovecot -m 0750 -d ${base}/login - ;; - esac |