[Dovecot] Problem in deliver (Panic: file index-mail-headers.c ...)

Stefan Roese stefan.roese at gmail.com
Mon May 18 09:57:53 EEST 2009


On Monday 18 May 2009 00:58:40 Timo Sirainen wrote:
> On Wed, 2009-05-06 at 13:16 +0200, Stefan Roese wrote:
> > I'm experiencing a problem with some mails in deliver. Here the logged
> > error message:
> >
> > deliver(stefan at roese.nl): 2009-05-06 11:57:36 Panic: file
> > index-mail-headers.c: line 141 (index_mail_parse_header_finish):
> > assertion failed: ((match[match_idx] & HEADER_MATCH_FLAG_FOUND) == 0)
>
> Hmm. Interesting. That code has existed a long time and used also by
> IMAP, so I'd think it should have been bugfree..

I upgraded to 1.1.14 a few days ago and the error still occurs.

> > [0xb7fdf98f] -> /usr/lib/dovecot/deliver(mail_get_headers_utf8+0x25)
> > [0xb7fe7315] -> /usr/lib/dovecot/modules/lda/lib90_cmusieve_plugin.so
>
> You have a Sieve script that does something with headers. What does it
> look like?

Please find it attached.

> Can you reproduce this? For example does it always crash with some
> specific mail? If so, I'd like to get a copy of that mail.

It happens on some mails from the Linux mailing lists (xxx.vger.kernel.org). I 
already created a wrapper script to deliver so that those mails don't bounce. 
Unfortunately I didn't extract such failing mails till now. I'll try to 
provide one in the next few days.

Thanks.

Best regards,
Stefan
-------------- next part --------------
require ["reject", "fileinto", "relational"];

#if address :is "To" "test at roese.nl" {
#  fileinto "INBOX.testfolder";
#  stop;
#}

#if address :is "From" "sr at denx.de" {
#  fileinto "INBOX.testfolder2";
#  stop;
#}

#if address :is "Return-Path" "<linux-kernel>" {
#  fileinto "INBOX.Lists.linux-kernel";
#  stop;
#}

############################################
# Root stuff...

## Move spam to spam folder
## removed for now, since SPAM was not detected correctly from mnet (sr at denx.de), 2008-07-04
#if anyof(header :is "X-DSPAM-Result" "Spam",
#	 header :is "X-Spam-Flag" "YES") {
#  fileinto "INBOX.SPAM";
#  stop;
#}

if header :is "Return-Path" "<root at server>" {
  fileinto "INBOX.root";
  stop;
}

if header :is "To" "fritz at roese.nl" {
  fileinto "INBOX.FritzBox";
  stop;
}

##################################################
# DENX stuff...

if header :is "Return-Path" "<wd at denx.de>" {
  fileinto "INBOX.Denx";
  stop;
}

###################################################
# Mailing lists...

if anyof(header :contains "List-Id" "<u-boot-users.lists.sourceforge.net>",
	 header :contains "List-Id" "<u-boot.lists.denx.de>") {
  fileinto "INBOX.Lists.U-Boot";
  stop;
}

if anyof(header :contains "Return-Path" "linuxppc-dev",
	 header :contains "Return-Path" "linuxppc-embedded") {
  fileinto "INBOX.Lists.linuxppc-dev";
  stop;
}

#if header :contains "Return-Path" "linuxppc-embedded" {
#  fileinto "INBOX.Lists.linuxppc-embedded";
#  stop;
#}

if header :contains "Return-Path" "devicetree-discuss" {
  fileinto "INBOX.Lists.devicetree-discuss";
  stop;
}

if header :contains "Return-Path" "uclinux-dev" {
  fileinto "INBOX.Lists.uClinux-dev";
  stop;
}

if header :is "List-ID" "Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>" {
  fileinto "INBOX.Lists.linux-mtd";
  stop;
}

if header :is "List-ID" "Linux MTD CVS commit list <linux-mtd-cvs.lists.infradead.org>" {
  fileinto "INBOX.Lists.linux-mtd-cvs";
  stop;
}

if header :is "List-ID" "<skigeek.lists.infradead.org>" {
  fileinto "INBOX.Lists.Skigeek";
  stop;
}

if header :is "Return-Path" "<owner-jffs-dev at axis.com>" {
  fileinto "INBOX.Lists.jffs-dev";
  stop;
}

if header :contains "List-Id" "<spi-devel-general.lists.sourceforge.net>" {
  fileinto "INBOX.Lists.linux-spi-devel";
  stop;
}

if header :contains "Return-Path" "linux-mips" {
  fileinto "INBOX.Lists.linux-mips";
  stop;
}

if header :is "To" "git-commits at linux-mips.org" {
  fileinto "INBOX.Lists.linux-mips-git";
  stop;
}

if anyof(header :contains "Return-Path" "linux-arm-kernel",
	 header :contains "Return-Path" "<mailman-bounces at lists.arm.linux.org.uk>") {
  fileinto "INBOX.Lists.linux-arm-kernel";
  stop;
}

if header :contains "Return-Path" "linux-arm-toolchain" {
  fileinto "INBOX.Lists.linux-arm-toolchain";
  stop;
}

if anyof(header :contains "List-Id" "Linux OMAP Open Source Mailing List Archive",
	 header :is "Return-Path" "<linux-omap-owner at vger.kernel.org>") {
  fileinto "INBOX.Lists.linux-omap";
  stop;
}

if header :is "List-ID" "Dovecot Mailing List <dovecot.dovecot.org>" {
  fileinto "INBOX.Lists.dovecot";
  stop;
}

if header :contains "Return-Path" "<etux" {
  fileinto "INBOX.Lists.embeddedtux";
  stop;
}

if header :contains "List-Id" "<rtnet-users.lists.sourceforge.net>" {
  fileinto "INBOX.Lists.RTnet";
  stop;
}

if anyof(header :contains "List-Id" "RTAI discussion <rtai.rtai.org>",
	 header :contains "List-Id" "<rtai.liste.cilea.it>",
	 header :contains "List-Id" "<rtai.rtai.org>") {
  fileinto "INBOX.Lists.RTAI";
  stop;
}

if anyof(header :contains "Return-Path" "<yaffs-bounces at stoneboat.aleph1.co.uk>",
	 header :contains "Return-Path" "<yaffs-bounces at lists.aleph1.co.uk>") {
  fileinto "INBOX.Lists.YAFFS";
  stop;
}

if header :contains "List-Id" "CE Linux Developers List <celinux-dev.tree.celinuxforum.org>" {
  fileinto "INBOX.Lists.celinux-dev";
  stop;
}

if header :contains "List-Id" "Open test lab mailing list <opentestlab.tree.celinuxforum.org>" {
  fileinto "INBOX.Lists.celinux-opentestlab";
  stop;
}

if header :contains "Return-Path" "<elinos-users-bounces at lists.sysgo.com>" {
  fileinto "INBOX.Lists.elinos-users";
  stop;
}

if header :contains "Return-Path" "<linux-c-programming-owner at vger.kernel.org>" {
  fileinto "INBOX.Lists.linux-c-programming";
  stop;
}

if header :contains "List-Id" "lm-sensors discussion list <lm-sensors.lm-sensors.org>" {
  fileinto "INBOX.Lists.lm-sensors";
  stop;
}

if header :contains "List-Id" "linux i2c discussion list <i2c.lm-sensors.org>" {
  fileinto "INBOX.Lists.lm-sensors-i2c";
  stop;
}

if header :contains "List-Id" "For discussion about KDE PIM applications <kdepim-users.kde.org>" {
  fileinto "INBOX.Lists.kdepim-users";
  stop;
}

if anyof(header :contains "To" "ecos-devel",
	 header :contains "Return-Path" "ecos-devel") {
  fileinto "INBOX.Lists.ecos-devel";
  stop;
}

if header :contains "Return-Path" "xenomai-" {
  fileinto "INBOX.Lists.Xenomai";
  stop;
}

if anyof(header :contains "Return-Path" "<ag-automation-bounces at lists.osadl.org>",
	 header :contains "Return-Path" "<ag-automation-bounces at www.osadl.org>",
	 header :contains "List-Id" "OSADL Initial Mailinglist <osadl.lists.osadl.org>") {
  fileinto "INBOX.Lists.OSADL";
  stop;
}

if anyof(header :contains "List-Id" "<socketcan-core.lists.berlios.de>",
	 header :contains "List-Id" "<socketcan-users.lists.berlios.de>") {
  fileinto "INBOX.Lists.socketcan";
  stop;
}

if header :contains "Return-Path" "<linux-serial-owner at vger.kernel.org>" {
  fileinto "INBOX.Lists.linux-serial";
  stop;
}

if header :contains "Return-Path" "<linux-crypto-owner at vger.kernel.org>" {
  fileinto "INBOX.Lists.linux-crypto";
  stop;
}

if header :contains "Return-Path" "<linux-pci-owner at vger.kernel.org>" {
  fileinto "INBOX.Lists.linux-pci";
  stop;
}

if header :contains "Return-Path" "<linux-embedded-owner at vger.kernel.org>" {
  fileinto "INBOX.Lists.linux-embedded";
  stop;
}

if header :contains "Sender" "rtc-linux at googlegroups.com" {
  fileinto "INBOX.Lists.rtc-linux";
  stop;
}

if header :contains "Sender" "kvm-ppc-devel-bounces at lists.sourceforge.net" {
  fileinto "INBOX.Lists.kvm-ppc-devel";
  stop;
}

if header :contains "" "" {
  fileinto "INBOX.Lists.";
  stop;
}

if header :contains "Delivered-To" "mailing list parch at power.org" {
  fileinto "INBOX.Lists.power-org";
  stop;
}

if anyof(header :contains "List-Post" "<mailto:openmoko-devel at lists.openmoko.org>",
	 header :contains "List-Post" "<mailto:devel at lists.openmoko.org>") {
  fileinto "INBOX.Lists.openmoko-devel";
  stop;
}

if header :contains "Return-Path" "<eldk-bounces at lists.denx.de>" {
  fileinto "INBOX.Lists.ELDK";
  stop;
}

##################################################################
# Private stuff...

if anyof(header :contains "To" "<GeorgeRRMartin",
	 header :contains "List-Id" "<George-r-r-martin.yahoogroups.com>",
	 header :contains "Mailing-List" "list GeorgeRRMartin at yahoogroups.com",
	 header :contains "Mailing-List" "list GeorgeRRMartin at yahoogroups.com; contact GeorgeRRMartin-owner at yahoogroups.com",
	 header :contains "Mailing-List" "list GeorgeRRMartin at yahoogroups.com; contact GeorgeRRMartin-owner at yahoogroups.com") {
  fileinto "INBOX.Lists.George-R-R-Martin";
  stop;
}

###############################################################
# Newsletter...

if header :contains "Return-Path" "<ProductNotification at amcc.com>" {
  fileinto "INBOX.Newsletter.AMCC";
  stop;
}

if header :contains "Return-Path" "<info at isource.ibm.com>" {
  fileinto "INBOX.Newsletter.IBM";
  stop;
}

if header :contains "Return-Path" "<tomshardware at emv3.com>" {
  fileinto "INBOX.Newsletter.Toms-Hardware-Guide";
  stop;
}

if header :contains "Return-Path" "<newsletters at ebay.de>" {
  fileinto "INBOX.eBay";
  stop;
}

################################################################
# big lists with multiple subscription here:
# git, lkml etc. at last please

if header :contains "Return-Path" "<linux-raid-owner at vger.kernel.org>" {
  fileinto "INBOX.Lists.linux-raid";
  stop;
}

if header :contains "Return-Path" "<git-owner at vger.kernel.org>" {
  fileinto "INBOX.Lists.git";
  stop;
}

if anyof(header :is "List-ID" "<linux-usb.vger.kernel.org>",
	 header :is "List-ID" "<linux-usb-devel.lists.sourceforge.net>") {
  fileinto "INBOX.Lists.linux-usb-devel";
  stop;
}
#if header :is "List-ID" "<linux-usb-devel.lists.sourceforge.net>" {
#  fileinto "INBOX.Lists.linux-usb-devel";
#  stop;
#}

if header :contains "Return-Path" "<netdev-owner at vger.kernel.org>" {
  fileinto "INBOX.Lists.netdev";
  stop;
}

if header :contains "Return-Path" "<linux-ide-owner at vger.kernel.org>" {
  fileinto "INBOX.Lists.linux-ide";
  stop;
}

if header :is "List-ID" "<linux-kernel.vger.kernel.org>" {
  fileinto "INBOX.Lists.linux-kernel";
  stop;
}



More information about the dovecot mailing list