Stefan Schmidt
2006-Mar-20 20:55 UTC
[Dovecot] compilation and installation of dspam-plugin
hello johannes, i just discovered your wonderful plugin for dovecot. it was pretty much exactly what i was looking for, only that i didn't know that yet :) "Instead of moving mail into special folders, the user has two actions available: moving it out of the SPAM folder and moving it into the SPAM folder. The dovecot plugin watches these actions [...] and tells dspam that it made an error and needs to re-classify the message, depending on the action the user took. The user can now move the message directly into whatever folder she choses, and it all works. [...]" i think this is the most usable and intuitive approach to dspam-training i have seen so far and would love to integrate dspam with this plugin into my current setup (postfix + maildrop + dovecot). i have installed dovecot via package from the debian stable section [1] therefore i am currently using version 0.99.14 in my setup. despite this difference in version i gave your betacode [2] a try together with the source of the corresponding dovecot-version [3], hoping it wouldn't crash and burn when used with my earlier version of dovecot. but i didn't get to the point where i could actually testdrive it. i tried compiling the plugin with the instructions contained in the file, but the compilation didn't suceed. ---------------------------------------------------------------------- stefan at myserver:~/sources/dovecot-dspam-plugin/dovecot-1.0.beta3/plugin$ gcc -fPIC -shared -Wall -I../src/ -I../src/lib -I.. -I../src/lib-storage -I../src/lib-mail -I../src/lib-imap -I../src/imap/ -DHAVE_CONFIG_H spam_plugin.c -o spam_plugin.so In file included from ../src/imap/common.h:4, from spam_plugin.c:32: ../src/lib/lib.h:6:22: config.h: No such file or directory In file included from ../src/lib/lib.h:23, from ../src/imap/common.h:4, from spam_plugin.c:32: ../src/lib/compat.h:31:4: #error uoff_t size not set In file included from /usr/include/sys/socket.h:35, from ../src/lib/compat.h:80, from ../src/lib/lib.h:23, from ../src/imap/common.h:4, from spam_plugin.c:32: /usr/include/bits/socket.h:36: error: conflicting types for `socklen_t' ../src/lib/compat.h:51: error: previous declaration of `socklen_t' In file included from /usr/include/netinet/in.h:23, from ../src/lib/compat.h:81, from ../src/lib/lib.h:23, from ../src/imap/common.h:4, from spam_plugin.c:32: /usr/include/stdint.h:111: error: conflicting types for `uint_fast32_t' ../src/lib/compat.h:46: error: previous declaration of `uint_fast32_t' /usr/include/stdint.h:141: error: conflicting types for `uintmax_t' ../src/lib/compat.h:38: error: previous declaration of `uintmax_t' In file included from ../src/lib/lib.h:23, from ../src/imap/common.h:4, from spam_plugin.c:32: ../src/lib/compat.h:107: error: redefinition of `struct iovec' In file included from ../src/imap/commands.h:6, from ../src/imap/client.h:4, from ../src/imap/common.h:5, from spam_plugin.c:32: ../src/lib-storage/mail-storage.h:435: error: syntax error before "mail_get_virtual_size" ../src/lib-storage/mail-storage.h:435: warning: type defaults to `int' in declaration of `mail_get_virtual_size' ../src/lib-storage/mail-storage.h:435: warning: data definition has no type or storage class ../src/lib-storage/mail-storage.h:438: error: syntax error before "mail_get_physical_size" ../src/lib-storage/mail-storage.h:438: warning: type defaults to `int' in declaration of `mail_get_physical_size' ../src/lib-storage/mail-storage.h:438: warning: data definition has no type or storage class In file included from ../src/imap/commands.h:7, from ../src/imap/client.h:4, from ../src/imap/common.h:5, from spam_plugin.c:32: ../src/lib-imap/imap-parser.h:45: error: syntax error before "uoff_t" ../src/lib-imap/imap-parser.h:45: warning: no semicolon at end of struct or union ../src/lib-imap/imap-parser.h:45: warning: no semicolon at end of struct or union ../src/lib-imap/imap-parser.h:47: error: syntax error before '}' token ../src/lib-imap/imap-parser.h:47: warning: type defaults to `int' in declaration of `_data' ../src/lib-imap/imap-parser.h:47: warning: data definition has no type or storage class ../src/lib-imap/imap-parser.h:48: error: syntax error before '}' token ../src/lib-imap/imap-parser.h:72: error: field `args' has incomplete type ../src/lib-imap/imap-parser.h:125: error: syntax error before "_imap_arg_literal_size_error" ../src/lib-imap/imap-parser.h:125: warning: type defaults to `int' in declaration of `_imap_arg_literal_size_error' ../src/lib-imap/imap-parser.h:125: warning: data definition has no type or storage class ---------------------------------------------------------------------- just in case it matters: i currently have gcc 3.3.5 installed. greetings, stefan [1] http://packages.debian.org/stable/mail/dovecot-common [2] http://snipurl.com/nvol [3] http://www.dovecot.org/releases/dovecot-1.0.beta3.tar.gz
Leeman Strout
2006-Mar-20 21:00 UTC
[Dovecot] compilation and installation of dspam-plugin
Stefan Schmidt wrote:> > ---------------------------------------------------------------------- > stefan at myserver:~/sources/dovecot-dspam-plugin/dovecot-1.0.beta3/plugin$ > gcc -fPIC -shared -Wall -I../src/ -I../src/lib -I.. -I../src/lib-storage > -I../src/lib-mail -I../src/lib-imap -I../src/imap/ -DHAVE_CONFIG_H > spam_plugin.c -o spam_plugin.so > > In file included from ../src/imap/common.h:4, > from spam_plugin.c:32: > ../src/lib/lib.h:6:22: config.h: No such file or directory > In file included from ../src/lib/lib.h:23, > from ../src/imap/common.h:4, > from spam_plugin.c:32: > ../src/lib/compat.h:31:4: #error uoff_t size not set > In file included from /usr/include/sys/socket.h:35, > from ../src/lib/compat.h:80, > from ../src/lib/lib.h:23, > from ../src/imap/common.h:4, > from spam_plugin.c:32: > /usr/include/bits/socket.h:36: error: conflicting types for `socklen_t' > ../src/lib/compat.h:51: error: previous declaration of `socklen_t' > In file included from /usr/include/netinet/in.h:23, > from ../src/lib/compat.h:81, > from ../src/lib/lib.h:23, > from ../src/imap/common.h:4, > from spam_plugin.c:32: > /usr/include/stdint.h:111: error: conflicting types for `uint_fast32_t' > ../src/lib/compat.h:46: error: previous declaration of `uint_fast32_t' > /usr/include/stdint.h:141: error: conflicting types for `uintmax_t' > ../src/lib/compat.h:38: error: previous declaration of `uintmax_t' > In file included from ../src/lib/lib.h:23, > from ../src/imap/common.h:4, > from spam_plugin.c:32: > ../src/lib/compat.h:107: error: redefinition of `struct iovec' > In file included from ../src/imap/commands.h:6, > from ../src/imap/client.h:4, > from ../src/imap/common.h:5, > from spam_plugin.c:32: > ../src/lib-storage/mail-storage.h:435: error: syntax error before > "mail_get_virtual_size" > ../src/lib-storage/mail-storage.h:435: warning: type defaults to `int' > in declaration of `mail_get_virtual_size' > ../src/lib-storage/mail-storage.h:435: warning: data definition has no > type or storage class > ../src/lib-storage/mail-storage.h:438: error: syntax error before > "mail_get_physical_size" > ../src/lib-storage/mail-storage.h:438: warning: type defaults to `int' > in declaration of `mail_get_physical_size' > ../src/lib-storage/mail-storage.h:438: warning: data definition has no > type or storage class > In file included from ../src/imap/commands.h:7, > from ../src/imap/client.h:4, > from ../src/imap/common.h:5, > from spam_plugin.c:32: > ../src/lib-imap/imap-parser.h:45: error: syntax error before "uoff_t" > ../src/lib-imap/imap-parser.h:45: warning: no semicolon at end of struct > or union > ../src/lib-imap/imap-parser.h:45: warning: no semicolon at end of struct > or union > ../src/lib-imap/imap-parser.h:47: error: syntax error before '}' token > ../src/lib-imap/imap-parser.h:47: warning: type defaults to `int' in > declaration of `_data' > ../src/lib-imap/imap-parser.h:47: warning: data definition has no type > or storage class > ../src/lib-imap/imap-parser.h:48: error: syntax error before '}' token > ../src/lib-imap/imap-parser.h:72: error: field `args' has incomplete type > ../src/lib-imap/imap-parser.h:125: error: syntax error before > "_imap_arg_literal_size_error" > ../src/lib-imap/imap-parser.h:125: warning: type defaults to `int' in > declaration of `_imap_arg_literal_size_error' > ../src/lib-imap/imap-parser.h:125: warning: data definition has no type > or storage classYou need to run ./configure for dovecot at a minimum, possibly even a make, I don't know that one for certain. Leeman