[Dovecot] New message notification

2008-11-19 Thread Juan Asensio Sánchez
Hi

What is the best option to notify a user that a message has arrived? The
intention is to write a script that connects to a jabber server and checks
if the user is online, so then a message is sent to user notifying him that
he has received a new message. The solution should be compatible with Sieve
filtering, so the script should not be executed when the message is moved to
the SPAM folder, or pass to the script an argument specifying the folder
where the message has been saved.

Regards and thanks in advance.

Juan Asensio Sánchez - http://www.nutum.es


[Dovecot] Custom Debian package bulding

2008-08-26 Thread Juan Asensio Sánchez
Hi

I am using Debian source packages from http://xi.rename-it.nl/debian/.
When downloading dependencies, I have seen that the package requires
MySQL, that I don't use. How could I remove this dependency or chanage
them? Is that defined in any file?

However, I would like to use SQLite or Postgres to store dict data for
the Expire plugin. Where should I enable these flags?

Thanks.


[Dovecot] One LDAP attribute for many variables

2008-07-25 Thread Juan Asensio Sánchez
Hi

Using Dovecot 1.1.2 with LDAP. If i have this:

user_attrs = 
uid=home=/var/vmail/%$,mailuserquota=quota_rule=*:storage=%$,=mail=maildir:/var/vmail/%n/Maildir

OK. But if i have this:

user_attrs = 
uid=home=/var/vmail/%$,mailuserquota=quota_rule=*:storage=%$,uid=mail=maildir:/var/vmail/%$/Maildir

I get this error:

deliver(usuario1): Jul 25 12:59:08 Error: Per-user script path is
unknown. See http://wiki.dovecot.org/LDA/Sieve#location

The only difference is that I use the uid LDAP attribute twice. Why
does this happen?


Re: [Dovecot] quota vs. antispam issue

2008-07-24 Thread Juan Asensio Sánchez
I will test it tomorrow.

Thanks for your work.

2008/7/24 Johannes Berg [EMAIL PROTECTED]:
 On Mon, 2008-07-21 at 15:26 +0300, Timo Sirainen wrote:
 On Mon, 2008-07-21 at 06:48 +0200, Johannes Berg wrote:
  On Sun, 2008-07-20 at 23:53 +0300, Timo Sirainen wrote:
 
Ok, that seems to work, but I think a better alternative would probably
be to make dest_mail a struct mail ** like the context.
  
   That'd be an API change and I'd rather not do that for v1.1. But I
   suppose it would be the best permanent solution, so I'll do that for
   v1.2.
 
  Right, yeah, it'd be an API change, though I suppose the only external
  plugin is probably mine ;) If you wanted to do it you could make some
  header file declare a macro SAVE_FINISH_HAS_STRUCT_MAIL_PP, but I'm ok
  with doing it in 1.2, except that means that during 1.1 antispam and
  quota cannot be used together.

 No, this should help with v1.1:

   http://hg.dovecot.org/dovecot-1.1/rev/8dc6541b4426

 You could then do it like quota plugin and I think it should work.

 Ok, I've committed that, so it should work now. Somebody please test.

 johannes



Re: [Dovecot] Antispam plugin custom behavior?

2008-06-11 Thread Juan Asensio Sánchez
Hi

The anispam plugin does exactly what you need, and you could forget
the cron script. If you use SpamAssassin, you could add a rule to
Sieve to move the Spam messages when they arrives to the Spam folder.
If a user moves a message from Spam folder to any other folder, then
the message is considered a false possitive (when this move is
detected you could run sa-learn inmediatly, without the cron script);
the other way, when a user moves a message INTO the spam folder you
could run again the sa-learn script, but with different parameters.

I am testing antispam plugin with dovecot 1.1rcX, but it looks there
is a conflict with quota plugin. Anyway you can view the documentation
i have done, but it is in spanish.

http://wiki.nutum.es/linux/samba/samba_ldap_mds/instalacion_y_configuracion_de_dovecot

Regards.

2008/6/11 Kyle Wheeler [EMAIL PROTECTED]:
 Hello,

 I currently have a setup on my system with what I call magic folders to
 enable spam filter training. Here's how it works:

1. If you have a false-negative, put the spam into the Spam.Report
folder
2. If you have a false-positive (which has all kinds of ugly
spamassassin protective markup in it), put the message into the
Spam.NotSpam folder

 Currently what happens is that a cron job comes along every five minutes and
 processes the messages in those folders. In the case of the NotSpam folder,
 it strips the message of the spamassassin markup,  retrains the bayesian
 net, and redelivers the message (e.g. via deliver). In the case of the
 Report folder, the message is used to train the bayesian net (among other
 things) and then deleted.

 I'd love to be able to trigger these actions when the mail is moved, rather
 than have a cron job inspecting the mailboxes.

 I looked into the antispam plugin
 (http://johannes.sipsolutions.net/Projects/dovecot-antispam), which seems
 nice but doesn't appear sufficiently generic for my needs. What would really
 work is if I could get it set up such that putting a message into either of
 those directories is turned into piping the message to a script of my
 choosing (a different one for each folder).

 Does anyone know a good way of getting my own custom behavior in here, or is
 my cronjob setup probably the best way?

 ~Kyle
 --
 The optimist thinks this is the best of all possible worlds. The pessimist
 fears it is true.
  -- J. Robert Oppenheimer



Re: [Dovecot] Error using antispam plugin

2008-06-05 Thread Juan Asensio Sánchez
Compiling this way:

# export CFLAGS=-g3 -O2
# DEB_BUILD_OPTIONS=nostrip dpkg-buildpackage -rfakeroot -b

I get this:



pdc-server:~# ps aux | grep dove
root 16954  0.0  0.2   1940   616 ?Ss   21:15   0:00
/usr/sbin/dovecot
root 16955  0.0  1.1   9680  2948 ?S21:15   0:00 dovecot-auth
dovecot  16961  0.0  0.5   3308  1508 ?S21:15   0:00 imap-login
dovecot  16962  0.0  0.5   3308  1508 ?S21:15   0:00 imap-login
dovecot  16967  0.0  0.5   3312  1512 ?S21:16   0:00 imap-login
mailuser 16968  0.5  0.5   2600  1348 ?S21:16   0:00
/usr/lib/dovecot/imap
root 16971  0.0  0.2   2880   752 pts/0R+   21:16   0:00 grep dove
pdc-server:~# gdb -p 16968
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as i486-linux-gnu.
Attaching to process 16968
Reading symbols from /usr/lib/dovecot/imap...done.
Using host libthread_db library /lib/tls/i686/cmov/libthread_db.so.1.
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
Reading symbols from
/usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so
Reading symbols from
/usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so
Reading symbols from /usr/lib/dovecot/modules/imap/autocreate_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/autocreate_plugin.so
Failed to read a valid object file image from memory.
0xb7f98410 in ?? ()
(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
mail_get_physical_size (mail=0x8135db8, size_r=0x0) at mail.c:100
100 return p-v.get_physical_size(mail, size_r);
(gdb) bt full
#0  mail_get_physical_size (mail=0x8135db8, size_r=0x0) at mail.c:100
No locals.
#1  0xb7e575c5 in quota_check (t=0x8135db8, mail=0x0) at quota-storage.c:148
   qt = (struct quota_transaction_context *) 0x0
   ret = value optimized out
   too_large = 8
#2  0xb7e4b058 in antispam_save_finish (ctx=0x813cb98) at
antispam-storage-1.1.c:178
   asbox = (struct antispam_mailbox *) 0x81252f8
   ast = (struct antispam_internal_context *) 0x8135df0
   dest_mail = (struct mail *) 0xbffead08
   ret = 135093999
#3  0x0805a1c8 in cmd_append_continue_message (cmd=0x810d4e0) at
cmd-append.c:405
   client = (struct client *) 0x810bd48
   ctx = (struct cmd_append_context *) 0x810d528
   size = 135314760
   ret = value optimized out
#4  0x0805a59a in cmd_append_continue_parsing (cmd=0x810d4e0) at
cmd-append.c:353
   uid2 = value optimized out
   msg = value optimized out
   sync_flags = value optimized out
   imap_flags = value optimized out
   uid_validity = value optimized out
   uid1 = value optimized out
   client = (struct client *) 0x810bd48
   ctx = (struct cmd_append_context *) 0x810d528
   args = (const struct imap_arg *) 0x8135ec0
   flags_list = (const struct imap_arg *) 0x8135f50
   flags = MAIL_SEEN
   keywords_list = (const char * const *) 0x0
   keywords = (struct mail_keywords *) 0x0
   internal_date_str = 0x0
   internal_date = -1
   ret = 0
   timezone_offset = 0
   nonsync = false
   __PRETTY_FUNCTION__ = cmd_append_continue_parsing
#5  0x0805a7b5 in cmd_append (cmd=0x810d4e0) at cmd-append.c:499
   storage = (struct mail_storage *) 0x810b660
   box = value optimized out
   client = (struct client *) 0x810bd48
---Type return to continue, or q return to quit---
   ctx = (struct cmd_append_context *) 0x810d528
   mailbox = 0x8110588 Sent
#6  0x0805fa6c in client_command_input (cmd=0x810d4e0) at client.c:580
   client = (struct client *) 0x810bd48
   command = value optimized out
   __PRETTY_FUNCTION__ = client_command_input
#7  0x0805fb15 in client_command_input (cmd=0x810d4e0) at client.c:629
   client = (struct client *) 0x810bd48
   command = (struct command *) 0x8
   __PRETTY_FUNCTION__ = client_command_input
#8  0x08060305 in client_handle_input (client=0x810bd48) at client.c:670
   _data_stack_cur_id = 3
   ret = value optimized out
   

Re: [Dovecot] Error using antispam plugin

2008-06-05 Thread Juan Asensio Sánchez
What flags should i then use? I have tried with -g3 -O0 and only
with -O0 but i do not get any additional info.

2008/6/5 Timo Sirainen [EMAIL PROTECTED]:
 On Jun 5, 2008, at 11:17 PM, Juan Asensio Sánchez wrote:

 Compiling this way:

 # export CFLAGS=-g3 -O2

 Almost, but not quite :) *without* -O2, not with. It's enabled by default.




Re: [Dovecot] Error using antispam plugin

2008-06-04 Thread Juan Asensio Sánchez
Well

Now i think i did it. This is the debug information:

=

pdc-server:~# ps aux | grep -i dove
root  9044  0.0  0.2   1940   616 ?Ss   20:13   0:00
/usr/sbin/dovecot
root  9045  0.0  1.1   9680  2948 ?S20:13   0:00 dovecot-auth
dovecot   9046  0.0  0.5   3312  1512 ?S20:13   0:00 imap-login
dovecot   9047  0.0  0.5   3312  1512 ?S20:13   0:00 imap-login
dovecot   9070  0.0  0.5   3312  1512 ?S20:15   0:00 imap-login
mailuser  9071  0.2  0.5   2572  1444 ?S20:15   0:00
/usr/lib/dovecot/imap
root  9075  0.0  0.2   2876   752 pts/0R+   20:15   0:00 grep -i dove
pdc-server:~# gdb -p 9071
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as i486-linux-gnu.
Attaching to process 9071
Reading symbols from /usr/lib/dovecot/imap...done.
Using host libthread_db library /lib/tls/i686/cmov/libthread_db.so.1.
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
Reading symbols from
/usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so
Reading symbols from
/usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so
Reading symbols from /usr/lib/dovecot/modules/imap/autocreate_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/autocreate_plugin.so
Failed to read a valid object file image from memory.
0xb7ef3410 in ?? ()
(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
mail_get_physical_size (mail=0x8129ba8, size_r=0x0) at mail.c:100
100 return p-v.get_physical_size(mail, size_r);
(gdb) bt full
#0  mail_get_physical_size (mail=0x8129ba8, size_r=0x0) at mail.c:100
No locals.
#1  0xb7db25c5 in quota_check (t=0x8129ba8, mail=0x0) at quota-storage.c:148
qt = (struct quota_transaction_context *) 0x0
ret = value optimized out
too_large = 8
#2  0xb7da602d in antispam_save_finish (ctx=0x81417d8) at
antispam-storage-1.1.c:178
asbox = (struct antispam_mailbox *) 0x81262e0
ast = (struct antispam_internal_context *) 0x8129be0
dest_mail = (struct mail *) 0x812c578
ret = 135093999
#3  0x0805a1c8 in cmd_append_continue_message (cmd=0x810d4e0) at
cmd-append.c:405
client = (struct client *) 0x810bd48
ctx = (struct cmd_append_context *) 0x810d528
size = 135314760
ret = value optimized out
#4  0x0805a59a in cmd_append_continue_parsing (cmd=0x810d4e0) at
cmd-append.c:353
uid2 = value optimized out
msg = value optimized out
sync_flags = value optimized out
imap_flags = value optimized out
uid_validity = value optimized out
uid1 = value optimized out
client = (struct client *) 0x810bd48
ctx = (struct cmd_append_context *) 0x810d528
args = (const struct imap_arg *) 0x8129cb0
flags_list = (const struct imap_arg *) 0x8129d40
flags = MAIL_SEEN
keywords_list = (const char * const *) 0x0
keywords = (struct mail_keywords *) 0x0
internal_date_str = 0x0
internal_date = -1
ret = 0
timezone_offset = 0
nonsync = false
__PRETTY_FUNCTION__ = cmd_append_continue_parsing
#5  0x0805a7b5 in cmd_append (cmd=0x810d4e0) at cmd-append.c:499
storage = (struct mail_storage *) 0x810b660
box = value optimized out
client = (struct client *) 0x810bd48
ctx = (struct cmd_append_context *) 0x810d528
mailbox = 0x8110588 Sent
#6  0x0805fa6c in client_command_input (cmd=0x810d4e0) at client.c:580
---Type return to continue, or q return to quit---
client = (struct client *) 0x810bd48
command = value optimized out
__PRETTY_FUNCTION__ = client_command_input
#7  0x0805fb15 in client_command_input (cmd=0x810d4e0) at client.c:629
client = (struct client *) 0x810bd48
command = (struct command *) 0x8
__PRETTY_FUNCTION__ = client_command_input
#8  0x08060305 in client_handle_input (client=0x810bd48) at client.c:670
_data_stack_cur_id = 3
ret = value optimized out

Re: [Dovecot] Error using antispam plugin

2008-06-04 Thread Juan Asensio Sánchez
Applying the change Timo has said i get this:

==

(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
mail_get_physical_size (mail=0x81203a0, size_r=0x0) at mail.c:100
100 return p-v.get_physical_size(mail, size_r);
(gdb) bt full
#0  mail_get_physical_size (mail=0x81203a0, size_r=0x0) at mail.c:100
No locals.
#1  0xb7e405c5 in quota_check (t=0x81203a0, mail=0x0) at quota-storage.c:148
qt = (struct quota_transaction_context *) 0x0
ret = value optimized out
too_large = 8
#2  0xb7e34048 in antispam_save_finish (ctx=0x8123178) at
antispam-storage-1.1.c:181
asbox = (struct antispam_mailbox *) 0x811b298
ast = (struct antispam_internal_context *) 0x81203d8
dest_mail = (struct mail *) 0x8122d70
ret = 135093999
#3  0x0805a1c8 in cmd_append_continue_message (cmd=0x810d4e0) at
cmd-append.c:405
client = (struct client *) 0x810bd48
ctx = (struct cmd_append_context *) 0x810d528
size = 135314760
ret = value optimized out
#4  0x0805a59a in cmd_append_continue_parsing (cmd=0x810d4e0) at
cmd-append.c:353
uid2 = value optimized out
msg = value optimized out
sync_flags = value optimized out
imap_flags = value optimized out
uid_validity = value optimized out
uid1 = value optimized out
client = (struct client *) 0x810bd48
ctx = (struct cmd_append_context *) 0x810d528
args = (const struct imap_arg *) 0x81204a8
flags_list = (const struct imap_arg *) 0x8120538
flags = MAIL_SEEN
keywords_list = (const char * const *) 0x0
keywords = (struct mail_keywords *) 0x0
internal_date_str = 0x0
internal_date = -1
ret = 0
timezone_offset = 0
nonsync = false
__PRETTY_FUNCTION__ = cmd_append_continue_parsing
#5  0x0805a7b5 in cmd_append (cmd=0x810d4e0) at cmd-append.c:499
storage = (struct mail_storage *) 0x810b660
box = value optimized out
client = (struct client *) 0x810bd48
ctx = (struct cmd_append_context *) 0x810d528
mailbox = 0x8110588 Sent
#6  0x0805fa6c in client_command_input (cmd=0x810d4e0) at client.c:580
client = (struct client *) 0x810bd48
command = value optimized out
---Type return to continue, or q return to quit---
__PRETTY_FUNCTION__ = client_command_input
#7  0x0805fb15 in client_command_input (cmd=0x810d4e0) at client.c:629
client = (struct client *) 0x810bd48
command = (struct command *) 0x8
__PRETTY_FUNCTION__ = client_command_input
#8  0x08060305 in client_handle_input (client=0x810bd48) at client.c:670
_data_stack_cur_id = 3
ret = value optimized out
remove_io = value optimized out
handled_commands = false
#9  0x0806050e in client_input (client=0x810bd48) at client.c:725
cmd = value optimized out
output = (struct ostream *) 0x810becc
bytes = 34
__PRETTY_FUNCTION__ = client_input
#10 0x080d9100 in io_loop_handler_run (ioloop=0x8108ab8) at ioloop-epoll.c:201
ctx = value optimized out
event = (const struct epoll_event *) 0x8108bf0
list = (struct io_list *) 0x810d118
io = (struct io_file *) 0x810bf28
tv = {tv_sec = 4, tv_usec = 999383}
t_id = 2
msecs = value optimized out
ret = 1
i = 0
j = 0
call = value optimized out
#11 0x080d8098 in io_loop_run (ioloop=0x8108ab8) at ioloop.c:308
No locals.
#12 0x080680db in main (argc=Cannot access memory at address 0x8
) at main.c:293
home = 0x0
(gdb)

==

Very similar to previous post (if not identical). Timo, how can i
compile with the -O2 option when building from debian source packages?

2008/6/4 Johannes Berg [EMAIL PROTECTED]:

 But looking at the antispam code I think there's one bug:

 static int antispam_save_finish(struct mail_save_context *ctx)
   struct mail *dest_mail = ast-mail;

 I think ast-mail can be NULL. It should maybe be instead:

 dest_mail = ctx-dest_mail != NULL ? ctx-dest_mail : ast-mail;

 Yeah, probably lost that when copying from the quota code. Juan, can you
 try that?

 OTOH, super (i.e. the quota plugin) will never see this value and that's
 where it seems to crash.

 johannes



Re: [Dovecot] Error using antispam plugin

2008-06-03 Thread Juan Asensio Sánchez
Wow. Thanks for your quick answer. I don't know much about compiling
or debugging. Could anyone say me how to do that or give some tips?

Thanks in advance.

2008/6/3 Johannes Berg [EMAIL PROTECTED]:

 Program received signal SIGSEGV, Segmentation fault.
 0x0809ea67 in mail_get_physical_size ()
 (gdb) bt full
 #0  0x0809ea67 in mail_get_physical_size ()
 No symbol table info available.
 #1  0xb7e795c5 in quota_mail_storage_created () from
 /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
 No symbol table info available.
 #2  0xb7e6d02d in antispam_save_finish (ctx=0x813b720) at
 antispam-storage-1.1.c:178
   asbox = (struct antispam_mailbox *) 0x8124320
   ast = (struct antispam_internal_context *) 0x8134978
   dest_mail = (struct mail *) 0x8137310
   ret = 135092783
 #3  0x0805a1c8 in _start ()
 No symbol table info available.

 Hmm. Can you compile dovecot and the quota plugin with debugging symbols
 too? This doesn't look too useful.

 johannes



Re: [Dovecot] Error using antispam plugin

2008-06-03 Thread Juan Asensio Sánchez
Hi

Thanks for the help, This is the result of the running commands:

pdc-server:~# dpkg -l | grep gdb
ii  gdb   6.4.90.dfsg-1
The GNU Debugger
ii  libgdbm3  1.8.3-3
GNU dbm database routines (runtime version)
pdc-server:~# dpkg -l | grep dovecot
ii  dovecot-common1.1.rc7-0~auto+1
secure mail server that supports mbox and ma
ii  dovecot-dev   1.1.rc7-0~auto+1
header files for the dovecot mail server
ii  dovecot-imapd 1.1.rc7-0~auto+1
secure IMAP server that supports mbox and ma
ii  dovecot-pop3d 1.1.rc7-0~auto+1
secure POP3 server that supports mbox and ma
pdc-server:~# ps aux | grep imap
dovecot   2749  0.0  0.5   3312  1512 ?S20:45   0:00 imap-login
dovecot   2824  0.0  0.5   3308  1508 ?S20:52   0:00 imap-login
dovecot   2848  0.4  0.5   3308  1508 ?S20:54   0:00 imap-login
mailuser  2849  1.0  0.4   2540  1280 ?S20:54   0:00
/usr/lib/dovecot/imap
root  2852  0.0  0.2   2880   752 pts/0R+   20:54   0:00 grep imap
pdc-server:~# gdb -p 2849
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as i486-linux-gnu.
Attaching to process 2849
Reading symbols from /usr/lib/dovecot/imap...(no debugging symbols
found)...done.
Using host libthread_db library /lib/tls/i686/cmov/libthread_db.so.1.
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...(no debugging
symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /lib/tls/i686/cmov/libc.so.6...(no debugging
symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
Reading symbols from
/usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so...(no
debugging symbols found)...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so
Reading symbols from
/usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so
Reading symbols from /usr/lib/dovecot/modules/imap/autocreate_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/autocreate_plugin.so
Failed to read a valid object file image from memory.
0xb7fba410 in ?? ()
(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x0809ea67 in mail_get_physical_size ()
(gdb) bt full
#0  0x0809ea67 in mail_get_physical_size ()
No symbol table info available.
#1  0xb7e795c5 in quota_mail_storage_created () from
/usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
No symbol table info available.
#2  0xb7e6d02d in antispam_save_finish (ctx=0x813b720) at
antispam-storage-1.1.c:178
asbox = (struct antispam_mailbox *) 0x8124320
ast = (struct antispam_internal_context *) 0x8134978
dest_mail = (struct mail *) 0x8137310
ret = 135092783
#3  0x0805a1c8 in _start ()
No symbol table info available.
(gdb)

Regards.

2008/6/3 Johannes Berg [EMAIL PROTECTED]:
 On Tue, 2008-06-03 at 00:51 +0200, Juan Asensio Sánchez wrote:
 Well

 Finally i found the error. It look like antispam is not compatible
 with quota plugin.

 mail_plugins = quota imap_quota autocreate antispam

 If i remove quota and imap_quota plugins from imap protocol,
 everything works fine and the message is saved in sent folder.

 mail_plugins = autocreate antispam

 Ok, that explains why I don't see that problem.

 If i enable again the plugins, the error happens again. Any solution?

  Now i have compiled dovecot-antispam plugin with the -g3 option in
  CFLAGS. What to do now?

 http://dovecot.org/bugreport.html

 The debugging hangs section is what I usually do: start mail client,
 gdb -p $(pidof imap), enter cont in gdb, do operation in mail client
 that crashes, get backtrace from gdb.

 johannes



Re: [Dovecot] Error using antispam plugin

2008-06-03 Thread Juan Asensio Sánchez
I compile Dovecot from the source packages of the Debian repository. I
don't know if it has been correctly compiled with that flag, i have
executed:

# CFLAGS=-g3 dpkg-buildpackage -rfakeroot -b

When running gdb again, i get diffrenet output but i think that this
information is not relevant:

(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x080b294d in mail_get_physical_size ()
(gdb) bt full
#0  0x080b294d in mail_get_physical_size ()
No symbol table info available.
#1  0xb7df0200 in quota_try_alloc () from
/usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
No symbol table info available.
#2  0xb7df4b01 in quota_plugin_deinit () from
/usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
No symbol table info available.
#3  0xb7df4edc in quota_plugin_deinit () from
/usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
No symbol table info available.
#4  0xb7de8036 in antispam_save_finish () from
/usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so
No symbol table info available.
#5  0x080b5aa6 in mailbox_save_finish ()
No symbol table info available.
#6  0x0805ad8f in _start ()
No symbol table info available.
(gdb) cont
Continuing.

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb)

2008/6/4 Juan Asensio Sánchez [EMAIL PROTECTED]:
 I compile Dovecot from the source packages of the Debian repository. I
 don't know if it has been correctly compiled with that flag, i have
 executed:

 # CFLAGS=-g3 dpkg-buildpackage -rfakeroot -b

 When running gdb again, i get diffrenet output but i think that this
 information is not relevant:

 (gdb) cont
 Continuing.

 Program received signal SIGSEGV, Segmentation fault.
 0x080b294d in mail_get_physical_size ()
 (gdb) bt full
 #0  0x080b294d in mail_get_physical_size ()
 No symbol table info available.
 #1  0xb7df0200 in quota_try_alloc () from
 /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
 No symbol table info available.
 #2  0xb7df4b01 in quota_plugin_deinit () from
 /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
 No symbol table info available.
 #3  0xb7df4edc in quota_plugin_deinit () from
 /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
 No symbol table info available.
 #4  0xb7de8036 in antispam_save_finish () from
 /usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so
 No symbol table info available.
 #5  0x080b5aa6 in mailbox_save_finish ()
 No symbol table info available.
 #6  0x0805ad8f in _start ()
 No symbol table info available.
 (gdb) cont
 Continuing.

 Program terminated with signal SIGSEGV, Segmentation fault.
 The program no longer exists.
 (gdb)

 2008/6/3 Johannes Berg [EMAIL PROTECTED]:
 On Tue, 2008-06-03 at 22:16 +0300, Timo Sirainen wrote:
 On Tue, 2008-06-03 at 21:11 +0200, Johannes Berg wrote:
  On Tue, 2008-06-03 at 21:06 +0200, Juan Asensio Sánchez wrote:
   Wow. Thanks for your quick answer. I don't know much about compiling
   or debugging. Could anyone say me how to do that or give some tips?
 
  well, add -g3 somewhere to the CFLAGS when building dovecot.

 -g is added by default. Does -g3 add anything useful compared to it?

 I think it only adds debug information for macros.

 johannes




Re: [Dovecot] Error using antispam plugin

2008-06-02 Thread Juan Asensio Sánchez
Well

Finally i found the error. It look like antispam is not compatible
with quota plugin.

mail_plugins = quota imap_quota autocreate antispam

If i remove quota and imap_quota plugins from imap protocol,
everything works fine and the message is saved in sent folder.

mail_plugins = autocreate antispam

If i enable again the plugins, the error happens again. Any solution?

Regards.

2008/5/31 Juan Asensio Sánchez [EMAIL PROTECTED]:
 Hi again

 Testing with Dovecot 1.1RC7, and antispam plugin 31/05/2008, 18:00,
 the problem persists. The error ocurrs when Evolution/Thunderbird
 tries to save the message in the Sent folder (the message is sent and
 received by the recipient correctly). If i disable antispam plugin
 from IMAP protocol everything works fine.

 Sent folder has been autocreated and autosubscribed using the
 autocreate plugin. With plugin autocreate disabled and folders
 subscribed manually the problem persists.

 Now i have compiled dovecot-antispam plugin with the -g3 option in
 CFLAGS. What to do now?

 The errors shown by dovecot are these:

 dovecot: May 31 19:49:24 Error: child 16929 (imap) killed with signal 11
 dovecot: May 31 19:49:24 Error: child 16933 (imap) killed with signal 11
 dovecot: May 31 19:49:25 Error: child 16936 (imap) killed with signal 11
 dovecot: May 31 19:49:26 Error: child 16940 (imap) killed with signal 11

 In syslog, antispam plugin logs this (compiled with DEBUG_VERBOSE=1):

 May 31 19:51:33 pdc-server imap: antispam: plugin initialising
 May 31 19:51:33 pdc-server imap: antispam: Trash is trash folder
 May 31 19:51:33 pdc-server imap: antispam: Junk is spam folder
 May 31 19:51:33 pdc-server imap: antispam: mail backend spam address -r
 May 31 19:51:33 pdc-server imap: antispam: mail backend not-spam address -k
 May 31 19:51:33 pdc-server imap: antispam: mail backend sendmail
 /usr/bin/spamassassin
 May 31 19:51:33 pdc-server imap: antispam: mail backend tmpdir /tmp

 repeated for every child error.

 Regards.

 2008/5/29 Juan Asensio Sánchez [EMAIL PROTECTED]:
 No idea how to add the -g3 option to compile. Once done, how and where
 is the gdb generated? I would need detailed help to do this.

 I know that it is known to not work, but if nobody uses it, then it
 will never work.

 I think this plugin is great, a great way to classify SPAM without
 difficult instructions for the final users. I will use the plugin with
 SpamAssassin, not DSPAM.

 Regards.

 2008/5/28 Timo Sirainen [EMAIL PROTECTED]:
 On Wed, 2008-05-28 at 06:43 -0400, Charles Marcus wrote:
 Right, all I saw was rc15... so many distros have locked onto that
 version for some reason...

 I think it's mainly RHEL / CentOS. But RHEL 5.2 was released this week
 with Dovecot 1.0.7 (or so I've heard), so perhaps we can soon get rid of
 1.0.rc15 questions. :)





Re: [Dovecot] Error using antispam plugin

2008-05-31 Thread Juan Asensio Sánchez
Hi again

Testing with Dovecot 1.1RC7, and antispam plugin 31/05/2008, 18:00,
the problem persists. The error ocurrs when Evolution/Thunderbird
tries to save the message in the Sent folder (the message is sent and
received by the recipient correctly). If i disable antispam plugin
from IMAP protocol everything works fine.

Sent folder has been autocreated and autosubscribed using the
autocreate plugin. With plugin autocreate disabled and folders
subscribed manually the problem persists.

Now i have compiled dovecot-antispam plugin with the -g3 option in
CFLAGS. What to do now?

The errors shown by dovecot are these:

dovecot: May 31 19:49:24 Error: child 16929 (imap) killed with signal 11
dovecot: May 31 19:49:24 Error: child 16933 (imap) killed with signal 11
dovecot: May 31 19:49:25 Error: child 16936 (imap) killed with signal 11
dovecot: May 31 19:49:26 Error: child 16940 (imap) killed with signal 11

In syslog, antispam plugin logs this (compiled with DEBUG_VERBOSE=1):

May 31 19:51:33 pdc-server imap: antispam: plugin initialising
May 31 19:51:33 pdc-server imap: antispam: Trash is trash folder
May 31 19:51:33 pdc-server imap: antispam: Junk is spam folder
May 31 19:51:33 pdc-server imap: antispam: mail backend spam address -r
May 31 19:51:33 pdc-server imap: antispam: mail backend not-spam address -k
May 31 19:51:33 pdc-server imap: antispam: mail backend sendmail
/usr/bin/spamassassin
May 31 19:51:33 pdc-server imap: antispam: mail backend tmpdir /tmp

repeated for every child error.

Regards.

2008/5/29 Juan Asensio Sánchez [EMAIL PROTECTED]:
 No idea how to add the -g3 option to compile. Once done, how and where
 is the gdb generated? I would need detailed help to do this.

 I know that it is known to not work, but if nobody uses it, then it
 will never work.

 I think this plugin is great, a great way to classify SPAM without
 difficult instructions for the final users. I will use the plugin with
 SpamAssassin, not DSPAM.

 Regards.

 2008/5/28 Timo Sirainen [EMAIL PROTECTED]:
 On Wed, 2008-05-28 at 06:43 -0400, Charles Marcus wrote:
 Right, all I saw was rc15... so many distros have locked onto that
 version for some reason...

 I think it's mainly RHEL / CentOS. But RHEL 5.2 was released this week
 with Dovecot 1.0.7 (or so I've heard), so perhaps we can soon get rid of
 1.0.rc15 questions. :)




Re: [Dovecot] v1.1.rc6 released

2008-05-30 Thread Juan Asensio Sánchez
Hi

I will try the plugin because i have been who most problems has had.

Regards.

2008/5/30 Johannes Berg [EMAIL PROTECTED]:
 On Fri, 2008-05-30 at 03:39 +0300, Timo Sirainen wrote:
 http://dovecot.org/releases/1.1/rc/dovecot-1.1.rc6.tar.gz
 http://dovecot.org/releases/1.1/rc/dovecot-1.1.rc6.tar.gz.sig

 This is it. The first v1.1 release that actually deserves the release
 candidate name. It contains everything I require from v1.1.0 release.

 I took the opportunity and made the antispam plugin work, but I only
 lightly tested it, I need to review and see if it doesn't leak mail
 references/memory.

 johannes



Re: [Dovecot] Error using antispam plugin

2008-05-29 Thread Juan Asensio Sánchez
No idea how to add the -g3 option to compile. Once done, how and where
is the gdb generated? I would need detailed help to do this.

I know that it is known to not work, but if nobody uses it, then it
will never work.

I think this plugin is great, a great way to classify SPAM without
difficult instructions for the final users. I will use the plugin with
SpamAssassin, not DSPAM.

Regards.

2008/5/28 Timo Sirainen [EMAIL PROTECTED]:
 On Wed, 2008-05-28 at 06:43 -0400, Charles Marcus wrote:
 Right, all I saw was rc15... so many distros have locked onto that
 version for some reason...

 I think it's mainly RHEL / CentOS. But RHEL 5.2 was released this week
 with Dovecot 1.0.7 (or so I've heard), so perhaps we can soon get rid of
 1.0.rc15 questions. :)



[Dovecot] Error using antispam plugin

2008-05-28 Thread Juan Asensio Sánchez
Hi

When activating antispam plugin in imap protocol, when sending an
email, Evolution/Thunderbirdkeeps infinitely Sending authentication
information, and Dovecor logs shows dovecot: May 28 10:14:35 Error:
child 6910 (imap) killed with signal 11; lots of empty folders in
/tmp are created with names like antispam-mail-ZvyWeZ.

I am using Dovecot1.1 rc15 compiled from Debian source repositories
(http://xi.rename-it.nl/debian/) and last version of antispam plugin,
obtained with git. Any idea or help to debug?

Thanks.


Re: [Dovecot] Error when using include directive in Sieve

2008-05-28 Thread Juan Asensio Sánchez
Yes, xD 1.1rc5. And yes, this is the same installation that the error
using antispam plugin. But deactivating antispam plugin, the problem
with sieve persists. So, as Anders has said, the included script must
exist, so there is no viable solution.

Thanks.

2008/5/28 Charles Marcus [EMAIL PROTECTED]:
 On 5/27/2008 6:47 PM, Juan Asensio Sánchez wrote:

 Hi

 I have two sieve scripts:

 Is this the same installation as the one with the 'error antispam plugin'?

 If so, there is no 1.1rc15, so, was it actually 1.1rc5? Or 1.0rc15? Iinclude
 support is not available in the 1.0.x series, only in 1.1...

 --

 Best regards,

 Charles




Re: [Dovecot] Error using antispam plugin

2008-05-28 Thread Juan Asensio Sánchez
Well, i did a mistake, it is 1.1rc5 version, so i don't think this is
an old version.

2008/5/28 Charles Marcus [EMAIL PROTECTED]:
 On 5/28/2008, Juan Asensio Sánchez ([EMAIL PROTECTED]) wrote:

 I am using Dovecot1.1 rc15 compiled from Debian source repositories
 (http://xi.rename-it.nl/debian/) and last version of antispam plugin,
 obtained with git. Any idea or help to debug?

 First... upgrade... this is a very old version.

 --

 Best regards,

 Charles



[Dovecot] Error when using include directive in Sieve

2008-05-27 Thread Juan Asensio Sánchez
Hi

I have two sieve scripts:

# cat /var/vmail/sieve/global
require [include];
include :global spam;
include :personal sieve;

# cat /var/vmail/sieve/spam
require fileinto;
if exists X-Spam-Flag {
  fileinto Junk;
}

# ls -l /var/vmail/sieve/
total 16
-rw-r--r-- 1 mailuser mailgroup 68 2008-05-28 00:40 global
-rw--- 1 mailuser mailgroup 80 2008-05-28 00:40 globalc
-rw-r--r-- 1 mailuser mailgroup 68 2008-05-27 21:15 spam
-rw--- 1 mailuser mailgroup 80 2008-05-27 21:25 spamc

# cat /etc/dovecot/dovecot.conf
[...]
sieve_global_dir = /var/vmail/sieve/
sieve_global_path = /var/vmail/sieve/global
[...]

When delivering a message I get:

deliver([EMAIL PROTECTED]): May 28 00:39:04 Error:
sieve_execute_bytecode(/var/vmail/sieve/globalc) failed

Personal sieve script is not sure to exist, only if the user has
created it. If I put the contents of the spam script in the global
script (replacing the content), everything works fine. Why does this
happen? Is it because the personal script doesn't exists?Or is the
syntax incorrect (i don't think this because the script is compiled)?

Thanks in advance.


[Dovecot] Problem compiling antispam plugin with Dovecot 1.1

2008-05-24 Thread Juan Asensio Sánchez
Hi

I am trying to compile antispam plugin with Dovecot 1.1, but i get an
error when running make install:

pdc-server:~/tmp/dovecot-antispam# make
cc -c  -DHAVE_CONFIG_H -Wall -I/root/tmp/dovecot-1.1.rc5/
-I/root/tmp/dovecot-1.1.rc5/src/ -I/root/tmp/dovecot-1.1.rc5/src/lib/
-I/root/tmp/dovecot-1.1.rc5/src/lib-storage/
-I/root/tmp/dovecot-1.1.rc5/src/lib-mail/
-I/root/tmp/dovecot-1.1.rc5/src/lib-imap/
-I/root/tmp/dovecot-1.1.rc5/src/lib-dict/
-I/root/tmp/dovecot-1.1.rc5/src/lib-index/
-I/root/tmp/dovecot-1.1.rc5/src/imap/ -DCONFIG_DEBUG -DDEBUG_SYSLOG
-DCONFIG_DEBUG_VERBOSE -DCONFIG_DOVECOT_11
-Dmempool_unref(x)=pool_unref(x) -fPIC -shared -Wall -Wextra
-DPLUGINNAME=antispam -o debug.o.o debug.c
cc  -DHAVE_CONFIG_H -Wall -I/root/tmp/dovecot-1.1.rc5/
-I/root/tmp/dovecot-1.1.rc5/src/ -I/root/tmp/dovecot-1.1.rc5/src/lib/
-I/root/tmp/dovecot-1.1.rc5/src/lib-storage/
-I/root/tmp/dovecot-1.1.rc5/src/lib-mail/
-I/root/tmp/dovecot-1.1.rc5/src/lib-imap/
-I/root/tmp/dovecot-1.1.rc5/src/lib-dict/
-I/root/tmp/dovecot-1.1.rc5/src/lib-index/
-I/root/tmp/dovecot-1.1.rc5/src/imap/ -DCONFIG_DEBUG -DDEBUG_SYSLOG
-DCONFIG_DEBUG_VERBOSE -DCONFIG_DOVECOT_11
-Dmempool_unref(x)=pool_unref(x) -fPIC -shared -Wall -Wextra
-DPLUGINNAME=antispamantispam-storage-1.1.c   -o
antispam-storage-1.1
cc  -o .o
cc: no input files
make: *** [.o] Error 1

When running make clean to try to compile again, a file called
antispam-storage-1.1.c (without any extension) is not deleted, and
this file was not before running make install. If I run again make
install with that file present (after running make clean), i get this
output:

cc -c  -DHAVE_CONFIG_H -Wall -I/root/tmp/dovecot-1.1.rc5/
-I/root/tmp/dovecot-1.1.rc5/src/ -I/root/tmp/dovecot-1.1.rc5/src/lib/
-I/root/tmp/dovecot-1.1.rc5/src/lib-storage/
-I/root/tmp/dovecot-1.1.rc5/src/lib-mail/
-I/root/tmp/dovecot-1.1.rc5/src/lib-imap/
-I/root/tmp/dovecot-1.1.rc5/src/lib-dict/
-I/root/tmp/dovecot-1.1.rc5/src/lib-index/
-I/root/tmp/dovecot-1.1.rc5/src/imap/ -DCONFIG_DEBUG -DDEBUG_SYSLOG
-DCONFIG_DEBUG_VERBOSE -DCONFIG_DOVECOT_11
-Dmempool_unref(x)=pool_unref(x) -fPIC -shared -Wall -Wextra
-DPLUGINNAME=antispam -o debug.o debug.c
cc  -o .o
cc: no input files
make: *** [.o] Error 1

If I run make clean and manually deleted that file before running make
install, i get again the first output. Why am i getting this error?

Regards.


[Dovecot] Auto-subscribe to folders

2008-05-18 Thread Juan Asensio Sánchez
Hi

I will use autocreate plugin in a new installation, and client has
asked me if the users can be auto-subscribed to certain folders.
Example: the users will have an autocreated Junk folder (for SPAM) and
we want the users not to be un-subscribed for this folder; so if the
user wants to be unsubscribed (from outlook, webmail, etc), there are
two options: a) the action is rejected or denied; b) the next time
he/she logins, then the folder is autosubscribed again. Could this be
done? How?

Thanks in advance.


Re: [Dovecot] deliver custom maildir creation

2008-05-05 Thread Juan Asensio Sánchez
Perhaps the autocreate plugin can do this.

2008/5/5 Charles Marcus [EMAIL PROTECTED]:
 On 5/5/2008, Asheesh Laroia ([EMAIL PROTECTED]) wrote:

  I don't know as far as deliver, but what I do is put the mailboxes I want
 to be sure exist in my /etc/skel.  That way, on user creation, the
 directories are already there.
 

  That only works for system users, not for virtual users...

  --

  Best regards,

  Charles



Re: [Dovecot] deliver custom maildir creation

2008-05-05 Thread Juan Asensio Sánchez
Here: http://dovecot.org/patches/1.1/

How to compile (in spanish ;)):
http://wiki.nutum.es/linux/samba/samba_ldap_mds/compilacion_paquetes_dovecot

Regards

2008/5/5 Charles Marcus [EMAIL PROTECTED]:
 On 5/5/2008, Juan Asensio Sánchez ([EMAIL PROTECTED]) wrote:

  Perhaps the autocreate plugin can do this.
 

  Well... sounds perfect, but where would I look for this?

  Its not on the 'Plugins' page anywhere:

  http://wiki.dovecot.org/Plugins

  --

  Best regards,

  Charles



Re: [Dovecot] Fatal: Running as root isn't permitted

2008-05-04 Thread Juan Asensio Sánchez
Hi

When i try to compile 1.1rc4-0~auto+22 from source packages for
Debian, under Debian Etch 4.0r3, i get this error:

-

i486-linux-gnu-gcc -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes
-Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2
-Wbad-function-cast -Wstrict-aliasing=2 -o dovecot-auth auth.o
auth-cache.o auth-client-connection.o auth-master-connection.o
auth-master-listener.o auth-request.o auth-request-handler.o
auth-stream.o auth-worker-client.o auth-worker-server.o db-sql.o
db-passwd-file.o main.o mech.o mech-anonymous.o mech-plain.o
mech-login.o mech-cram-md5.o mech-digest-md5.o mech-ntlm.o mech-otp.o
mech-skey.o mech-rpa.o mech-apop.o mech-winbind.o otp-skey-common.o
plain-common.o passdb.o passdb-blocking.o passdb-bsdauth.o
passdb-cache.o passdb-checkpassword.o passdb-passwd.o
passdb-passwd-file.o passdb-pam.o passdb-shadow.o passdb-sia.o
passdb-vpopmail.o passdb-sql.o userdb.o userdb-blocking.o userdb-nss.o
userdb-passwd.o userdb-passwd-file.o userdb-prefetch.o userdb-static.o
userdb-vpopmail.o userdb-sql.o mech-gssapi.o db-ldap.o passdb-ldap.o
userdb-ldap.o -Wl,--export-dynamic  libpassword.a
../lib-settings/libsettings.a ../lib-ntlm/libntlm.a
../lib-otp/libotp.a ../lib-sql/libsql.a ../lib/liblib.a -lcrypt -lpam
-L/usr/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkrb5support
-lresolv -lldap /usr/lib/libmysqlclient.so -lm -lpq
/usr/lib/libsqlite3.so -lz -ldl
mech-gssapi.o: In function `gssapi_krb5_userok':
/root/tmp/dovecot-1.1.rc4/src/auth/mech-gssapi.c:325: undefined
reference to `krb5_get_error_message'
collect2: ld returned 1 exit status
make[4]: *** [dovecot-auth] Error 1
make[4]: se sale del directorio `/root/tmp/dovecot-1.1.rc4/src/auth'
make[3]: *** [all-recursive] Error 1
make[3]: se sale del directorio `/root/tmp/dovecot-1.1.rc4/src'
make[2]: *** [all-recursive] Error 1
make[2]: se sale del directorio `/root/tmp/dovecot-1.1.rc4'
make[1]: *** [all] Error 2
make[1]: se sale del directorio `/root/tmp/dovecot-1.1.rc4'
make: *** [build-stamp] Error 2

-

I have followed these steps:

[[Included deb-src http://xi.rename-it.nl/debian/ testing-auto main in
sources.list]]
# apt-get install fakeroot dpkg-dev build-essential
# apt-get source dovecot
# cd dovecot-1.1.rc4
# apt-get build-dep dovecot
# dpkg-buildpackage -rfakeroot -b

So with the previous version, i had compiled packages in parent folder.

I don't know much about compiling, so too many questions. How can i
solve this error?

NB: Could you add in the source packages of this repository the
plugins por antispam and autocreate? Thanks.

2008/5/4 Timo Sirainen [EMAIL PROTECTED]:
 On Sat, 2008-05-03 at 23:13 +0200, Juan Asensio Sánchez wrote:
   Well
  
   I solved it. Altough mail_uid = mailuser is defined in dovecot.conf,
   i must also return an uid from the ldap query. Changing:
  
   user_attrs = 
 =home=/var/vmail/%d/%n,mailuserquota=quota=maildir:storage,=mail=maildir:/var/vmail/%d/%n/Maildir
  
   To:
  
   user_attrs = 
 =home=/var/vmail/%d/%n,=uid=mailuser,mailuserquota=quota=maildir:storage,=mail=maildir:/var/vmail/%d/%n/Maildir
   u
  
   solved the problem. Hope this could be helpful for someone.

  It was a bug, fixed: http://hg.dovecot.org/dovecot-1.1/rev/1b15881ed93b




[Dovecot] Fatal: Running as root isn't permitted

2008-05-04 Thread Juan Asensio Sánchez
Hi!

 It compiles perfect now and works fine without returning the uid in
 the ldap query. What about the inclusion of the antispam and
 autocreate plugins in the (source) debian package?

 Thank you very much.


 2008/5/4 Timo Sirainen [EMAIL PROTECTED]:


 On Sun, 2008-05-04 at 15:19 +0200, Juan Asensio Sánchez wrote:
mech-gssapi.o: In function `gssapi_krb5_userok':
/root/tmp/dovecot-1.1.rc4/src/auth/mech-gssapi.c:325: undefined
reference to `krb5_get_error_message'
 
   This fixes it: http://hg.dovecot.org/dovecot-1.1/rev/ad0f32abda6d
 
 


[Dovecot] Compiling plugins

2008-05-04 Thread Juan Asensio Sánchez
Hi

I use Debian Etch 4.0r3. I am trying to compile antispam plugin, but i
have no idea about how to do it cause i have never done so. I have
compiled source packages for Debian with some instructions in some
pages, but i can not compile this plugin separately. Can anyone help
me or give some tips to do this (yes, i have google'd it yet, but no
good results).

This is the result trying to compile antispam plugin:


pdc-server:~/tmp/antispam# ls -l ../dovecot-1.1.rc5/
total 3508
-rw-r--r--  1 root root  322488 2008-05-05 00:30 aclocal.m4
-rw-r--r--  1 root root 551 2008-03-10 23:23 AUTHORS
-rw-r--r--  1 root root 804 2008-05-05 01:01 autogen.sh
-rw-r--r--  1 root root 1470323 2008-05-05 00:31 ChangeLog
-rwxr-xr-x  1 root root3707 2008-03-10 23:23 compile
-rwxr-xr-x  1 root root   44892 2008-02-17 21:10 config.guess
-rw-r--r--  1 root root   14778 2008-05-05 00:31 config.h
-rw-r--r--  1 root root   13687 2008-05-05 00:31 config.h.in
-rwxr-xr-x  1 root root   18343 2008-05-04 12:13 config.rpath
-rwxr-xr-x  1 root root   33387 2008-02-17 21:10 config.sub
-rwxr-xr-x  1 root root 1086089 2008-05-05 00:30 configure
-rw-r--r--  1 root root   56429 2008-05-05 00:30 configure.in
-rw-r--r--  1 root root3980 2008-03-10 23:23 COPYING
-rw-r--r--  1 root root   26536 2008-03-10 23:23 COPYING.LGPL
-rw-r--r--  1 root root1023 2008-03-10 23:23 COPYING.MIT
drwxr-xr-x  4 root root4096 2008-05-05 01:01 debian
-rwxr-xr-x  1 root root   15936 2008-03-10 23:23 depcomp
drwxrwxrwx  3 root root4096 2008-05-05 01:01 doc
-rw-r--r--  1 root root 187 2008-03-10 23:23 dovecot-config.in.in
-rw-r--r--  1 root root   46655 2008-05-05 00:30 dovecot-example.conf
drwxr-xr-x  3 root root4096 2008-05-05 01:01 dovecot-managesieve
drwxr-xr-x  3 root root4096 2008-05-05 01:01 dovecot-sieve
-rw-r--r--  1 root root1235 2008-03-10 23:23 INSTALL
-rwxr-xr-x  1 root root9233 2008-03-10 23:23 install-sh
-rw-r--r--  1 root root  199984 2008-04-05 19:05 ltmain.sh
-rw-r--r--  1 root root 656 2008-03-10 23:23 Makefile.am
-rw-r--r--  1 root root   24492 2008-05-05 00:30 Makefile.in
-rwxr-xr-x  1 root root   11014 2008-03-10 23:23 missing
-rw-r--r--  1 root root   71910 2008-05-05 00:30 NEWS
-rw-r--r--  1 root root1344 2008-03-16 10:58 README
drwxrwxrwx 26 root root4096 2008-05-05 00:32 src
-rw-r--r--  1 root root   0 2008-03-10 23:23 stamp.h.in
-rw-r--r--  1 root root   14980 2008-05-05 00:30 TODO
pdc-server:~/tmp/antispam# ls -l
total 144
-rw-r--r-- 1 root root  7359 2008-05-05 00:31 antispam.7
-rw-r--r-- 1 root root  4864 2008-05-05 00:31 antispam-plugin.c
-rw-r--r-- 1 root root  2418 2008-05-05 00:31 antispam-plugin.h
-rw-r--r-- 1 root root 13279 2008-05-05 00:31 antispam-storage-1.0.c
-rwxr-xr-x 1 root root 14026 2008-05-05 00:58 antispam-storage-1.1
-rw-r--r-- 1 root root 14308 2008-05-05 00:31 antispam-storage-1.1.c
-rw-r--r-- 1 root root 18101 2008-05-05 00:31 COPYING
-rw-r--r-- 1 root root  4351 2008-05-05 00:31 crm114-exec.c
-rw-r--r-- 1 root root   547 2008-05-05 00:31 debug.c
-rw-r--r-- 1 root root  1854 2008-05-05 00:31 defconfig
-rw-r--r-- 1 root root  5087 2008-05-05 00:31 dspam-exec.c
-rw-r--r-- 1 root root  7631 2008-05-05 00:31 mailtrain.c
-rw-r--r-- 1 root root  2244 2008-05-05 00:31 Makefile
-rw-r--r-- 1 root root   372 2008-05-05 00:31 NOTES
-rw-r--r-- 1 root root23 2008-05-05 00:31 README
-rw-r--r-- 1 root root  1855 2008-05-05 00:31 signature.c
-rw-r--r-- 1 root root   617 2008-05-05 00:31 signature.h
-rw-r--r-- 1 root root  3859 2008-05-05 00:31 signature-log.c
pdc-server:~/tmp/antispam# grep -v '^ *\(#.*\)\?$' .config
DOVECOT=/root/tmp/dovecot-1.1.rc5
DOVECOT_VERSION=1.1 # CURRENTLY BROKEN
BACKEND=dspam-exec
INSTALLDIR=/usr/lib/dovecot/modules/imap
USER=root
GROUP=root
PLUGINNAME=antispam
pdc-server:~/tmp/antispam# make install
cc  -o .o
cc: no input files
make: *** [.o] Error 1
pdc-server:~/tmp/antispam#


Thanks in advance.


Re: [Dovecot] Compiling plugins

2008-05-04 Thread Juan Asensio Sánchez
More info:

Changed BACKEND to mailtrain and DEBUG to stderr, getting this
(the same error, more info):

pdc-server:~/tmp/antispam# grep -v '^ *\(#.*\)\?$' .config
DOVECOT=/root/tmp/dovecot-1.1.rc5
DOVECOT_VERSION=1.1 # CURRENTLY BROKEN
BACKEND=mailtrain
INSTALLDIR=/usr/lib/dovecot/modules/imap
USER=root
GROUP=root
DEBUG=stderr
PLUGINNAME=antispam
pdc-server:~/tmp/antispam# make install
cc -c  -DHAVE_CONFIG_H -I/root/tmp/dovecot-1.1.rc5/
-I/root/tmp/dovecot-1.1.rc5/src/ -I/root/tmp/dovecot-1.1.rc5/src/lib/
-I/root/tmp/dovecot-1.1.rc5/src/lib-storage/
-I/root/tmp/dovecot-1.1.rc5/src/lib-mail/
-I/root/tmp/dovecot-1.1.rc5/src/lib-imap/
-I/root/tmp/dovecot-1.1.rc5/src/lib-dict/
-I/root/tmp/dovecot-1.1.rc5/src/lib-index/
-I/root/tmp/dovecot-1.1.rc5/src/imap/ -DCONFIG_DEBUG -DDEBUG_STDERR
-DCONFIG_DOVECOT_11 -Dmempool_unref(x)=pool_unref(x) -fPIC -shared
-Wall -Wextra -DPLUGINNAME=antispam -o debug.o debug.c
cc  -o .o
cc: no input files
make: *** [.o] Error 1
pdc-server:~/tmp/antispam#



2008/5/5 Juan Asensio Sánchez [EMAIL PROTECTED]:
 Hi

  I use Debian Etch 4.0r3. I am trying to compile antispam plugin, but i
  have no idea about how to do it cause i have never done so. I have
  compiled source packages for Debian with some instructions in some
  pages, but i can not compile this plugin separately. Can anyone help
  me or give some tips to do this (yes, i have google'd it yet, but no
  good results).

  This is the result trying to compile antispam plugin:

  
  pdc-server:~/tmp/antispam# ls -l ../dovecot-1.1.rc5/
  total 3508
  -rw-r--r--  1 root root  322488 2008-05-05 00:30 aclocal.m4
  -rw-r--r--  1 root root 551 2008-03-10 23:23 AUTHORS
  -rw-r--r--  1 root root 804 2008-05-05 01:01 autogen.sh
  -rw-r--r--  1 root root 1470323 2008-05-05 00:31 ChangeLog
  -rwxr-xr-x  1 root root3707 2008-03-10 23:23 compile
  -rwxr-xr-x  1 root root   44892 2008-02-17 21:10 config.guess
  -rw-r--r--  1 root root   14778 2008-05-05 00:31 config.h
  -rw-r--r--  1 root root   13687 2008-05-05 00:31 config.h.in
  -rwxr-xr-x  1 root root   18343 2008-05-04 12:13 config.rpath
  -rwxr-xr-x  1 root root   33387 2008-02-17 21:10 config.sub
  -rwxr-xr-x  1 root root 1086089 2008-05-05 00:30 configure
  -rw-r--r--  1 root root   56429 2008-05-05 00:30 configure.in
  -rw-r--r--  1 root root3980 2008-03-10 23:23 COPYING
  -rw-r--r--  1 root root   26536 2008-03-10 23:23 COPYING.LGPL
  -rw-r--r--  1 root root1023 2008-03-10 23:23 COPYING.MIT
  drwxr-xr-x  4 root root4096 2008-05-05 01:01 debian
  -rwxr-xr-x  1 root root   15936 2008-03-10 23:23 depcomp
  drwxrwxrwx  3 root root4096 2008-05-05 01:01 doc
  -rw-r--r--  1 root root 187 2008-03-10 23:23 dovecot-config.in.in
  -rw-r--r--  1 root root   46655 2008-05-05 00:30 dovecot-example.conf
  drwxr-xr-x  3 root root4096 2008-05-05 01:01 dovecot-managesieve
  drwxr-xr-x  3 root root4096 2008-05-05 01:01 dovecot-sieve
  -rw-r--r--  1 root root1235 2008-03-10 23:23 INSTALL
  -rwxr-xr-x  1 root root9233 2008-03-10 23:23 install-sh
  -rw-r--r--  1 root root  199984 2008-04-05 19:05 ltmain.sh
  -rw-r--r--  1 root root 656 2008-03-10 23:23 Makefile.am
  -rw-r--r--  1 root root   24492 2008-05-05 00:30 Makefile.in
  -rwxr-xr-x  1 root root   11014 2008-03-10 23:23 missing
  -rw-r--r--  1 root root   71910 2008-05-05 00:30 NEWS
  -rw-r--r--  1 root root1344 2008-03-16 10:58 README
  drwxrwxrwx 26 root root4096 2008-05-05 00:32 src
  -rw-r--r--  1 root root   0 2008-03-10 23:23 stamp.h.in
  -rw-r--r--  1 root root   14980 2008-05-05 00:30 TODO
  pdc-server:~/tmp/antispam# ls -l
  total 144
  -rw-r--r-- 1 root root  7359 2008-05-05 00:31 antispam.7
  -rw-r--r-- 1 root root  4864 2008-05-05 00:31 antispam-plugin.c
  -rw-r--r-- 1 root root  2418 2008-05-05 00:31 antispam-plugin.h
  -rw-r--r-- 1 root root 13279 2008-05-05 00:31 antispam-storage-1.0.c
  -rwxr-xr-x 1 root root 14026 2008-05-05 00:58 antispam-storage-1.1
  -rw-r--r-- 1 root root 14308 2008-05-05 00:31 antispam-storage-1.1.c
  -rw-r--r-- 1 root root 18101 2008-05-05 00:31 COPYING
  -rw-r--r-- 1 root root  4351 2008-05-05 00:31 crm114-exec.c
  -rw-r--r-- 1 root root   547 2008-05-05 00:31 debug.c
  -rw-r--r-- 1 root root  1854 2008-05-05 00:31 defconfig
  -rw-r--r-- 1 root root  5087 2008-05-05 00:31 dspam-exec.c
  -rw-r--r-- 1 root root  7631 2008-05-05 00:31 mailtrain.c
  -rw-r--r-- 1 root root  2244 2008-05-05 00:31 Makefile
  -rw-r--r-- 1 root root   372 2008-05-05 00:31 NOTES
  -rw-r--r-- 1 root root23 2008-05-05 00:31 README
  -rw-r--r-- 1 root root  1855 2008-05-05 00:31 signature.c
  -rw-r--r-- 1 root root   617 2008-05-05 00:31 signature.h
  -rw-r--r-- 1 root root  3859 2008-05-05 00:31 signature-log.c
  pdc-server:~/tmp/antispam# grep -v '^ *\(#.*\)\?$' .config
  DOVECOT=/root/tmp/dovecot-1.1.rc5
  DOVECOT_VERSION=1.1 # CURRENTLY BROKEN
  BACKEND=dspam-exec
  INSTALLDIR=/usr/lib/dovecot/modules

[Dovecot] Fatal: Running as root isn't permitted

2008-05-02 Thread Juan Asensio Sánchez
Hi

I am running Dovecot 1.1RC4, built from the source packages at the
debian repositories (http://xi.rename-it.nl/debian/). When a message
is delivered through the LDA, i get this error:

deliver([EMAIL PROTECTED]): May 02 14:43:28 Fatal: Running as root isn't 
permitted

These are my config files:

master.cf:

===
# Dovecot
dovecot unix - n n - - pipe
   flags=DRhu user=dovecot:mail argv=/usr/lib/dovecot/deliver -d $recipient
===

dovecot.conf

===
protocols = imap pop3
listen = 0.0.0.0
login_greeting = Servidor de correo para preparado.
disable_plaintext_auth = no
log_path = /var/log/dovecot.log
info_log_path = /var/log/dovecot-info.log
mail_uid = mailuser
mail_gid = mailgroup

# IMAP configuration
protocol imap {
mail_plugins = quota imap_quota
}

# POP3 configuration
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
mail_plugins = quota
}

# LDA configuration
protocol lda {
log_path = /var/log/dovecot-lda.log
postmaster_address = postmaster
auth_socket_path = /var/run/dovecot/auth-master
mail_plugins = quota cmusieve
global_script_path = /home/vmail/globalsievesrc
}


# LDAP authentication

auth default {

mechanisms = plain login

passdb ldap {
args = /etc/dovecot/dovecot-ldap.conf
}

userdb ldap {
args = /etc/dovecot/dovecot-ldap.conf
}
socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0660
user = dovecot
group = mail
}

client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
}
===

dovecot-ldap.conf

===
hosts = 127.0.0.1
auth_bind = yes
ldap_version = 3
base = dc=***,dc=local
scope = subtree
user_attrs = 
=home=/var/vmail/%d/%n,mailuserquota=quota=maildir:storage,=mail=maildir:/var/vmail/%d/%n/Maildir
user_filter = ((objectClass=mailAccount)(mail=%u)(mailenable=OK))
pass_attrs = mail=user,userPassword=password
pass_filter = ((objectClass=mailAccount)(mail=%u)(mailenable=OK))
default_pass_scheme = CRYPT
===

The folder /var/vmail has these permissions:

pdc-server:~# ls -la /var/vmail/
total 16
drwxrwx---  3 mailuser mailgroup 4096 2008-05-02 14:34 .
drwxr-xr-x 16 root root  4096 2008-05-02 14:14 ..

Any idea? Thanks in advance.


[Dovecot] Global and personal sieve scripts

2008-04-30 Thread Juan Asensio Sánchez
Hi

According to Dovecot documentation ():

  # If there is no user-specific Sieve-script, global Sieve script is
  # executed if set. (v1.0.1 and older used global_script_path)
  #sieve_global_path =

Then, if one user has its own script, the global script won't be
executed? I would like to execute first the global script (for moving
SPAM to the Junk folder), and then the user scripts is they exists.
Any idea?

Thanks in advance.


[Dovecot] Run command when moving messages

2008-04-20 Thread Juan Asensio Sánchez
Hi

Is it possible to run a command when a message is moved from a folder
to another? I want this to simulate the antispam plugin, so one script
would be ran when a message is moved to/from the spam folder, so the
sa-learn command would be called.

Thanks