[Dovecot] can not compile 1.1.5 with BDB

2008-10-25 Thread LÉVAI Dániel
Hi!

I'm trying to use dovecot-1.1.5 with Berkley DB 4.6.21 on OpenBSD.
While compiling I get this:

gcc -DHAVE_CONFIG_H -I. -I../..  -I../../src/lib  -I../../src/lib-sql  \
-DPKG_RUNDIR=\""/var/run/dovecot"\"-I/usr/local/include  -std=gnu99\
-g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations \
-Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast \
-fstack-protector -MT dict-db.o -MD -MP -MF .deps/dict-db.Tpo -c -o \
dict-db.o dict-db.c
dict-db.c:15: error: syntax error before "DB_ENV"
dict-db.c:24: error: syntax error before "DBC"
dict-db.c:39: error: syntax error before numeric constant
dict-db.c: In function `db_dict_init':
dict-db.c:69: error: `tid' undeclared (first use in this function)
dict-db.c:69: error: (Each undeclared identifier is reported only once
dict-db.c:69: error: for each function it appears in.)
dict-db.c:79: warning: implicit declaration of function `db_env_create'
dict-db.c:79: error: structure has no member named `db_env'
dict-db.c:81: warning: implicit declaration of function `db_strerror'
dict-db.c:81: warning: format argument is not a pointer (arg 2)
dict-db.c:86: error: structure has no member named `db_env'
dict-db.c:86: error: structure has no member named `db_env'
dict-db.c:86: error: `stderr' undeclared (first use in this function)
dict-db.c:87: error: structure has no member named `db_env'
dict-db.c:87: error: structure has no member named `db_env'
dict-db.c:93: error: structure has no member named `db_env'
dict-db.c:93: error: structure has no member named `db_env'
dict-db.c:93: error: `DB_CREATE' undeclared (first use in this function)
dict-db.c:94: error: `DB_INIT_MPOOL' undeclared (first use in this 
function)
dict-db.c:94: error: `DB_INIT_TXN' undeclared (first use in this 
function)
dict-db.c:100: error: structure has no member named `db_env'
dict-db.c:100: error: structure has no member named `db_env'
dict-db.c:107: warning: implicit declaration of function `db_create'
dict-db.c:107: error: structure has no member named `db_env'
dict-db.c:109: warning: format argument is not a pointer (arg 2)
dict-db.c:113: error: structure has no member named `set_errfile'
dict-db.c:114: error: structure has no member named `set_errpfx'
dict-db.c:116: error: structure has no member named `db_env'
dict-db.c:118: warning: format argument is not a pointer (arg 2)
dict-db.c:122: error: structure has no member named `set_errfile'
dict-db.c:123: error: structure has no member named `set_errpfx'
dict-db.c:125: error: structure has no member named `open'
dict-db.c:131: error: structure has no member named `set_flags'
dict-db.c:131: error: `DB_DUP' undeclared (first use in this function)
dict-db.c:141: error: structure has no member named `set_bt_compare'
dict-db.c:148: error: structure has no member named `open'
dict-db.c:154: error: structure has no member named `associate'
dict-db.c: In function `db_dict_deinit':
dict-db.c:168: error: too many arguments to function
dict-db.c:170: error: too many arguments to function
dict-db.c: In function `db_dict_iterate_set':
dict-db.c:180: error: `DB_NOTFOUND' undeclared (first use in this 
function)
dict-db.c: In function `db_dict_lookup':
dict-db.c:218: warning: passing arg 4 of pointer to function makes 
integer from pointer without a cast
dict-db.c:218: error: too many arguments to function
dict-db.c:219: error: `DB_NOTFOUND' undeclared (first use in this 
function)
dict-db.c: In function `db_dict_iterate_next':
dict-db.c:250: error: structure has no member named `cursor'
dict-db.c:250: error: structure has no member named `cursor'
dict-db.c:252: error: `DB_NEXT' undeclared (first use in this function)
dict-db.c:262: error: structure has no member named `cursor'
dict-db.c:262: error: structure has no member named `cursor'
dict-db.c: In function `db_dict_iterate_first':
dict-db.c:285: error: structure has no member named `cursor'
dict-db.c:285: error: structure has no member named `cursor'
dict-db.c:287: error: structure has no member named `cursor'
dict-db.c:287: error: structure has no member named `cursor'
dict-db.c:292: error: structure has no member named `cursor'
dict-db.c:292: error: structure has no member named `cursor'
dict-db.c:293: error: `DB_SET_RANGE' undeclared (first use in this 
function)
dict-db.c: In function `db_dict_iterate_init':
dict-db.c:311: error: structure has no member named `cursor'
dict-db.c: In function `db_dict_iterate_deinit':
dict-db.c:335: error: structure has no member named `cursor'
dict-db.c:335: error: structure has no member named `cursor'
dict-db.c: In function `db_dict_transaction_init':
dict-db.c:349: error: structure has no member named `db_env'
dict-db.c:349: error: structure has no member named `db_env'
dict-db.c:349: error: structure has no member named `tid'
dict-db.c: In function `db_dict_transaction_commit':
dict-db.c:360: error: structure has no member named `tid'
dict-db.c:360: error: structure has no member named `tid'
dict-db.c: In function `db_dict_transaction_rollback'

Re: [Dovecot] dovecot:mail storage creation failed with mail location:mbox:/HOME_DIRECTORY_USED_BUT_NOT_GIVEN_USERDB/mail:INBOX=/var/spool/mail/[EMAIL PROTECTED]

2008-10-25 Thread Timo Sirainen
On Fri, 2008-10-24 at 20:33 +, wafa hjiri wrote:
> Hello
> I am working in a project and during my work an error has appeared in the use 
> of the dovecot e mail server
> Squirrelmail an error occured:ERROR:Connection dropped by IMAP server
> and in the log mail we find:
> mail
> storage creation failed with mail
> location:mbox:/HOME_DIRECTORY_USED_BUT_NOT_GIVEN_USERDB/mail:INBOX=/var/spool/mail/[EMAIL
>  PROTECTED]
> child 5757(imap) returned error 89

Post your dovecot -n output.

Anyway the problem is that you're using home directory in mail_location
and your userdb doesn't have any home directories.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] FTS index generation

2008-10-25 Thread Timo Sirainen
On Fri, 2008-10-24 at 20:09 -0400, Dave McGuire wrote:
> Hi folks.  I'm experimenting with the Squat plugin.  I can execute  
> search commands via direct interaction with IMAP, but I never see the  
> expected dovecot.index.search index file appear in the spool.  I'm  
> concerned that I've misconfigured something that is preventing the  
> creation of those indices.  Is there a facility to have the squat  
> plugin generate debugging messages so I can see what it's doing?

1. Set mail_debug=yes. It should log about loading fts and fts_squat
plugins.

2. Do you have fts=squat set in plugin section?


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] can not compile 1.1.5 with BDB

2008-10-25 Thread Timo Sirainen
On Sat, 2008-10-25 at 09:22 +0200, LÉVAI Dániel wrote:
> Hi!
> 
> I'm trying to use dovecot-1.1.5 with Berkley DB 4.6.21 on OpenBSD.

It compiles fine on Debian with bdb 4.7.25.2, but I think it should work
fine with older versions too.

> While compiling I get this:
> 
> gcc -DHAVE_CONFIG_H -I. -I../..  -I../../src/lib  -I../../src/lib-sql  \
> -DPKG_RUNDIR=\""/var/run/dovecot"\"-I/usr/local/include  -std=gnu99\
> -g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations \
> -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast \
> -fstack-protector -MT dict-db.o -MD -MP -MF .deps/dict-db.Tpo -c -o \
> dict-db.o dict-db.c
> dict-db.c:15: error: syntax error before "DB_ENV"

My guess is that #include  includes wrong file. Try to find out
the correct file and try putting the full path there. I don't have
OpenBSD installed so I can't really test this myself.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] can not compile 1.1.5 with BDB

2008-10-25 Thread LÉVAI Dániel
On Saturday 25 October 2008 14.59.00 Timo Sirainen wrote:
> On Sat, 2008-10-25 at 09:22 +0200, LÉVAI Dániel wrote:
> > Hi!
> >
> > I'm trying to use dovecot-1.1.5 with Berkley DB 4.6.21 on OpenBSD.
>
> It compiles fine on Debian with bdb 4.7.25.2, but I think it should
> work fine with older versions too.
>
> > While compiling I get this:
> >
> > gcc -DHAVE_CONFIG_H -I. -I../..  -I../../src/lib 
> > -I../../src/lib-sql  \ -DPKG_RUNDIR=\""/var/run/dovecot"\"   
> > -I/usr/local/include  -std=gnu99\ -g -O2 -Wall -W
> > -Wmissing-prototypes -Wmissing-declarations \ -Wpointer-arith
> > -Wchar-subscripts -Wformat=2 -Wbad-function-cast \
> > -fstack-protector -MT dict-db.o -MD -MP -MF .deps/dict-db.Tpo -c -o
> > \ dict-db.o dict-db.c
> > dict-db.c:15: error: syntax error before "DB_ENV"
>
> My guess is that #include  includes wrong file. Try to find out
> the correct file and try putting the full path there. I don't have
> OpenBSD installed so I can't really test this myself.

That is correct. I had to include another directory in CPPFLAGS:
CPPFLAGS+="-I/usr/local/include/db4"

Great and fast assistance, as usual! :)

Thank you very much!

Daniel

-- 
LEVAI Daniel
PGP key ID = 0x4AC0A4B1
Key fingerprint = D037 03B9 C12D D338 4412  2D83 1373 917A 4AC0 A4B1


Re: [Dovecot] SIGBART/SIGSEGV while SELECTing virtual folder

2008-10-25 Thread Timo Sirainen
On Mon, 2008-10-20 at 15:37 +0200, Lars Noschinski wrote:
> (gdb) bt full
> #0  mailbox_search_result_free (_result=0x8efc0d0)
>  at mailbox-search-result.c:65
>  result = (struct mail_search_result *) 0x0
>  i = 
>  __PRETTY_FUNCTION__ = "mailbox_search_result_free"
> #1  0xb7f4e12e in virtual_storage_mailbox_close (box=0x8efbeb0)
>  at virtual-storage.c:311
>  i = 0
>  ret = 0

I couldn't reproduce this, but this should fix it anyway: 
http://hg.dovecot.org/dovecot-1.2/rev/0738739a8152

> #5  0x080c86b8 in view_lookup_seq_range (view=0x9956648, first_uid=1, 
>  last_uid=0, first_seq_r=0xbfdce294, last_seq_r=0xbfdce290)
>  at mail-index-view.c:265
> #6  0x080c815c in mail_index_lookup_seq_range (view=0x9956648, first_uid=1, 
>  last_uid=0, first_seq_r=0xbfdce294, last_seq_r=0xbfdce290)
>  at mail-index-view.c:530
> #7  0xb7fa64d6 in virtual_sync_backend_boxes (ctx=0x9e2e3e0)
>  at virtual-sync.c:561

Fixed: ttp://hg.dovecot.org/dovecot-1.2/rev/ba6ec21af651

> #5  0x080c86b8 in view_lookup_seq_range (view=0x8eb77e0, first_uid=1, 
>  last_uid=0, first_seq_r=0xbfc58124, last_seq_r=0xbfc58120)
>  at mail-index-view.c:265
>  __PRETTY_FUNCTION__ = "view_lookup_seq_range"
> #6  0x080c815c in mail_index_lookup_seq_range (view=0x8eb77e0, first_uid=1, 
>  last_uid=0, first_seq_r=0xbfc58124, last_seq_r=0xbfc58120)
>  at mail-index-view.c:530
> No locals.
> #7  0xb7f324d6 in virtual_sync_backend_boxes (ctx=0x90f8eb8)
>  at virtual-sync.c:561
>  i = 10

Same as above.

> On an unrelated note, given the above configuration file, using a
> dovecot-virtual file like
> 
> | mbox/*
> |all
> 
> causes dovecot to complain:
> 
> Oct 20 13:56:59 vertikal EXT(lars): : Connection closed bytes=22/350
> Oct 20 13:57:03 vertikal EXT(lars): : 
> /home/lars/Mailbox/virtual/test/dovecot-virtual: No mailboxes defined

Fixed: http://hg.dovecot.org/dovecot-1.2/rev/3f6fa7862843


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] SIGBART/SIGSEGV while SELECTing virtual folder

2008-10-25 Thread Lars Noschinski

Hello Timo,

thanks for your swift response!

* Timo Sirainen <[EMAIL PROTECTED]> [08-10-25 20:22]:
I couldn't reproduce this, but this should fix it anyway: 
http://hg.dovecot.org/dovecot-1.2/rev/0738739a8152

[...]

Fixed: ttp://hg.dovecot.org/dovecot-1.2/rev/ba6ec21af651


Thanks! I was just looking at the repository, while you were committing
these fixes ;) But these fixes uncovered another bug. I can SELECT now,
but FETCH fails:


% ./sbin/dovecot --exec-mail ext /usr/bin/gdb ./libexec/dovecot/imap
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) run
Starting program: /tmp/dd/libexec/dovecot/imap 
* PREAUTH [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT THREAD=REFERENCES MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH SEARCHRES WITHIN CONTEXT=SEARCH] Logged in as lars

. SELECT virtual/all
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft Old)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft Old \*)] Flags 
permitted.
* 74142 EXISTS
* 0 RECENT
* OK [UNSEEN 10841] First unseen.
* OK [UIDVALIDITY 1224958382] UIDs valid
* OK [UIDNEXT 74143] Predicted next UID
* OK [HIGHESTMODSEQ 1]
. OK [READ-WRITE] Select completed.
a0060 FETCH 1:74142 (UID FLAGS INTERNALDATE RFC822.SIZE BODY.PEEK[HEADER.FIELDS 
(DATE FROM SUBJECT TO CC MESSAGE-ID REFERENCES CONTENT-TYPE CONTENT-DESCRIPTION 
IN-REPLY-TO REPLY-TO LINES LIST-POST X-LABEL)])

Program received signal SIGABRT, Aborted.
0xb7ed8556 in raise () from /lib/libc.so.6
(gdb) bt full
#0  0xb7ed8556 in raise () from /lib/libc.so.6
No symbol table info available.
#1  0xb7ed9d78 in abort () from /lib/libc.so.6
No symbol table info available.
#2  0x080eade5 in default_fatal_finish (type=, status=0) 
at failures.c:150
backtrace = 0x99356c0 "/tmp/dd/libexec/dovecot/imap [0x80eadd1] -> 
/tmp/dd/libexec/dovecot/imap(i_syslog_fatal_handler+0x34) [0x80eaea4] -> 
/tmp/dd/libexec/dovecot/imap [0x80ea7e9] -> /tmp/dd/libexec/dovecot/imap [0x80d5e93"...
#3  0x080eaea4 in i_syslog_fatal_handler (type=LOG_TYPE_PANIC, status=0, 
fmt=0x80fff0c "file %s: line %d (%s): assertion failed: (%s)", args=0xbfa23ef4 "g�020\bP") at failures.c:308

No locals.
#4  0x080ea7e9 in i_panic (format=0x80fff0c "file %s: line %d (%s): assertion 
failed: (%s)") at failures.c:197
No locals.
#5  0x080d5e93 in mail_cache_decision_state_update (view=0x9bc5ff0, seq=9, 
field=12) at mail-cache-decisions.c:80
cache = (struct mail_cache *) 0x9c5f750
hdr = 
uid = 
__PRETTY_FUNCTION__ = "mail_cache_decision_state_update"
#6  0x080b6f47 in mail_cache_lookup_headers (view=0x9bc5ff0, dest=0xa024320, seq=9, field_idxs=0x9fee430, 
fields_count=14) at mail-cache-lookup.c:479

_data_stack_cur_id = 5
ret = 
#7  0x080a1bd1 in index_mail_get_header_stream (_mail=0x9f85ff0, 
_headers=0x9fee418, stream_r=0x99417cc)
at index-mail-headers.c:740
input = (struct istream *) 0x1
dest = (string_t *) 0xa024320
#8  0xb7ff9a71 in virtual_mail_get_header_stream (mail=0xa029540, 
headers=0x9fee418, stream_r=0x99417cc)
at virtual-mail.c:209
No locals.
#9  0x0806c6f1 in fetch_body_header_fields (ctx=0x9941778, mail=0x6, 
body=0x9941a98) at imap-fetch-body.c:451
size = {physical_size = 578317383981219944, virtual_size = 167833648, 
lines = 89}
old_offset = 
#10 0x08069c55 in imap_fetch_more (ctx=0x9941778) at imap-fetch.c:479
ret = 
__PRETTY_FUNCTION__ = "imap_fetch_more"
#11 0x080611b3 in cmd_fetch (cmd=0x9941730) at cmd-fetch.c:218
client = (struct client *) 0x99414b0
ctx = (struct imap_fetch_context *) 0x9941778
args = (const struct imap_arg *) 0x99467b0
search_args = (struct mail_search_args *) 0xa04e7f8
messageset = 
ret = 
#12 0x0806758c in client_command_input (cmd=0x9941730) at client.c:592
client = (struct client *) 0x99414b0
command = 
__PRETTY_FUNCTION__ = "client_command_input"
#13 0x08067629 in client_command_input (cmd=0x9941730) at client.c:641
client = (struct client *) 0x99414b0
command = 
__PRETTY_FUNCTION__ = "client_command_input"
#14 0x08067c2d in client_handle_input (client=0x99414b0) at client.c:682
_data_stack_cur_id = 3
ret = 
remove_io = 
handled_commands = false
#15 0x080680e3 in client_input (client=0x99414b0) at client.c:737
cmd = 
output = (struct ostream *) 0x994165c
bytes = 
__PRETTY_FUNCTION__ = "client_input"
#16 0x080f32d0 in io_loop_handler_run (ioloop=

Re: [Dovecot] Released v1.1.5 and v1.2.alpha3 (managesieve updated)

2008-10-25 Thread Stephan Bosch

Timo Sirainen schreef:

http://dovecot.org/releases/1.1/dovecot-1.1.5.tar.gz
http://dovecot.org/releases/1.1/dovecot-1.1.5.tar.gz.sig

http://dovecot.org/releases/1.2/alpha/dovecot-1.2.alpha3.tar.gz
http://dovecot.org/releases/1.2/alpha/dovecot-1.2.alpha3.tar.gz.sig

A combined release announcement for a change. :)
Oops, almost forgot about the new v1.1 release in all the fuzz around 
getting the new Sieve implementation released for v1.2. Finally, I have 
refreshed the ManageSieve patch for Dovecot 1.1.5:


http://www.rename-it.nl/dovecot/1.1/dovecot-1.1.5-managesieve-0.10.3.diff.gz
http://www.rename-it.nl/dovecot/1.1/dovecot-1.1.5-managesieve-0.10.3.diff.gz.sig

This also fixes a warning previously caused by this patch.

Regards,

--
Stephan Bosch
[EMAIL PROTECTED]



[Dovecot] ManageSieve, was Re: Released v1.1.5 and v1.2.alpha3 (managesieve updated)

2008-10-25 Thread Dave McGuire

On Oct 25, 2008, at 3:32 PM, Stephan Bosch wrote:
Oops, almost forgot about the new v1.1 release in all the fuzz  
around getting the new Sieve implementation released for v1.2.  
Finally, I have refreshed the ManageSieve patch for Dovecot 1.1.5:


http://www.rename-it.nl/dovecot/1.1/dovecot-1.1.5- 
managesieve-0.10.3.diff.gz
http://www.rename-it.nl/dovecot/1.1/dovecot-1.1.5- 
managesieve-0.10.3.diff.gz.sig


This also fixes a warning previously caused by this patch.


  About ManageSieve...What client software are people using with this?

-Dave

--
Dave McGuire
Port Charlotte, FL




Re: [Dovecot] FTS index generation

2008-10-25 Thread Dave McGuire

On Oct 25, 2008, at 8:47 AM, Timo Sirainen wrote:

Hi folks.  I'm experimenting with the Squat plugin.  I can execute
search commands via direct interaction with IMAP, but I never see the
expected dovecot.index.search index file appear in the spool.  I'm
concerned that I've misconfigured something that is preventing the
creation of those indices.  Is there a facility to have the squat
plugin generate debugging messages so I can see what it's doing?


1. Set mail_debug=yes. It should log about loading fts and fts_squat
plugins.


  That's exactly what I was looking for, thank you!  I will do that  
either tonight or tomorrow.



2. Do you have fts=squat set in plugin section?


  Yes I do.

  And while I'm typing...Thank you SO MUCH for Dovecot!  You have,  
quite literally, significantly advanced the state of the art in email  
handling.  This is Good Stuff.


Thanks,
-Dave

--
Dave McGuire
Port Charlotte, FL




Re: [Dovecot] ManageSieve, was Re: Released v1.1.5 and v1.2.alpha3 (managesieve updated)

2008-10-25 Thread Stephan Bosch

Dave McGuire wrote:

  About ManageSieve...What client software are people using with this?


That varies. I personally use the Thunderbird Sieve add-on, which after 
version 0.1.5 works pretty well. Most other people I know use the 
AvelSieve module for Squirrelmail or Ingo with Horde. From what I am 
told, KMail now also properly supports ManageSieve. For command line 
support there are the sieve-connect client and a Ruby implementation.


There are probably more, but I do not know whether these are used/usable 
with Dovecot. Maybe http://www.sieve.info lists more possibilities. 
Because that is a wiki, you can add others if you encounter more useful 
clients.


Regards,

--
Stephan Bosch
[EMAIL PROTECTED]




Re: [Dovecot] SIGBART/SIGSEGV while SELECTing virtual folder

2008-10-25 Thread Timo Sirainen
On Sat, 2008-10-25 at 20:38 +0200, Lars Noschinski wrote:

> Thanks! I was just looking at the repository, while you were committing
> these fixes ;) But these fixes uncovered another bug. I can SELECT now,
> but FETCH fails:

Fixed.

> Thanks. This works now, with a minor glitch. The directory backing the
> "mbox" namespace looks like this:
> 
>  Archiv/list1
>  Archiv/list2
>  foo1
>  foo2
> 
> As "Archiv" is a directory, it is not selectable (of course). Using the
> above dovecot-virtual file, I get "NO Mailbox isn't selectable: Archiv"
> if I try to select the virtual mbox.

Fixed.

> This message does not occur, if use "*" instead of "mbox/*" as mailbox
> pattern.

Yes, because "*" matches only your maildirs and you don't have
non-selectable maildirs. I added a note about this
one-namespace-only-per-wildcard to
http://wiki.dovecot.org/Plugins/Virtual



signature.asc
Description: This is a digitally signed message part


[Dovecot] Dovecot read only for users

2008-10-25 Thread JC
All,

I have hopefully a base question.  How do you give users only read access to 
their inbox and folders?  If I use chmod 600 they have full access.  If I do a 
400 they have read access but cannot access their inbox.  
The config file is the out of the box config other than advertising IMAP and 
IMAPS.

Any help will be appreciated.  Thanks.