[Dovecot] SIGSEGV (Segmentation fault) with antispam plugin

Boky verynotbad at gmail.com
Sat Nov 17 22:14:39 EET 2007


Hi all.

I am trying to get dovecot (1.0.rc17) running with antispam plugin.

I have created another backend, which executes "sa-learn" from
spamassassin's arsenal. The backend is modeled after sendmail backend.

But I can't seem to get the plugin working wit either my backend or
signature-log.

This is my ".config":
DOVECOT=/usr/src/dovecot-1.0.7
DOVECOT_VERSION=1.0
BACKEND=spamassassin-exec
INSTALLDIR=/usr/lib/dovecot/modules/imap/
PLUGINNAME=antispam

This is how I make the plugin:
make && make install && chmod 644
/usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so


Since Ubuntu server does not come with dovecot sources, I have downloaded
dovecot-1.0.7 and put it in /usr/src. As far as I understand, only the
headers are needed, so this should not be the cause of the crash (if the
headers hadn't changed).

When invoked from dovecot process, the "imap" dies with signal 11.

When running:
strace /usr/sbin/dovecot --exec-mail imap

This is how it ends:
etdents64(8, /* 14 entries */, 4096)   = 592
getdents64(8, /* 0 entries */, 4096)    = 0
open("/usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so", O_RDONLY) = 9
read(9, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\21"..., 512) =
512
fstat64(9, {st_mode=S_IFREG|0644, st_size=19252, ...}) = 0
mmap2(NULL, 16148, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 9, 0) =
0xb7f29000
mmap2(0xb7f2c000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 9, 0x2) = 0xb7f2c000
close(9)                                = 0
close(8)                                = 0
stat64("/var/mail/mailboxes/boky/Maildir/subscriptions", 0xbfc17d2c) = -1
EACCES (Permission denied)
lstat64("/var/mail/mailboxes/boky/Maildir/cur", 0xbfc17c3c) = -1 EACCES
(Permission denied)
write(2, "imap(boky): ", 12imap(boky): )            = 12
write(2, "Error: ", 7Error: )                  = 7
write(2, "lstat(/var/mail/mailboxes/boky/M"...,
69lstat(/var/mail/mailboxes/boky/Maildir/cur) failed: Permission denied) =
69
write(2, "\n", 1
)                       = 1
open("/etc/localtime", O_RDONLY)        = 8
fstat64(8, {st_mode=S_IFREG|0644, st_size=696, ...}) = 0
fstat64(8, {st_mode=S_IFREG|0644, st_size=696, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7de2000
read(8, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0\0\0\6\0"..., 4096) =
696
close(8)                                = 0
munmap(0xb7de2000, 4096)                = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=696, ...}) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Process 4707 detached

antispam plugin was downloaded from:
http://git.sipsolutions.net/?p=dovecot-antispam.git;a=snapshot;h=HEAD;sf=tgz

Please advise me n next steps; I'm just a beginner with debugging C/C++.


Thank you all.
Boky


More information about the dovecot mailing list