From owner-freebsd-ports@FreeBSD.ORG Sat Sep 22 09:25:23 2012 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE26A1065670 for ; Sat, 22 Sep 2012 09:25:23 +0000 (UTC) (envelope-from thomas@gibfest.dk) Received: from mail.tyknet.dk (mail.tyknet.dk [176.9.9.186]) by mx1.freebsd.org (Postfix) with ESMTP id 8D7918FC15 for ; Sat, 22 Sep 2012 09:25:23 +0000 (UTC) Received: from [10.10.1.100] (unknown [217.71.4.82]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.tyknet.dk (Postfix) with ESMTPSA id 4B76A104226; Sat, 22 Sep 2012 11:25:15 +0200 (CEST) X-DKIM: OpenDKIM Filter v2.5.2 mail.tyknet.dk 4B76A104226 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gibfest.dk; s=default; t=1348305915; bh=F1cSQ76bvKO7msDY1vO6cHBuJrMw5piwK+qvQ5nwkIA=; h=Date:From:To:CC:Subject; b=pMFE4YtMCOb/RG62YC9N1aQHLEBwwHYxa4cvqnogWq2xq3KFtQoGFvtConNJftNjE JX2+DBrbOzP6Vk9sSBZeTUA71ITrDsMyIwmzLfD6nMkAK5KKSqt/EAsIkKqSkZAaxj 3FbUPlKQS4aa0TGJFb/XjCD7qPBs181JpIj6P+vs= Message-ID: <505D83FA.7090801@gibfest.dk> Date: Sat, 22 Sep 2012 11:25:14 +0200 From: Thomas Steen Rasmussen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120604 Thunderbird/12.0.1 MIME-Version: 1.0 To: ports@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: bra@fsn.hu Subject: [PATCH] mail/dovecot2-pigeonhole segfault when validating sieve syntax X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2012 09:25:24 -0000 Hello, There is a known segfault in mail/dovecot2-pigeonhole released with Dovecot 2.1.8 which is what we have in ports at the moment. The segfault makes it very near impossible to edit sieve scripts with a managesieve client which does syntax validation (like the Thunderbird plugin does). The problem has been fixed in Dovecot 2.1.9 which is not yet in ports. However, if you are impatient to get this solved, you can drop the following patch in /usr/ports/mail/dovecot2-pigeonhole/files and rebuild dovecot2-pidgeonhole and restart dovecot, and the problem is gone (for me at least): ----------------------------------------------------------------------------- [tykling@mail /usr/ports/mail/dovecot2-pigeonhole]$ cat files/patch-segfault diff -r f7ea71241032 -r 6ceeb6421231 src/lib-sievestorage/sieve-storage-save.c --- src/lib-sievestorage/sieve-storage-save.c Sun Apr 22 11:30:28 2012 +0200 +++ src/lib-sievestorage/sieve-storage-save.c Thu Jul 12 23:57:50 2012 +0200 @@ -318,19 +318,20 @@ bool sieve_storage_save_will_activate (struct sieve_save_context *ctx) { - const char *scriptname; - int ret = 0; + bool result = FALSE; - T_BEGIN { + if ( ctx->scriptname != NULL ) T_BEGIN { + const char *scriptname; + int ret; + ret = sieve_storage_get_active_scriptfile(ctx->storage, &scriptname); - if ( ret > 0 ) { /* Is the requested script active? */ - ret = ( strcmp(ctx->scriptname, scriptname) == 0 ? 1 : 0 ); + result = ( strcmp(ctx->scriptname, scriptname) == 0 ); } } T_END; - return ret; + return result; } int sieve_storage_save_commit(struct sieve_save_context **ctx) -------------------------------------------------------------------------------- The patch is unchange from the upstream patch except for paths: http://hg.rename-it.nl/dovecot-2.1-pigeonhole/raw-diff/6ceeb6421231/src/lib-sievestorage/sieve-storage-save.c I'd prepare a proper port patch but I expect Dovecot in ports to be updated to 2.1.9 soon-ish, so this is just a temporary solution :) Hope this can help someone, Best regards, Thomas Steen Rasmussen