summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndraž Levstik2007-04-01 00:10:31 +0200
committerJeremy Blosser2007-03-31 18:24:35 -0500
commit259b682ceedc9fd2c22d411c8ffd5103b4d88cd4 (patch)
tree0186640c26d240055ad3d93434d85cae564243e4
parent28ad6f09630458c8e0a16bc3d8b1994ea6f3c719 (diff)
dovecot: revamped the spell and added managesieve patch
(cherry picked from commit 96b4f6ba2c8b40fd4f5c5c664f8e382598ddc4a3)
-rwxr-xr-xmail/dovecot/BUILD48
-rwxr-xr-xmail/dovecot/CONFIGURE52
-rwxr-xr-xmail/dovecot/DEPENDS57
-rwxr-xr-xmail/dovecot/DETAILS59
-rwxr-xr-xmail/dovecot/FINAL18
-rw-r--r--mail/dovecot/HISTORY10
-rwxr-xr-xmail/dovecot/INSTALL9
-rwxr-xr-xmail/dovecot/PREPARE5
-rwxr-xr-xmail/dovecot/PRE_BUILD15
9 files changed, 204 insertions, 69 deletions
diff --git a/mail/dovecot/BUILD b/mail/dovecot/BUILD
index 23c8a40bbf..966460dd7d 100755
--- a/mail/dovecot/BUILD
+++ b/mail/dovecot/BUILD
@@ -1,22 +1,30 @@
-if [[ "${DOVECOT_SSL:-none}" == 'none' ]]; then
- OPTS="$OPTS --without-ssl"
-fi &&
-
-if [[ "$DOVECOT_EXT_LDA" == 'y' ]]; then
- OPTS="$OPTS --without-deliver"
+#LDFLAGS="$LDFLAGS -lc"
+# disableing what we don't have available
+if [[ $DOVECOT_EXT_LDA == y ]]; then
+OPTS="--with-deliver $OPTS"
else
- OPTS="$OPTS --with-deliver"
-fi &&
-
-default_build &&
-
-if [[ "$DOVECOT_EXT_LDA" == 'y' ]]; then
- pushd dovecot-sieve-* &&
- ./configure \
- --prefix=$INSTALL_ROOT/usr \
- --sysconfdir=$INSTALL_ROOT/etc \
- --localstatedir=$INSTALL_ROOT/var \
- --with-dovecot=.. &&
- make &&
- popd
+OPTS="--without-deliver $OPTS"
+fi &&
+OPTS="--without-vpopmail \
+ --without-sia \
+ --without-bsdauth \
+ --with-ioloop=$DOVECOT_IOLOOP \
+ $DOVECOT_OPTS \
+ $OPTS" &&
+default_build &&
+if [[ $DOVECOT_EXT_LDA == y ]]; then
+pushd dovecot-sieve-* &&
+OPTS="--with-dovecot=.." &&
+default_build &&
+popd
fi
+# when the dspam plugin will get updated to work in
+# a multiuser environment this will be usefull
+#pushd src/plugins/dspam
+#gcc -fPIC -shared -Wall -I../../ -I../../lib \
+# -I../../../ -I../../lib-storage \
+# -I../../lib-mail -I../../lib-imap \
+# -I../../imap/ -DHAVE_CONFIG_H dspam.c \
+# -o lib_dspam.so
+#popd
+
diff --git a/mail/dovecot/CONFIGURE b/mail/dovecot/CONFIGURE
index 6d869cdfbb..5f37e62984 100755
--- a/mail/dovecot/CONFIGURE
+++ b/mail/dovecot/CONFIGURE
@@ -1 +1,51 @@
-config_query_list DOVECOT_SSL 'Select SSL implementation to use' none openssl gnutls
+config_query_list DOVECOT_IOLOOP \
+ 'What ioloop do you want' \
+ poll \
+ epoll &&
+config_query_option DOVECOT_OPTS \
+ 'Build with /etc/passwd support' \
+ y \
+ "--with-passwd" \
+ "--without-passwd" &&
+config_query_option DOVECOT_OPTS \
+ 'Build with passwd-like file support' \
+ y \
+ "--with-passwd-file" \
+ "--without-passwd-file" &&
+config_query_option DOVECOT_OPTS \
+ 'Build with checkpassword support' \
+ y \
+ "--with-checkpassword" \
+ "--without-checkpassword" &&
+config_query_option DOVECOT_OPTS \
+ 'Build with static userdb support' \
+ y \
+ "--with-static-userdb" \
+ "--without-static-userdb" &&
+config_query_option DOVECOT_OPTS \
+ 'Build with prefetch userdb support' \
+ y \
+ "--with-prefetch-userdb" \
+ "--without-prefetch-userdb" &&
+config_query_option DOVECOT_OPTS \
+ 'Build POP3 server' \
+ y \
+ "--with-pop3d" \
+ "--without-pop3d" &&
+config_query_option DOVECOT_OPTS \
+ 'Install documentation' \
+ y \
+ "--with-docs" \
+ "--without-docs" &&
+config_query_option DOVECOT_OPTS \
+ 'Enable IPv6 support' \
+ y \
+ "--enable-ipv6" \
+ "--disable-ipv6" &&
+if [[ "$DOVECOT_MANAGESIEVE" == "y" ]]; then
+config_query_option DOVECOT_OPTS \
+ 'Build managesieve server' \
+ y \
+ "--with-managesieve" \
+ "--without-managesieve"
+fi
diff --git a/mail/dovecot/DEPENDS b/mail/dovecot/DEPENDS
index 917075642d..11d7b7fe66 100755
--- a/mail/dovecot/DEPENDS
+++ b/mail/dovecot/DEPENDS
@@ -1,27 +1,34 @@
-if [[ "${DOVECOT_SSL:-none}" != 'none' ]]; then
- depends "$DOVECOT_SSL" "--with-ssl=$DOVECOT_SSL"
-fi &&
-optional_depends linux-pam \
- '--with-pam' \
- '--without-pam' \
- 'for PAM support' &&
-optional_depends cyrus-sasl \
- '' \
- '' \
- 'for Cyrus-sasl authentification support' &&
-optional_depends openldap \
- '--with-ldap' \
- '--without-dap' \
+depends zlib &&
+if [[ $DOVECOT_MANAGESIEVE == y ]] ; then
+depends autoconf &&
+depends automake
+fi &&
+# gnutls support is broken
+optional_depends openssl \
+ "--with-ssl=openssl" \
+ "--without-ssl" \
+ "Enable SSL support" &&
+optional_depends linux-pam \
+ '--with-pam' \
+ '--without-pam' \
+ 'for PAM support' &&
+optional_depends krb5 \
+ '--with-gssapi' \
+ '--without-gssapi' \
+ 'for GSSAPI support' &&
+optional_depends openldap \
+ '--with-ldap' \
+ '--without-dap' \
'Enable LDAP support' &&
-optional_depends mysql \
- '--with-mysql' \
- '--without-mysql' \
- 'for MySQL support' &&
-optional_depends postgresql \
- '--with-pgsql' \
- '--without-pgsql' \
- 'for PostgreSQL support' &&
-optional_depends sqlite \
- '--with-sqlite' \
- '--without-sqlite' \
+optional_depends mysql \
+ '--with-mysql' \
+ '--without-mysql' \
+ 'for MySQL support' &&
+optional_depends postgresql \
+ '--with-pgsql' \
+ '--without-pgsql' \
+ 'for PostgreSQL support' &&
+optional_depends sqlite \
+ '--with-sqlite' \
+ '--without-sqlite' \
'for SQLite support'
diff --git a/mail/dovecot/DETAILS b/mail/dovecot/DETAILS
index 3a1161beba..91975db92b 100755
--- a/mail/dovecot/DETAILS
+++ b/mail/dovecot/DETAILS
@@ -4,35 +4,66 @@
SOURCE2=$SOURCE.sig
SOURCE2_IGNORE=signature
SOURCE_GPG="dovecot.gpg:${SOURCE2}"
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
SOURCE_URL[0]=http://www.dovecot.org/releases/$SOURCE
- SOURCE2_URL[0]=${SOURCE_URL[0]}.sig
-if [[ "$DOVECOT_EXT_LDA" == 'y' ]]; then
+ SOURCE2_URL[0]=http://www.dovecot.org/releases/$SOURCE2
+if [[ "$DOVECOT_EXT_LDA" == "y" ]]; then
VERSION2=20070223
SOURCE3_HASH=sha512:2ccde6a1b8ec806431f91225e35667a1900332fea73db46d5bb1ee114e62c7dd740c356484e0358a21b1f422a0d8a0aa7e408f3b73098f4d6c128057ec17a113
SOURCE3=$SPELL-sieve-$VERSION2.tar.gz
SOURCE3_URL[0]=http://dovecot.org/nightly/sieve/$SOURCE3
+if [[ "$DOVECOT_MANAGESIEVE" == "y" ]]; then
+ VERSION3=1.0.rc28
+ VERSION4=v4
+ SOURCE4_HASH=sha512:a651cbe08e702fa9d6bee7108c5ee51f66643f38239d718c7bd98c05c4897d06b25ca82d07e215445d363f1d7b43b1fc30f39f09eae1d4541c31737c903ca3aa
+ SOURCE4=$SPELL-$VERSION3-MANAGESIEVE-$VERSION4.diff.gz
+ SOURCE4_URL[0]=http://sinas.rename-it.nl/~sirius/$SOURCE4
+fi
fi
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
ENTERED=20030224
- LICENSE[0]=GPL
SECURITY_PATCH=1
+ PATCHLEVEL=1
+ LICENSE[0]=GPL
WEB_SITE=http://www.dovecot.org/
KEYWORDS="mail"
SHORT='dovecot is a secure imap/pop3 daemon'
cat << EOF
Overview
-Dovecot is an open source IMAP and POP3 server for Linux/UNIX-like systems, written with security primarily in mind. Although it's written in C, it uses several coding techniques to avoid most of the common pitfalls.
+Dovecot is an open source IMAP and POP3 server for Linux/UNIX-like
+systems, written with security primarily in mind. Although it's
+written in C, it uses several coding techniques to avoid most of
+the common pitfalls.
-Dovecot can work with standard mbox and maildir formats and it's fully compatible with UW-IMAP and Courier IMAP servers' implementation of them as well as mail clients accessing the mailboxes directly. I have also plans to support storing mails in SQL databases.
+Dovecot can work with standard mbox and maildir formats and it's fully
+compatible with UW-IMAP and Courier IMAP servers' implementation of them
+as well as mail clients accessing the mailboxes directly. I have also
+plans to support storing mails in SQL databases.
-Dovecot is easy to set up and doesn't require special maintenance. Only thing you need is to get the authentication working properly - if your users are in /etc/passwd there's hardly anything you have to do.
+Dovecot is easy to set up and doesn't require special maintenance.
+Only thing you need is to get the authentication working properly
+if your users are in /etc/passwd there's hardly anything you have to do.
-Dovecot should be pretty fast. There are still some optimizations that could be done, but I believe it already beats most other IMAP servers in overall performance. This is mostly because of index files that Dovecot maintains; instead of having to scan through all the data in mailbox, Dovecot can get most of the wanted information from index with little effort. Dovecot's indexes can scale to huge amount of messages per mailbox with hardly any noticeable slowdown. I've tested only up to 367000 mails, but millions of messages should be no problem.
+Dovecot should be pretty fast. There are still some optimizations that
+could be done, but I believe it already beats most other IMAP servers in
+overall performance. This is mostly because of index files that Dovecot
+maintains; instead of having to scan through all the data in mailbox,
+Dovecot can get most of the wanted information from index with little
+effort. Dovecot's indexes can scale to huge amount of messages per mailbox
+with hardly any noticeable slowdown. I've tested only up to 367000 mails,
+but millions of messages should be no problem.
-Dovecot takes very little memory. Most of it goes to mmap()ed index and mailbox files, meaning that if operating system is low on memory, it can simply drop those memory pages without having to store them in swap. Connections are handled in separate processes, each one currently using around 100kB of swappable memory. Some extensions like SORT and THREAD will require more memory to work though.
+Dovecot takes very little memory. Most of it goes to mmap()ed index and
+mailbox files, meaning that if operating system is low on memory, it can
+simply drop those memory pages without having to store them in swap.
+Connections are handled in separate processes, each one currently using
+around 100kB of swappable memory. Some extensions like SORT and THREAD
+will require more memory to work though.
-Dovecot is fail safe. Indexes could potentially be quite a large problem maker, but Dovecot does sanity checks to all data before using it to avoid crashes and other problems. Any kind of crash is considered as bug and will be fixed - even if it happens only by deliberately poking the index files.
+Dovecot is fail safe. Indexes could potentially be quite a large problem
+maker, but Dovecot does sanity checks to all data before using it to avoid
+crashes and other problems. Any kind of crash is considered as bug and will
+be fixed - even if it happens only by deliberately poking the index files.
Status
* Dovecot should be quite ready for use with normal IMAP clients.
@@ -41,6 +72,10 @@ Status
* Complete TLS/SSL support, using either GNUTLS or OpenSSL.
* IPv6 ready.
* Shared mailboxes aren't yet supported.
-* Maildir++ quota isn't yet supported. Hard filesystem quota can also be problematic.
-* mbox support isn't yet perfect. There's a few theoretical problems where Dovecot isn't RFC-compatible, but in practise I haven't heard it to cause any real problems with today's IMAP clients. v1.0 will have rewritten mbox code with much better performance and full RFC compatibility.
+* Maildir++ quota isn't yet supported. Hard filesystem quota can also be
+ problematic.
+* mbox support isn't yet perfect. There's a few theoretical problems where
+ Dovecot isn't RFC-compatible, but in practise I haven't heard it to cause any
+ real problems with today's IMAP clients. v1.0 will have rewritten mbox code
+ with much better performance and full RFC compatibility.
EOF
diff --git a/mail/dovecot/FINAL b/mail/dovecot/FINAL
index 318c75f106..1c9f9cc738 100755
--- a/mail/dovecot/FINAL
+++ b/mail/dovecot/FINAL
@@ -1,4 +1,18 @@
-mkdir -p /var/log/dovecot
-
message "${MESSAGE_COLOR}Use the following script to generate certificates for IMAP and POP3:${DEFAULT_COLOR}"
message "${MESSAGE_COLOR}sudo $GRIMOIRE_DIR/http/httpd-dev/mksscert.sh <imap|pop3>${DEFAULT_COLOR}"
+
+if [[ "$DOVECOT_MANAGESIEVE" == "y" ]]; then
+message "${MESSAGE_COLOR}"
+message "You have enabled the managesieve server patch but you still need to"
+message "enable it in the config file. To do so the following lines should help"
+message "####"
+message "# Add managesieve to protocols"
+message "protocols = managesieve"
+message "# Configure the managesieve protocol"
+message "protocol managesieve {"
+message " listen = *:2000"
+message " login_executable = /usr/libexec/dovecot/managesieve-login"
+message " mail_executable = /usr/libexec/dovecot/managesieve"
+message "}"
+message "####"
+fi
diff --git a/mail/dovecot/HISTORY b/mail/dovecot/HISTORY
index db440d5045..650c435f8f 100644
--- a/mail/dovecot/HISTORY
+++ b/mail/dovecot/HISTORY
@@ -1,3 +1,13 @@
+2007-04-01 Andraž "ruskie" Levstik <ruskie@mages.ath.cx>
+ * DETAILS: added managesieve server patch, PATCHLEVEL++
+ * PREPARE: ask for managesieve if lda is selected
+ * CONFIGURE: added plenty of options to configure
+ * BUILD: fixup for extra options, disabled what we don't have
+ * DEPENDS: krb5 for gssapi, autoconf and automake for managesieve
+ * FINAL: added message for managesieve patch to make it work
+ * PREPARE: ask for managesieve patch
+ * PRE_BUILD: handle the managesieve patch
+
2007-03-31 Andraž "ruskie" Levstik <ruskie@mages.ath.cx>
* DETAILS: update to 1.0.rc29, SECURITY_PATCH=1
diff --git a/mail/dovecot/INSTALL b/mail/dovecot/INSTALL
index 49674bf674..d2599df331 100755
--- a/mail/dovecot/INSTALL
+++ b/mail/dovecot/INSTALL
@@ -1,5 +1,6 @@
-default_install &&
-if [[ "$DOVECOT_EXT_LDA" == 'y' ]]; then
- pushd dovecot-sieve-* &&
- make install
+default_install &&
+if [[ $DOVECOT_EXT_LDA == y ]]; then
+pushd dovecot-sieve-1.0.1 &&
+default_install &&
+popd
fi
diff --git a/mail/dovecot/PREPARE b/mail/dovecot/PREPARE
index 143ffbb76b..0df3a63144 100755
--- a/mail/dovecot/PREPARE
+++ b/mail/dovecot/PREPARE
@@ -1 +1,4 @@
-config_query DOVECOT_EXT_LDA 'Use extended LDA with Sieve support?' y
+config_query DOVECOT_EXT_LDA 'Use extended LDA with Sieve support?' y &&
+if [[ $DOVECOT_EXT_LDA == y ]]; then
+config_query DOVECOT_MANAGESIEVE 'Do you want the manage sieve server patch?' n
+fi
diff --git a/mail/dovecot/PRE_BUILD b/mail/dovecot/PRE_BUILD
index 5177ab3f45..dc576b9c94 100755
--- a/mail/dovecot/PRE_BUILD
+++ b/mail/dovecot/PRE_BUILD
@@ -1,5 +1,12 @@
-default_pre_build &&
-cd $SOURCE_DIRECTORY &&
-if [[ "$DOVECOT_EXT_LDA" == 'y' ]]; then
- unpack_file 3
+default_pre_build &&
+cd $SOURCE_DIRECTORY &&
+if [[ "$DOVECOT_EXT_LDA" == "y" ]]; then
+unpack_file 3 &&
+if [[ "$DOVECOT_MANAGESIEVE" == "y" ]]; then
+verify_file 4 &&
+zcat $SOURCE_CACHE/$SOURCE4 | patch -p1 &&
+aclocal &&
+automake --add-missing &&
+autoreconf
+fi
fi