Thanks to cyrus developer  Bron Gondwana for the huge help in debugging
the issue and for actually fixing it.

While here, move to pkg-readmes.
This commit is contained in:
ajacoutot 2010-12-12 11:52:30 +00:00
parent 6a984be570
commit 61f0dd078b
8 changed files with 68 additions and 24 deletions

View File

@ -1,6 +1,4 @@
# $OpenBSD: Makefile,v 1.49 2010/12/05 22:20:37 ajacoutot Exp $
BROKEN= talk to ajacoutot@ for details
# $OpenBSD: Makefile,v 1.50 2010/12/12 11:52:30 ajacoutot Exp $
COMMENT-main= Cyrus IMAP server
COMMENT-perl= perl utils for the Cyrus IMAP server
@ -11,8 +9,8 @@ PKGNAME-main= ${DISTNAME}
FULLPKGNAME-perl=cyrus-imapd-perl-${V}
FULLPKGPATH-perl=mail/cyrus-imapd,-perl
REVISION-main= 5
REVISION-perl= 0
REVISION-main= 6
REVISION-perl= 1
CATEGORIES= mail

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-imap_cyr_expire_c,v 1.1 2010/12/12 11:52:30 ajacoutot Exp $
From 48f2fab8c42716201c1f55646110df306ae750ed Mon Sep 17 00:00:00 2001
From: Bron Gondwana <brong@opera.com>
Date: Sun, 31 Oct 2010 00:22:37 +0000
Subject: Commit mailbox after annotation based expiry
--- imap/cyr_expire.c.orig Sun Dec 12 09:50:04 2010
+++ imap/cyr_expire.c Sun Dec 12 09:50:26 2010
@@ -228,6 +228,7 @@ int expire(char *name, int matchlen, int maycreate __a
}
r = mailbox_expunge(mailbox, expire_cb, erock, NULL);
+ if (!r) r = mailbox_commit(mailbox);
if (r) {
syslog(LOG_ERR, "failed to expire old messages: %s", mailbox->name);
}

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-imap_mailbox_c,v 1.4 2010/12/12 11:52:30 ajacoutot Exp $
From 2f2018020d9976bdbd419632328e144f7e43574c Mon Sep 17 00:00:00 2001
From: Bron Gondwana <brong@opera.com>
Date: Sun, 12 Dec 2010 11:27:25 +0000
Subject: Bug #3370 - always map_refresh before reading index header
--- imap/mailbox.c.orig Mon Nov 29 14:28:06 2010
+++ imap/mailbox.c Sun Dec 12 12:34:47 2010
@@ -1348,6 +1348,11 @@ static int mailbox_read_index_header(struct mailbox *m
if (mailbox->index_size < INDEX_HEADER_SIZE)
return IMAP_MAILBOX_BADFORMAT;
+ /* need to make sure we're reading fresh data! */
+ map_refresh(mailbox->index_fd, 1, &mailbox->index_base,
+ &mailbox->index_len, mailbox->index_size,
+ "index", mailbox->name);
+
r = mailbox_buf_to_index_header(mailbox->index_base, &mailbox->i);
if (r) return r;

View File

@ -10,18 +10,5 @@ read/write connections to the same mailbox are permitted. The server
supports access control lists on mailboxes and storage quotas on mailbox
hierarchies.
Because of cyrus-imapd+OpenBSD mmap incompatibility, the server runs in
compat mode incuring a performance penalty under high load.
Following man pages have been renamed to avoid conflicts with other
packages:
fetchnews(8) -> cyrus-fetchnews(8) # conflict with news/leafnode
idled(8) -> cyrus-idled(8) # conflict with sysutils/idled
master(8) -> cyrus-master(8) # conflict with mail/postfix
imapd(8) -> cyrus-imapd(8) # conflict with mail/courier-imap
Cyrus-imapd uses the LOG_LOCAL6 syslog facility for logging. This port
of cyrus-imapd uses idled for IMAP IDLE.
Available flavor:
drac - Build drac support (for roaming users relay)
drac - Build drac support (i.e. pop before smtp)

View File

@ -1,2 +1,2 @@
This package contains the perl utilities for managing the Cyrus Imap
This package contains the perl utilities for managing the Cyrus IMAP
server.

View File

@ -1,3 +0,0 @@
Don't forget to edit /etc/services to include missing network services
if needed.
e.g. sieve 2000/tcp

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-main,v 1.11 2010/12/03 15:37:31 ajacoutot Exp $
@comment $OpenBSD: PLIST-main,v 1.12 2010/12/12 11:52:30 ajacoutot Exp $
@pkgpath ${BASE_PKGPATH}
@pkgpath ${BASE_PKGPATH},-main,kerberos
@newgroup _cyrus:543
@ -180,6 +180,7 @@ share/doc/cyrus-imapd/text/readme
share/doc/cyrus-imapd/text/sieve
share/doc/cyrus-imapd/text/sieve-protocol
share/doc/cyrus-imapd/text/specs
share/doc/pkg-readmes/${FULLPKGNAME}
share/examples/cyrus-imapd/
share/examples/cyrus-imapd/cmu-backend.conf
share/examples/cyrus-imapd/cmu-frontend.conf

View File

@ -0,0 +1,23 @@
$OpenBSD: README-main,v 1.1 2010/12/12 11:52:30 ajacoutot Exp $
Running cyrus-imapd under OpenBSD
=================================
WARNING: mmap(2) is not fully POSIX on OpenBSD so cyrus needs to
map_refresh on every lock which will incure a performance penalty under
high load. See this bugreport for details:
http://bugzilla.cyrusimap.org/show_bug.cgi?id=3370
The following man pages have been renamed to avoid conflicts with other
packages:
fetchnews(8) -> cyrus-fetchnews(8) # conflict with news/leafnode
idled(8) -> cyrus-idled(8) # conflict with sysutils/idled
master(8) -> cyrus-master(8) # conflict with mail/postfix
imapd(8) -> cyrus-imapd(8) # conflict with mail/courier-imap
cyrus-imapd uses the LOG_LOCAL6 syslog facility for logging. This
package of cyrus-imapd uses idled for IMAP IDLE.
Don't forget to edit /etc/services to include missing network services
if needed.
e.g. sieve 2000/tcp