Hi guys,

While building a Postfix install on a new 4.0/i386 (GENERIC) install
(patched up to 008) I noticed a problem with the default cyrus 'deliver'
agent:

it would segfault (11) when called as a Postfix mailbox command as follows:
  user=_cyrus argv=/usr/local/libexec/cyrus-imapd/deliver -e -r ${sender}
-m ${extension} ${user}

but even when running it manually it also segfaulted, and nothing showed
up in local6.debug (for Cyrus imapd).

This cyrus-imapd was installed from packages, so I rebuilt it with the
following patch added in to correctly initialize 'err' :

cat /usr/ports/mail/cyrus-imapd/patches/patch-imapd_backend_c
--- imap/backend.c.orig       Tue Feb  7 20:57:27 2006
+++ imap/backend.c        Mon Jan 29 03:57:52 2007
@@ -271,7 +271,7 @@
     /* need to (re)establish connection to server or create one */
     int sock = -1;
     int r;
-    int err = 0;
+    int err = -1;
     struct addrinfo hints, *res0 = NULL, *res1 = NULL, *res;
     struct sockaddr_un sunsock;
     char buf[2048], *mechlist = NULL;

------------
This is already merged into Cyrus's CVS under the MAIN branch for
src/cyrus/imap/backend.c as of 1.39

I recompiled it, and all is well. It's also working under an amd64 system
that I have that gets heavy usage (though I have to admit that the amd64
system is running RAIDFRAME, not GENERIC).


Have a good one!
-Tico

Attachment: patch-imap_backend_c
Description: Binary data

Reply via email to