Re: [Dovecot] The case of the disappearing INBOX's - upgrade to 1.1.1 from 1.0.7 and based on Email client type

2008-07-20 Thread Timo Sirainen
On Wed, 2008-07-16 at 09:59 -0700, Jack Stewart wrote:
 The interesting part is that after upgrading to 1.1.1, the INBOX would 
 disappear from Thunderbird after clicking on a different folder. 

Thanks. This should fix it:
http://hg.dovecot.org/dovecot-1.1/rev/c76aaa79156c

 namespace private {
separator = .
prefix = INBOX.
inbox = yes
hidden = no
list = yes
 }
 namespace private {
separator = .
prefix = Mail.
hidden = yes
list = no
 }

I'd rather change into a configuration where there is no namespace
prefix.



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


Re: [Dovecot] Need suggestion regarding index file and Quota settings.

2008-07-20 Thread Timo Sirainen
On Fri, 2008-07-18 at 15:11 +0800, Tim Chen wrote:
  internet  Layer 4 switch  mail server1  NFS storage
|   |
|--- mail server2 -|
 
 Both mail servers will share the same storage which contains users'
 home with Maildir inside. Dovecot will be installed on the mail servers
 serving pop3 and imap4 protocols.
 
 Since the layer 4 switch will direct connection to backend mail server
 in random(or some of its algorithm), users can not guarantee which mail
 server to use. 

Would be best if you at least could redirect users from the same IP to
the same server.

 My first question is which kind of INDEX settings should
 I apply?
 1) INDEX=MEMORY
 2) INDEX=/nfs/%u
 3) INDEX=/var/spool/%u

What OS do you use? What kind of IMAP clients are there going to be?
With webmail clients you'll definitely want to use index files. With
Outlook/TB type of clients it might not matter that much.

In any case be sure to use v1.1 and read http://wiki.dovecot.org/NFS

 Will INDEX stored on disk outperform INDEX stored in memory?

Yes, definitely, because it's only temporarily stored in memory.

 If INDEX stored on NFS storage, we can be sure the consistency of INDEX
 file,
 but what about the performance and locking problem?

If fcntl locking is buggy, you can fallback to dotlock files, although
their performance is worse.

 If INDEX stored on local disk, since users may connect to different mail
 servers
 every time. Will that impose the problem of inconsistency? What kind of
 syndrome
 will happen if the INDEX became inconsistent to real maildir content?

Dovecot just updates the index if it's out-of-date. Although I've heard
there have been some issues here with v1.0, but hopefully they're fixed
in v1.1.

 My second question is about quota. We use maildir as mail storage format.
 Our users
 were divided into 3-4 groups, each group of users with different quota size
 ranging
 from 100MB - 1G. To my best knowledge, dovecot's quota setting in config
 file
 supports only one global configuration. (We are not using db, we use only
 /etc/passwd).
 dovecot.conf
quota_rule = *:storage=10MB
 Since dovecot supports both fs and maildir++ quota, I would like to ask for
 your suggestion:
 
 1. Should I use system quota instead? How about the comparision of
 performance?
Is there any drawback/limitation using system quota?

See http://wiki.dovecot.org/Quota/FS

 2. Is there any settings of dovecot that could fullfil my situation?

How about generating a passwd-file from /etc/passwd and your own quota
configuration file, and then using:

userdb passwd-file {
  args = /etc/dovecot.passwd
}
userdb passwd {
}

The dovecot.passwd could contain only those users who have non-default
quota value. If user isn't found from there, it fallbacks to passwd.

 3. My thought is to modify dovecot.conf, comment out quota_rule =
 *:storage=10MB and leave
only the quota = maildir in the plugin { block. According to my
 experiment, dovecot
will read the maildirsize file under user's home. Then I have to set the
 maildirsize
file for every user individually! It seems to be a little crappy but
 works.

That'd work too.


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


Re: [Dovecot] Run script before delivery

2008-07-20 Thread Timo Sirainen
On Fri, 2008-07-18 at 12:09 +0200, Juan Asensio Sánchez wrote:
 Hi
 
 Is it possible to run one script before the real delivery of a
 message (with lda, or before the execution of the sieve scripts) but
 after the creation of necessary folders (Dovecot automatically creates
 the folders for virtual users)? I want to to this to manually create a
 fixed empty sieve script in each user home folder, so in the global
 sieve script include that personal script, because if personal script
 doesn't exists, global script is not executed, or am I wrong?

A plugin that hooks the deliver_mail function (like cmusieve plugin
does) would work.



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


Re: [Dovecot] BUG: messages created with permissions not respecting

2008-07-20 Thread Timo Sirainen
On Thu, 2008-07-17 at 14:59 +0200, martin f krafft wrote:
 also sprach Timo Sirainen [EMAIL PROTECTED] [2006.12.22.2225 +0100]:
  On 19.12.2006, at 11.45, Thomas Vander Stichele wrote:
   umask is set to 0007.  This should ensure directories and files get
   created with read/write permissions for both user and group.
 
  umask setting isn't really working that well, since sometimes files  
  are created with 0600 mode, sometimes 0660 and yet sometimes 0666..  
  I'll see if I can get this fixed before v1.0.
 
 Any news on this? deliver still forces the mode of files to 0600.

I was thinking about delaying this issue until shared mailboxes are
implemented.



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


Re: [Dovecot] Mails invisible (index corrupted?)

2008-07-20 Thread Timo Sirainen
On Wed, 2008-07-16 at 16:43 +0800, Patrick Nagel wrote:
 Hi,
 
 I got a complaint from a user today, that a few mails disappeared from her 
 Inbox, both when accessing via IMAP with Thunderbird and in the IMAP Webmail 
 client (RoundCube Webmail, caching deactivated).
 
 Searching (in Subject or From header) within the Inbox turned up the missing 
 messages though.

If they're found when searching via Dovecot, then Dovecot sees them..

 After checking all relevant client settings (filter rules etc.), restarting 
 Thunderbird multiple times, etc., I tried deleting her dovecot.index.cache 
 file, restarting Thunderbird again, but that didn't change anything.
 Only after deleting dovecot.index.*, everything went back to normal. I can't 
 find anything useful in the log.

dovecot.index.*? Does that mean dovecot.index.log* or also
dovecot.index? You did leave dovecot-uidlist alone anyway?

 Any hints on what could have caused this? Where to look? 

Looking at the actual IMAP traffic would/should have shown what the
problem was. For example using rawlog:
http://wiki.dovecot.org/Debugging/Rawlog

 I backed up 
 dovecot.index, dovecot.index.cache and dovecot.index.log before I deleted 
 them, but they probably contain sensitive information, so I won't post them 
 to the list.

Only dovecot.index.cache contains sensitive information. I could take a
look at dovecot.index and dovecot.index.log, but I doubt they show
anything useful.


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


Re: [Dovecot] configuration query

2008-07-20 Thread Timo Sirainen
On Wed, 2008-07-16 at 12:10 +1000, Michael Mounteney wrote:
 Hello, please excuse my asking a question about simple configuration rather 
 than something about a suspected bug or other detailed enquiry.
 
 I've set up dovecot (1.0.13, from http://www.blastwave.org) and when 
 Thunderbird connects to it, all is well and I see folders as expected.

You've probably configured a namespace prefix to it.

 When 
 MacOS X mail connects however, it sees my home directory on the dovecot 
 machine, not the mail directory.

Then you're serving home directory by default and you haven't set
namespace prefix to OSX Mail.

 This IMAP stuff is a bit involved but I thought namespaces would be the 
 answer 
 but it seems not.  That is, I have
 
 namespace private {
   location = /var/marchive/%u
   inbox = yes
 }
 
 but even this still allows Mac Mail to see the home directory.  What else 
 should I do to stop dovecot serving my home directory ?  

You don't have to define any namespaces. Just make sure mail_location
points to your mail directory. If it doesn't seem to help, set
mail_debug=yes and look at the logs to see what directory Dovecot is
really looking at.


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


Re: [Dovecot] Possible bug in v1.1.1

2008-07-20 Thread Timo Sirainen
On Mon, 2008-07-07 at 15:14 +0300, John Wood wrote:
 Greetings,
 
 I recently upgraded our server from Dovecot 1.0.14 to 1.1.1. I am building 
 using the FreeBSD ports system, so nothing is custom aside from the flags 
 set there.
 
 dovecot fell down a few days after the update with:
 
 pid 1823 (imap), uid 1000: exited on signal 11
 
 the mail log shows:
 
 Jul 4 14:36:07 hostname dovecot: IMAP(username): Corrupted index cache 
 file /home/username/mail/.imap/INBOX/dovecot.index.cache: Broken MIME 
 parts for mail UID 10462
 
 Jul 4 14:36:07 hostname dovecot: child 1823 (imap) killed with signal 11
 
 unfortunately I do not have a core. The closest thing I could find in the 
 Changelog is:

Can you still reproduce this crash? http://dovecot.org/bugreport.html
lists some things about how to get a core dump.

 Message that caused the crash: attached

I doubt the message itself had anything to do with it. Just deleting
dovecot.index.cache probably fixes the issue?

Anyway I just tried causing the Broken MIME parts error myself. I
couldn't get Dovecot to crash (and the problem got fixed automatically).


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


Re: [Dovecot] [Help] quota_rule with LDAP backend, dovecot-1.1.1

2008-07-20 Thread Timo Sirainen
On Fri, 2008-07-04 at 11:03 +0800, Zhang Huangbin wrote:
 8
 mailQuota: 10   # - 10M
 8

It's still 10 there.

 My dovecot-ldap.conf:
 
 8
 user_attrs = 
 homeDirectory=home,mailMessageStore=maildir:mail,mailQuota=quota_rule=*:bytes=%$
 8

Here you tell Dovecot to use quota_rule=*:bytes=10, i.e. 10 bytes.

 And my dovecot.conf:
 
 8
 plugin {
 quota = maildir
 
 # Quota rules.
 quota_rule = *:storage=10M
 }

The quota_rule here is completely ignored, because it's overridden by
the value from LDAP.

So what you want to do is:

homeDirectory=home,mailMessageStore=maildir:mail,mailQuota=quota_rule=*:bytes=%$M


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


Re: [Dovecot] Multiple auth client sockets

2008-07-20 Thread Timo Sirainen
On Mon, 2008-06-30 at 12:08 +0200, Ulrich Zehl wrote:
 I use two seperate Postfix instances as MSAs (so that different policies
 are simpler to configure), and both of them require Dovecot SASL support.
 
 Since Postfix' smtpd is chrooted (at least in the Debian package), the
 client socket needs to be somewhere under the instance's queue_directory.
 This means I need two different auth client socket paths.
 When I simply specify two client { ... } in dovecot.conf, the second
 takes precedence over the first.
 
 Besides using a second dovecot instance, which I'd like to avoid, what ways
 are there to run a second client socket?

Create multiple socket listen {} sections.



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


Re: [Dovecot] file mail-transaction-log-view.c: assertion failed (v1.0.12)

2008-07-20 Thread Timo Sirainen
On Mon, 2008-07-14 at 12:52 +0300, Uldis Pakuls wrote:
 Timo Sirainen wrote:
  On Thu, 2008-07-10 at 08:07 +0300, Uldis Pakuls wrote:

  Hi all.
 
  Looking at previous weeks logs I discovered strange errors: file 
  mail-transaction-log-view.c: assertion failed 
 
  dovecot v 1.0.12
  
 
  I don't think I'll bother trying to figure out v1.0 indexing problems
  anymore. I've done a lot of fixes and better error checking for v1.1.
  Maybe it'll show something more useful.
 
  I seems time to upgrade...
  dovecot: Jul 02 11:27:22 Error: IMAP([EMAIL PROTECTED]): Maildir 
  /srv/vmail/it4u.lv/neko/.Listservers.Tech.Dovecot sync: UID inserted in 
  the middle of mailbox (19203  19202, file = 
  1214987241.P26793Q0M308123.serv09,S=3912:2,)
  
  But there is something really wrong if these keep happening. What
  OS/filesystem do you use?
 SuSE Linux 10.3  64 bit. (2.5.22.17 kernel) and Reiserfs

Well, I've no idea. Can you easily break it using imaptest? 
http://imapwiki.org/ImapTest



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


Re: [Dovecot] IMAP Panic

2008-07-20 Thread Timo Sirainen
On Mon, 2008-07-14 at 10:10 -0300, Raphael Bittencourt S. Costa wrote:
 On Sat, 2008-07-12 at 02:05 +0300, Timo Sirainen wrote:
 
  On Fri, 2008-07-11 at 13:43 -0300, Raphael Bittencourt S. Costa wrote:
   Helo all,
   
   One of the users is havings problems when he tries to open .Sent folder.
   Only after I deleted dovecot-uidlist,  dovecot.index.cache
   and dovecot.index.log the user could open the folder. Any idea?
  
  Could you send me the dovecot.index and dovecot.index.log the next time
  it happens? It'll make fixing this a bit easier. Those files don't
  contain anything sensitive about messages, just flags and some internal
  metadata.
  
 
 I made a backup before deleting, all files are attached.

Thanks. I wish more people would anticipate that I want them for these
kinds of bugs. :)

The problem was anyway just the assert itself, fixed:
http://hg.dovecot.org/dovecot-1.1/rev/9f597600e1cf



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


Re: [Dovecot] 'include' feature in sieve 1.1.5

2008-07-20 Thread Timo Sirainen
On Sun, 2008-07-13 at 12:02 +0800, Zhang Huangbin wrote:
 Hi, all.
 
 I use dovecot-1.1.1 and dovecot-1.1.5 which built by atrpms, and i
 use 'include' command to include two/several personal sieve rule file,
 but if either of these personal sieve rule files is not exist,
 sieve_execute_bytecode failed.
 
 How can i make it just skip the non-exist personal sieve rule file,
 and continue to try to include next sieve rule file?

By modifying the sources .. The include Sieve spec requires that the
execution must fail if the included script doesn't exist.



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


Re: [Dovecot] How can i get original mail subject in sieve vacation?

2008-07-20 Thread Timo Sirainen
On Sun, 2008-07-13 at 03:41 +0800, Zhang Huangbin wrote:
 Hi, all.
 
 I want to mix some new words and original mail subject as vacation
 subject, how can i get original mail subject in sieve vacation?
 
 Original subject: Hello.
 Vacation subject: Auto-Reply msg: Hello.
   ^ New ^ ^Orig^

Yes, this would be a nice feature. But currently it's hard coded, so you
can't do it without modifying sources. Hopefully it is/will be
implemented in Stephan Bosch's Sieve rewrite:
http://hg.rename-it.nl/dovecot-libsieve/



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


Re: [Dovecot] file ioloop-iolist.c: line 25 (ioloop_iolist_add): assertion failed: (list-ios[idx] == NULL)

2008-07-20 Thread Timo Sirainen
On Thu, 2008-07-10 at 22:28 +0200, Dirk H wrote:
 Hi,
 
 I am using dovcot on a Fritz!Box (Linux fritz 2.6.19.2 #1 Fri Apr 18 
 16:00:34 CEST 2008 mips unknown)
 And after upgrading from 1.0.9 to 1.0.15 I am getting above assertion,
 when I do some action like moving or deleting on the IMAP mail box using 
 MailDir on ext2 fs.
 
 I use --with-ioloop=epoll and --with-mem-align=4 as build configuration.
 For dovecof configuration see below details.

Have you tried without the --with-mem-align=4 option? Could you get gdb
backtrace of these crashes? See http://dovecot.org/bugreport.html



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


Re: [Dovecot] A couple of dovecot issues I've noted recently...

2008-07-20 Thread Timo Sirainen
On Wed, 2008-07-09 at 17:09 -0700, Dan Price wrote:

   [327616] t_strconcat(str1 = 0x100e77f0
 tmp/compiler/venus/handoff/build20.2/CDROM/sol-x86/kits/j2sdk_1.4.2_08/patches/J2SE_Solaris_8_x86_Recommended/108994-44/SUNWcsr/.svn/prop-base,
  ...), line 335 in strfuncs.c
   [327617] mbox_list_next(ctx = 0x80f6348), line 273 in mbox-list.c

You don't have a separate mail directory, so users sometimes list their
entire home directory which can contain a huge directory tree, causing
out of memory?

 I wondered if anyone else has seen similar problems?  It seems
 like once we fall into i_internal_fatal_handler(), dovecot should really
 try hard to avoid further dynamic memory allocation, 

In other fatal handlers there was actually code to avoid infinitely
recursing, but looks like I forgot to add it to internal_handler().
Fixed: http://hg.dovecot.org/dovecot-1.0/rev/c311c66a2d1b

Also v1.1+ sets aside an out of memory buffer which is used when
logging the out of memory error.

 as heap corruption
 seems to make that a bit of a disaster.

What heap corruption?

 A final problem, and this one affects me personally, is that
 we see some errors like this:
 
 dovecot: Jul 09 11:52:10 Error: IMAP(dp): FETCH for mailbox mail/tmp-inbox 
 UID 92086 got too little data: 6054 vs 6057
 dovecot: Jul 09 11:52:10 Info: IMAP(dp): Disconnected: Disconnected
 
 This is frustrating because I wind up with poisonous messages in my
 inbox which cause dovecot to disconnect me when I try to read them.
 Across all of our users, we see this happen about 1000 times per month.

v1.1 fixes these automatically, although it still disconnects the first
time. Deleting dovecot.index.cache fixes this of course.

But as for why it happens in the first place, that's a bit difficult to
guess. Is the difference always 3 bytes? Anything else than Dovecot
modifying the mboxes?


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


Re: [Dovecot] wrong permission

2008-07-20 Thread Timo Sirainen
On Thu, 2008-06-26 at 11:02 +0200, Cor Bosman wrote:
 Im still finding a number of control directories that have the wrong
 permission:
 
 Jun 26 00:02:34 userimap13.xs4all.nl dovecot: IMAP(xxx): 
 file_dotlock_create(/var/spool/mail/dovecot-control/g/gl/xxx/INBOX/.Apple 
 Mail To Do/dovecot-uidlist) failed: Permission denied
 
 userimap1# ls -al /var/spool/mail/dovecot-control/g/gl/xxx/INBOX/.Apple Mail 
 To Do total 8
 drw---  2 xxx  user  4096 May 12 23:43 .
 drwx--  7 xxx  user  4096 May 12 23:43 ..

So the problem is it's 0600 instead of 0700?

 This folder was created May 12, well after us starting to use 1.1RC versions.
 I currently fixed a few hundred of these (out of millions of folders), and
 whats interesting is that a very large percentage of those (1/3th) is
 the folder Apple Mail To Do, created by Mail.App I think. Obviously that
 same folder is no where near 1/3th of our total folder number, so thats
 a bit strange.

Maybe because OS X users were upgrading to Leopard and its Mail.app
started creating these mailboxes?

 I really doubt this is some local setting issue, because then id see much
 more of those. Right now it's a tiny fraction of our total folder amount,
 which leads me to believe it's some weird edge case in the dovecot code.

Do you have dovecot-shared files anywhere? Have you specified umask
setting in dovecot.conf?


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


Re: [Dovecot] Problems with dovecot deliver.

2008-07-20 Thread Timo Sirainen
On Mon, 2008-06-16 at 18:59 +0400, Dpoke wrote:
 deliver(dpoke): Jun 16 18:34:16 Error: 
 open(/tmp/dovecot.deliver..1213626856.2732.ad657cfa5dccbc61) failed: 
 Permission denied

A bit late reply, but clearly the problem is this. Isn't your /tmp
directory world-writable or why can't deliver create a new file there?



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


Re: [Dovecot] dovecot-auth assertion failed

2008-07-20 Thread Timo Sirainen
On Mon, 2008-06-16 at 13:06 -0700, Eric wrote:
 Hello,
 
 I have been running some tests on a new Dovecot v1.0.13 server and have seen 
 the following message appear in the logs a few times. It appears to occur 
 when there are a lot of requests being sent to the LDAP servers from both 
 Dovecot and Sendmail (I am guessing about this, since I have also seen 
 Server busy messages regarding LDAP auth).
 
 dovecot: auth(default): file db-ldap.c: line 310 (ldap_conn_retry_requests): 
 assertion failed: (conn-connected)

I don't think I'll bother debugging rare v1.0 problems anymore. There
are pretty large changes in v1.1's LDAP code, so see if it's fixed
there.



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


Re: [Dovecot] FTS/squat search indexes built when?

2008-07-20 Thread Timo Sirainen
On Mon, 2008-07-14 at 08:07 -0400, Jay Levitt wrote:
 Timo Sirainen wrote:
  On Sat, 2008-06-14 at 07:56 -0400, Jay Levitt wrote:
  But what I'm not clear about: Does it then get updated on every delivery 
  by LDA?  Or does the index also need to get updated when I do a search, 
  assuming there's been at least one message delivered since the last search?
  
  Currently it gets updated only when searching. I wanted to have it
  updated immediately (optionally) while mails are being delivered, but
  never got around to implementing it.
 
 OK, some followups then:
 
 - Is the index rebuilt from scratch every time, or should updates be fairly 
 quick?

It's updated, not rebuilt.

   I just did a search on my inbox (about 10,000 messages), and I know 
 I've done a search there in the past month - yet it either took many, many 
 minutes, or it timed out.

Indexing 10k messages from scratch shouldn't take all that many seconds
with somewhat recent computers..

 - If I wrote a script to log in and search for something, and ran it every 
 night through cron, would that achieve daily indexing?

Yes.


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


Re: [Dovecot] 1.1.1, mbox_snarf and duplicate messages

2008-07-20 Thread Timo Sirainen
This should help: http://hg.dovecot.org/dovecot-1.1/rev/7374114ce7a8



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


Re: [Dovecot] AIX: mntctl implementation for NFS quota support

2008-07-20 Thread Timo Sirainen
On Sun, 2008-07-06 at 18:41 +0200, Ralf Becker wrote:
 Hi Timo,
 
 I've added support for a static mtab buffer.
 
 Unfortunately 256 Bytes are too small by far. In my case the required 
 space is about 3 KByte. To avoid unnecessary memory allocation the 
 static size is determined at configuration time by getting the current 
 buffer size and adding space for about 5 mountpoints more. In addition 
 'configure' now checks for sys/vmount.h

Committed with a few changes, could you try if it still works? :)
http://hg.dovecot.org/dovecot-1.1/rev/ecc57955b99d

 - Some small coding style changes to make it more consistent with rest
of Dovecot code
 - Handle mntctl() returning failure
 - Instead of just one mntctl() retry I added a while-loop. The required
allocation size can change if more mounts are added, right? So there's
otherwise a small race condition between the size checking and the
actual allocation that could cause an unwanted failure. And I think it's
pretty safe to assume that the kernel won't return values that will
cause infinite looping. :)



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


Re: [Dovecot] Errors in logfile after upgrading to 1.1.1?

2008-07-20 Thread Timo Sirainen
On Sat, 2008-07-19 at 23:31 +0200, Bjørn T Johansen wrote:
 Not sure but I mean I didn't have these in the log file before the 
 upgrade:
 
 auth(default): passwd([EMAIL PROTECTED]): unknown user
 auth(default): prefetch([EMAIL PROTECTED]): passdb didn't return userdb 
 entries, trying the next userdb

Post your dovecot -n output.



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


Re: [Dovecot] Expire plugin with Mysql

2008-07-20 Thread Timo Sirainen
On Tue, 2008-07-08 at 15:07 +0800, Dino Ming wrote:
 Hi Timo,
 
 I had setup the expire plugin using proxy dict method with mysql table.
 
 Whenever I run the command : dovecot --exec-mail ext
 /usr/local/libexec/dovecot/expire-tool , I saw dovecot query the table :
 Query   SELECT path, timestamp  FROM dict_expire  ORDER BY timestamp
 
 But then, nothing happened at all. No mails being expunge from the mailbox
 Trash folder. Also, What is the purpose for the table to store username,
 path  timestamp ? Because the table is empty and no data populated.

If there are no rows in the table, then that's the reason expire-tool
doesn't do anything. IMAP should insert rows into the table when you're
copying messages to Trash.

   expire: Trash 1 Trash/* 1

I guess by Trash/* you're thinking about mailboxes thare are renamed
there by Thunderbird? That won't work currently..



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


Re: [Dovecot] No log for hitting login_max_processes_count?

2008-07-20 Thread Timo Sirainen
On Mon, 2008-06-30 at 11:49 -0400, Adam McDougall wrote:
 I think today just due to increased use, my mail servers hit 
 login_max_processes_count.  It wasn't obvious what was happening, logins 
 just weren't acting like they should and sometimes would get 
 disconnected before given a prompt from the server.  Something made me 
 think to check if I had too many of certain dovecot processes and I 
 found I had 128 imap-login processes on both servers, but nothing in the 
 logs seemed to point that out for me.  Should there be?  It would have 
 been alot easier to debug.  Also, this seems to be from general use, 
 doesn't seem like a DoS, so is this just a setting I should keep an eye 
 on and increase it by reasonable amounts as needed?  Thanks.

That should probably redesigned at some point.. The setting should
probably only control how many processes there should be with users that
haven't logged in, so (SSL) proxying processes shouldn't be counted.. Or
perhaps a different setting should limit them.

And you're right that it doesn't currently log anything if all of the
processes are in use. Hmm. This is a bit difficult to solve currently. I
think I'll just leave it for the master rewrite, which should make it
easier. :)

Anyway setting login_process_per_connection=no would make it work better
and probably also log something if limits are reached.
http://wiki.dovecot.org/LoginProcess


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


Re: [Dovecot] group ownership of new shared folders

2008-07-20 Thread Timo Sirainen
On Thu, 2008-06-26 at 02:56 +0100, Simon Michelson wrote:
 Between versions 1.0.4 and 1.0.5 there were some changes to the
 way dovecot-shared group ownership is propogated into new maildirs.
 Changing the group of new_dir/{tmp,new,cur} was added, but
 changing the group of new_dir itself was removed.  As far as I
 can tell, this latter change may have been accidental.
 
 This patch puts the functionality back, in the 1.1 tree.

Thanks, committed to v1.[012] trees. I couldn't use the changeset
directly though because tabs had been changed to spaces and import
failed.



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


Re: [Dovecot] exim, LDA, quota

2008-07-20 Thread Timo Sirainen
On Wed, 2008-06-25 at 04:16 +0200, Marcin Gryszkalis wrote:
 Hi
 I configured Exim with dovecot LDA and added quota (dict/mysql).
 It works but it seems that dovecot is not reporting situation back to exim 
 process - it looks like Exim returns OK(accepted) to smtp sender before the 
 message is actually delivered - if the quota is exceeded then LDA drops the 
 mail and sends DSN. 
 
 Is it possible to change that behavior to report problem immediately (within 
 SMTP session)?

Use deliver -e. See http://wiki.dovecot.org/LDA



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


Re: [Dovecot] plus addressing bug in dovecot 1.1.x?

2008-07-20 Thread Timo Sirainen
On Tue, 2008-06-24 at 13:19 -0700, Andrew Roberts wrote:
 On Mon, 23 Jun 2008, Timo Sirainen wrote:
 
  The difference is that nowadays deliver supports namespaces. How have
  you configured them? For example if you have INBOX/ prefix for all your
  private mailboxes, you'd have to save the mail to INBOX/spam, not spam.
 
 That's funny.  I had figured that deliver 1.1 didn't fully support 
 namespaces since I couldn't get it to work.  Silly me.
 
 On our setup, postfix pipes to deliver -d [EMAIL PROTECTED] -n -m 
 ${extension} and this works as expected so long as the mailbox is in the 
 private namespace.  If we try [EMAIL PROTECTED], deliver logs save 
 failed to shared.test: Mailbox doesn't exist: test and saved mail to 
 INBOX.  Is there something that should be changed with the config below 
 to get deliver to deliver to other namespaces?

Set mail_debug=yes and see what it logs. Does it show that deliver reads
all the namespaces correctly?

  Now, how to do this automatically?
 
 As for the original question about 1.0  1.1 transition for configs with 
 non-empty prefixes for their inbox namespaces:  Why not have deliver 
 prepend the prefix of the inbox namespace to the extension when the 
 extension does not contain any separator characters?
 
 This would preserve the old 1.0 behavior without changing anything when 
 the namespace is specified as part of the extension.

That's kind of a partial solution since it doesn't fix if there are
subfolders. Also this kind of a behavior change feels like it could
break things and cause all kinds of unwanted behavior..



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


Re: [Dovecot] assertion failed: (seq = t-first_new_seq seq = t-last_new_seq)

2008-07-20 Thread Timo Sirainen
On Thu, 2008-07-03 at 15:42 +0100, Mark Zealey wrote:
 OK I've been struggling to get dumps from the live environment most of
 the day, but have given up. I've now managed to reproduce this using a
 fork-bomb type script; here is a backtrace (no debug version installed,
 but I suspect I could reproduce this in the dev environment if it's not
 clear what the error is).

The backtrace was somewhat broken, but I think I figured out the problem
(although I couldn't reproduce it). See if this fixes:
http://hg.dovecot.org/dovecot-1.1/rev/65d1fc48224d



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


Re: [Dovecot] v1.1.rc13 released

2008-07-20 Thread Timo Sirainen
On Fri, 2008-06-20 at 13:11 +0100, Chris Wakelin wrote:

 Hmm, I get two extra compile warnings compared to 1.1.rc12:
 
  mail-cache-fields.c: In function `mail_cache_header_fields_update':
  mail-cache-fields.c:485: warning: passing arg 2 of `mail_cache_lock' makes 
  integer from pointer without a cast
 
  test-lib.c: In function `test_array':
  test-lib.c:21: warning: this decimal constant is unsigned only in ISO C90
 
 Solaris 8 sparc/gcc 3.3.2 as usual :)
 
 Anything to worry about?

Nope. But fixed now.



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


Re: [Dovecot] v1.1.1: Some files not created with dovecot-shared permissions

2008-07-20 Thread Timo Sirainen
On Tue, 2008-06-24 at 17:20 -0300, Eduardo M KALINOWSKI wrote:
 Hi,
 
 I use dovecot-shared to add read permissions to the group in my mail 
 server, which uses virtual users. This is only to ease backups.
 
 However, a few files are not created with the permissions in 
 dovecot-shared. I've seen this happen to 'subscriptions', 
 'maildirfolder' (when dovecot-shared exists; the change to correctly 
 create maildirfolder in this case is very recent), and possibly 
 'maildirsize' (I'm not sure about this one, it might be exim that is 
 creating it with wrong permissions.)

Fixed for maildirfolder creation:
http://hg.dovecot.org/dovecot-1.1/rev/70523f420d35

As for subscriptions and maildirsize .. well, those are more difficult
and I'm not sure if I should do such a change for v1.1.x releases
anymore since it would change the behavior.

dovecot-shared file is supposed to be a per-mailbox configuration file.
As a special case it's also copied to newly created mailboxes. But I'm
not sure if it should affect global files such as maildirsize and
subscriptions..



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


Re: [Dovecot] Multiple quota roots with quota-fs backend

2008-07-20 Thread Timo Sirainen
On Sat, 2008-07-12 at 17:24 +0200, Ralf Becker wrote:
  BTW:
  The patch also includes another AIX specific code enhancement:
 
  On AIX the quota block size DEV_BSIZE should be 1024. This is easy to 
  detect, because there is a macro DQBSIZE defined in jfs/quota.h. I've 
  changed quota-fs.c to use DQBSIZE (if present) to initialize DEV_BSIZE.

Added to v1.1: http://hg.dovecot.org/dovecot-1.1/rev/3f903dfa8650

The rest I added only to v1.2, at least for now:
http://hg.dovecot.org/dovecot-1.2/rev/796307638449

I also thought that the root checking usually isn't necessary if there's
only a single quota root, so it skips it then.

  + if (getenv(DEBUG) != NULL)
  
  root-quota-debug has the same value. Looks like I should fix some of
  my own code for that as well.
  
 It seems that root-quota-debug in not available in 1.1.1 release 
 source code:
 quota-fs.c, line 615.19: 1506-022 (S) quota is not a member of 
 struct fs_quota_root.

Looks like it was root-root.quota-debug. I changed it everywhere now.


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


Re: [Dovecot] Upgrade to 1.1 maildir shared folders problems

2008-07-20 Thread Timo Sirainen
On Mon, 2008-07-07 at 10:22 +0300, [EMAIL PROTECTED] wrote:
 
 On Mon, 30 Jun 2008 [EMAIL PROTECTED] wrote:
 
 
 
  Seems to be quota plugin related, i removed the plugin and i could log on
  with a new user that did not have a maildir yet.
 
  When we upgraded to 1.1 i enabled the quota plugin witch i forgot to
  mention (sorry) since it was working nicely and reporting the quota to the
  users. quota is from a netapp filer that we use over nfs, any idea if we
  can make this work? later we will change to dovecots deliver and use it's
  quota, but mean time it would be nice for the users to see their quota
  directly from the mail client.
 
 This seems to happen also on local filesystem, if quota plugin is enabled
 as fs: users that do not have maildirs cannot login and the crash happens,
 any possibility for a fix?;)

It crashes because it can't find where the filesystem is mounted at. I
don't know why that would happen, but I fixed the crash anyway:
http://hg.dovecot.org/dovecot-1.1/rev/5659ce2398e4

Jun 30 11:19:07 [dovecot] IMAP(username):
fchown(/var/mail/jaetut/temp.valas.17956.7b8393cabde89cbd) failed:
Operation not permitted
Jun 30 11:19:07 [dovecot] IMAP(username): dovecot-acl-list creation 
failed:
safe_mkstemp(/var/mail/jaetut/temp.valas.17956.7b8393cabde89cbd) failed:
Operation not permitted
  
   Do you use SELinux or something like that? Operation not permitted is
   not the same as Permission denied which comes with normal filesystem
   permission problems.

Oh, right, the real error is that it tries to change the file's group to
one that the user doesn't belong to. So you probably have dovecot-shared
file which has a wrong group.

 I tested this more and it seems that the dovecot-acl-list file is created
 with permission only to the current user:
 
 
 -rw--- 1 1002 sami   55 2008-07-07 09:40 dovecot-acl-list

This file should be created using the same permissions as the mailbox
root directory, which I guess in your case would be /var/mail/jaetut.
Anyway I wrote a patch to help find out this when mail_debug=yes:
http://hg.dovecot.org/dovecot-1.1/rev/4e3e73ff1b92

 So i manualy added rw permission to everyone and it seems to be working,
 the uid on the file changes everytime someone logs on, but the permissions
 seem to be sticking to it, any reason why dovecot would remove the file at
 anypoint and re-create it with the wrong permissions?

The file (as well as many other files created by Dovecot) is updated by
recreating it.


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


Re: [Dovecot] Errors in logfile after upgrading to 1.1.1?

2008-07-20 Thread Bjørn T Johansen
On Sun, 20 Jul 2008 19:02:22 +0300
Timo Sirainen [EMAIL PROTECTED] wrote:

 On Sat, 2008-07-19 at 23:31 +0200, Bjørn T Johansen wrote:
  Not sure but I mean I didn't have these in the log file before the 
  upgrade:
  
  auth(default): passwd([EMAIL PROTECTED]): unknown user
  auth(default): prefetch([EMAIL PROTECTED]): passdb didn't return userdb 
  entries, trying the next userdb
 
 Post your dovecot -n output.
 

Here it is...:

# 1.1.1: /etc/dovecot/dovecot.conf
log_path: /lv1/logs/dovecot.log
protocols: imap imaps pop3 pop3s
listen: [*]
disable_plaintext_auth: no
login_dir: /usr/var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
mail_location: maildir:/opt/vmail/%d/%n
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
imap_client_workarounds(default): outlook-idle
imap_client_workarounds(imap): outlook-idle
imap_client_workarounds(pop3): 
pop3_client_workarounds(default): 
pop3_client_workarounds(imap): 
pop3_client_workarounds(pop3): outlook-no-nuls
auth default:
  mechanisms: plain login
  user: vmail
  verbose: yes
  passdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  userdb:
driver: passwd
  userdb:
driver: prefetch
  userdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  socket:
type: listen
client:
  path: /var/spool/postfix/private/auth
  mode: 432
  user: postfix
  group: postfix
master:
  path: /var/run/dovecot/auth-master
  mode: 384
  user: vmail


BTJ


Re: [Dovecot] v1.1.1: Some files not created with dovecot-shared permissions

2008-07-20 Thread Timo Sirainen
On Sun, 2008-07-20 at 21:19 +0300, Timo Sirainen wrote:
 As for subscriptions and maildirsize .. well, those are more difficult
 and I'm not sure if I should do such a change for v1.1.x releases
 anymore since it would change the behavior.
 
 dovecot-shared file is supposed to be a per-mailbox configuration file.
 As a special case it's also copied to newly created mailboxes. But I'm
 not sure if it should affect global files such as maildirsize and
 subscriptions..

v1.2 code tree now handles these by getting the permissions from the
mail root directory, just as dovecot-acl-list permissions are already
taken from it with v1.1.



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


Re: [Dovecot] Errors in logfile after upgrading to 1.1.1?

2008-07-20 Thread Timo Sirainen
On Sun, 2008-07-20 at 22:07 +0200, Bjørn T Johansen wrote:
  On Sat, 2008-07-19 at 23:31 +0200, Bjørn T Johansen wrote:
   Not sure but I mean I didn't have these in the log file before the 
   upgrade:
   
   auth(default): passwd([EMAIL PROTECTED]): unknown user
   auth(default): prefetch([EMAIL PROTECTED]): passdb didn't return userdb 
   entries, trying the next userdb

These should have happened with v1.0 too. Perhaps you enabled
auth_verbose=yes only after moving to v1.1?

  Post your dovecot -n output.
   passdb:
 driver: sql
 args: /etc/dovecot/dovecot-sql.conf

So your users are primarily in SQL.

   userdb:
 driver: passwd

Since your users are in SQL, I don't think you'll want to try to look
them up from /etc/passwd? So just remove the userdb passwd {} from
dovecot.conf.

   userdb:
 driver: prefetch
   userdb:
 driver: sql
 args: /etc/dovecot/dovecot-sql.conf

Looks ok.


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


Re: [Dovecot] Errors in logfile after upgrading to 1.1.1?

2008-07-20 Thread Bjørn T Johansen
On Sun, 20 Jul 2008 23:24:26 +0300
Timo Sirainen [EMAIL PROTECTED] wrote:

 On Sun, 2008-07-20 at 22:07 +0200, Bjørn T Johansen wrote:
   On Sat, 2008-07-19 at 23:31 +0200, Bjørn T Johansen wrote:
Not sure but I mean I didn't have these in the log file before the 
upgrade:

auth(default): passwd([EMAIL PROTECTED]): unknown user
auth(default): prefetch([EMAIL PROTECTED]): passdb didn't return userdb 
entries, trying the next userdb
 
 These should have happened with v1.0 too. Perhaps you enabled
 auth_verbose=yes only after moving to v1.1?

Nope, did not enable it now; must have done a while ago. Just didn't notice 
these before...

 
   Post your dovecot -n output.
passdb:
  driver: sql
  args: /etc/dovecot/dovecot-sql.conf
 
 So your users are primarily in SQL.
 
userdb:
  driver: passwd
 
 Since your users are in SQL, I don't think you'll want to try to look
 them up from /etc/passwd? So just remove the userdb passwd {} from
 dovecot.conf.

Nope, I agree; no need to look them up from /etc/passwd :-|

Thx... :)


BTJ


[Dovecot] Moving from pysieved to native ManageSieve?

2008-07-20 Thread Bjørn T Johansen
If moving from pysieved to Dovecot native ManageSieve implementation, should 
this just work or do I need to do anything
with existing sieve filter rule files, etc?

Any reasons not to do the switch?


Regards,

BTJ
-- 
---
Bjørn T Johansen

[EMAIL PROTECTED]
---
Someone wrote:
I understand that if you play a Windows CD backwards you hear strange Satanic 
messages
To which someone replied:
It's even worse than that; play it forwards and it installs Windows
---


Re: [Dovecot] quota vs. antispam issue

2008-07-20 Thread Timo Sirainen
On Fri, 2008-07-18 at 20:12 +0200, Johannes Berg wrote:
 On Fri, 2008-07-18 at 20:58 +0300, Timo Sirainen wrote:
 
  So the quota code eventually sees both ctx-dest_mail = NULL and qt- 
   tmp_mail = NULL. I'm not really sure what the right fix for this  
  is.. ctx-dest_mail should be set by something. Perhaps if quota/ 
  antispam overrides it it should set it, and mailbox_save_init()  
  shouldn't set it if it's already set..
 
 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. How about these:

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

 Alternatively, we could ensure that dest_mail is never NULL to start
 with, and have mailbox_save_init() create one, but I'm not sure about
 the performance implications of that. The plugins could, if that's
 possible (haven't checked) set those flags of what they require, and if
 there are no plugins then a struct mail with no MAIL_FETCH_* flags
 wouldn't hurt much, would it?

The problem isn't flags, it's that if the dest_mail is non-NULL then the
mail storage backends must assume that caller wants to do something with
the mail, so it should be added to index. For example with mbox if
dest_mail=NULL the mails are added to index only if the mbox is already
fully synchronized. With dest_mail!=NULL the mbox always gets
synchronized (which could be slow).


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


Re: [Dovecot] folder deletion fails dbox /more debug /solved

2008-07-20 Thread Timo Sirainen
On Thu, 2008-07-17 at 12:22 +0200, Robert Schetterer wrote:
 Patrick Nagel schrieb:
  On Thu, 17 Jul 2008 00:19:34 +0200, Robert Schetterer
  [EMAIL PROTECTED] wrote:
  as stated in http://wiki.dovecot.org/Clients
  with mbox and thunderbird
 
  You should enable tb-extra-mailbox-sep workaround for IMAP
 
  this fixes the problem for dbox too,
  wiki should be upgraded that way
  
  You could have just changed it yourself - it's a wiki. I made the change
  just now (see
  http://wiki.dovecot.org/Clients#head-a222c4ed77a12db48e855e2dccb24113b955c23a).
  
 
 Hi Patrick,
 i wanted to wait until a statement from Timo,
 dbox should be more near to maildir ( in my understanding ) ,then to 
 mbox , so i am a little suprised that this mbox fix works for dbox
 perhaps its simply a bug with dbox, meanwhile reading the list should be 
 enough for info to dbox users, but anyway
 as its a wiki , if this info is somekind of  false
 Timo is able to delete it in the future

OK, there's one difference. It's not actually a dbox issue itself, but
it's a Maildir++ vs. filesystem layout difference. So the same issue
happens if you use e.g. mail_location=maildir:~/Maildir:LAYOUT=fs.

It's anyway more of a bug in Thunderbird, but if that workaround helps
then I guess there isn't really a problem. :)


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


Re: [Dovecot] fs quota check with server does not support rquotad

2008-07-20 Thread Timo Sirainen
On Tue, 2008-07-15 at 18:17 +0800, Grandy Fu wrote:
 dovecot: Jul 15 18:13:21 Error: IMAP(01234567g): fcntl(0, F_GETFL) 
 failed: Bad file number
 dovecot: Jul 15 18:13:21 Fatal: IMAP(01234567g): fd_set_nonblock(0) 
 failed: Bad file number

Fixed: http://hg.dovecot.org/dovecot-1.1/rev/2bd9f6fec1ec



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


[Dovecot] v1.1.2 release candidate

2008-07-20 Thread Timo Sirainen
I've finally read and answered most of the mails on this list. If you
haven't received an answer to your question, resend it. There are a
couple of tricky mbox issues left, but I'm not sure if I can do anything
about them unless someone can show me how to reproduce the problems.

There are quite a lot of new features in v1.1.2 actually. Most of them
are in plugins so hopefully they shouldn't destabilize anything. Anyway
I tought I'd just in case put out a quick release candidate so at least
a few people could try it. I'll probably make the final v1.1.2 release
in a day or two.

So, please test: http://dovecot.org/tmp/dovecot-1.1.2-rc.tar.gz

Largest changes since v1.1.1 are:

+ Added full text search indexing support for Apache Lucene Solr
  server: http://wiki.dovecot.org/Plugins/FTS/Solr
+ IMAP SORT: Added X-SCORE sort key for use with Solr searches.
+ zlib plugin supports now bzip2 also.
+ quota: All backends now take noenforcing parameter.
+ Maildir: Add ,S=size to maildir filename whenever quota plugin
  is loaded, even when not using Maildir++ quota.
+ deliver: Allow lda section to override plugin settings.
+ deliver: Giving a -m namespace prefix parameter now silently saves
  the mail to INBOX. This is useful for e.g. -m INBOX/${extension}
+ Added a new maildirlock utility for write-locking Dovecot Maildir.
+ dict-sql: Support non-MySQL databases by assuming they implement the
  INSERT .. ON DUPLICATE KEY using an INSERT trigger.
- SORT: Fixed several crashes/errors with sort indexing.
- IMAP: BODYSTRUCTURE is finally RFC 3501 compliant. Earlier versions
  didn't include Content-Location support.
- IMAP: Fixed bugs with listing INBOX.
- Maildir: maildirfolder file wasn't created when dovecot-shared
  file existed on the root directory
- deliver didn't expand %variables in namespace location settings.
- zlib: Copying non-compressed messages resulted in empty mails
  (except when hardlink-copying between maildirs).
- mbox-snarf plugin was somewhat broken
- deliver + Maildir: If uidlist couldn't be locked while saving,
  we might have assert-crashed



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


Re: [Dovecot] How can i get original mail subject in sieve vacation?

2008-07-20 Thread Stephan Bosch

Timo Sirainen wrote:

On Sun, 2008-07-13 at 03:41 +0800, Zhang Huangbin wrote:

Hi, all.

I want to mix some new words and original mail subject as vacation
subject, how can i get original mail subject in sieve vacation?

Original subject: Hello.
Vacation subject: Auto-Reply msg: Hello.
  ^ New ^ ^Orig^


Yes, this would be a nice feature. But currently it's hard coded, so you
can't do it without modifying sources. Hopefully it is/will be
implemented in Stephan Bosch's Sieve rewrite:
http://hg.rename-it.nl/dovecot-libsieve/
.
Yes, the new Sieve implementation supports this behavior. This is a 
typical case of the new variables extension to the rescue. The following 
script shows a tested example of how this would be achieved:




require variables;
require vacation;

set subject ;
if header :matches subject * {
  set subject ${1};
}

vacation :subject Auto-Reply msg: ${subject} text:
Hello,

I am currently on vacation. I'll be gone for six weeks and during that 
time I am conveniently unreachable.


Cheers,

Stephan Bosch
.
;



Regards,

--
Stephan Bosch
[EMAIL PROTECTED]




[Dovecot] Dovecot 1.1.1 killed with SIGABRT

2008-07-20 Thread Andreas M. Kirchwitz
Hi folks,

with Dovecot 1.1.1, I've had two crashes (SIGABRT) recently.
Dovecot 1.1.1 has been compiled from source and is running
on Fedora 8 Linux 32 Bit (all patches) with custom OpenSSL 0.9.8h.

[ output of dovecot -n ]
# 1.1.1: /usr/local/dovecot/etc/dovecot.conf
ssl_cert_file: /usr/local/dovecot/etc/dovecot.crt
ssl_key_file: /usr/local/dovecot/etc/dovecot.key
login_dir: /usr/local/dovecot/var/run/dovecot/login
login_executable: /usr/local/dovecot/libexec/dovecot/imap-login
mail_location: mbox:~/Mail:INBOX=/var/spool/mail/%u
auth default:
  mechanisms: plain login digest-md5 cram-md5
  passdb:
driver: passwd-file
args: /usr/local/dovecot/etc/dovecot.passwd
  userdb:
driver: passwd-file
args: /usr/local/dovecot/etc/dovecot.passwd

First, the small problem with Pine 4.64:

Jul 20 03:17:04 linux dovecot: imap-login: Login: user=user1, 
method=CRAM-MD5, rip=138.201.2.8, lip=138.201.2.2, TLS
Jul 20 03:17:53 linux dovecot: IMAP(user1): UIDVALIDITY changed (1215137127 - 
1216072777) in mbox file /home/user1/Mail/Trash
Jul 20 03:17:53 linux dovecot: Panic: IMAP(user1): file 
mail-index-transaction.c: line 548 (mail_index_transaction_get_next_uid): 
assertion failed: (recs[count-1].uid = next_uid)
Jul 20 03:17:53 linux dovecot: IMAP(user1): Raw backtrace: imap [0x80cf2f0] - 
imap [0x80cf34a] - imap [0x80cec5c] - imap [0x80ad621] - imap [0x80ae56b] - 
imap(mail_cache_get_first_new_seq+0x12) [0x80a1d82] - 
imap(mail_cache_field_want_add+0x8d) [0x80a555d] - 
imap(index_mail_parse_header_init+0x1cc) [0x80964ac] - 
imap(index_mail_cache_parse_init+0x4e) [0x809696e] - 
imap(mbox_save_init+0x457) [0x807d4a7] - imap(mailbox_save_init+0x51) 
[0x809fd71] - imap(mail_storage_copy+0xc1) [0x809df31] - imap(cmd_copy+0x1d2) 
[0x805b1f2] - imap(cmd_uid+0x59) [0x805f489] - imap [0x805fe2c] - imap 
[0x805fed5] - imap [0x8060695] - imap(client_input+0x5e) [0x80608ae] - 
imap(io_loop_handler_run+0x100) [0x80d6c30] - imap(io_loop_run+0x28) 
[0x80d5dc8] - imap(main+0x4a1) [0x80683d1] - 
/lib/libc.so.6(__libc_start_main+0xe0) [0x149390] - imap [0x805a211]
Jul 20 03:17:53 linux dovecot: child 19853 (imap) killed with signal 6

The user didn't configure his Pine properly. He used IMAP to access
his INBOX, but he forgot to configure this for all other folders as
well. Now, Pine modified /home/user1/Mail/Trash directly, and when
Dovecot stumbled upon this file it killed itself with signal 6.

The problem is not reproducible. After this single failure,
Dovecot doesn't seem to have any problems with the folder.

However, instead of this panic operation, Dovecot maybe could issue a
warning or error response to the client so that the user (hopefully)
gets a clue about what's going wrong.

Second, the big problem with Thunderbird 2.0.0.14:

Jul 12 01:04:06 linux dovecot: imap-login: Login: user=user2, 
method=CRAM-MD5, rip=138.201.2.4, lip=138.201.2.2, TLS
Jul 12 01:04:45 linux dovecot: Panic: IMAP(user2): file index-sync.c: line 39 
(index_mailbox_set_recent_uid): assertion failed: 
(seq_range_exists(ibox-recent_flags, uid))
Jul 12 01:04:45 linux dovecot: IMAP(user2): Raw backtrace: imap [0x80cf2f0] - 
imap [0x80cf34a] - imap [0x80cec5c] - imap [0x809ccba] - imap [0x8080d10] - 
imap(mbox_sync+0x522) [0x80817d2] - imap [0x807a334] - 
imap(index_transaction_commit+0x4e) [0x809d99e] - imap(cmd_copy+0x35f) 
[0x805b37f] - imap(cmd_uid+0x59) [0x805f489] - imap [0x805fe2c] - imap 
[0x805fed5] - imap [0x8060695] - imap(client_input+0x5e) [0x80608ae] - 
imap(io_loop_handler_run+0x100) [0x80d6c30] - imap(io_loop_run+0x28) 
[0x80d5dc8] - imap(main+0x4a1) [0x80683d1] - 
/lib/libc.so.6(__libc_start_main+0xe0) [0x149390] - imap [0x805a211]
Jul 12 01:04:45 linux dovecot: child 25672 (imap) killed with signal 6
[happens over and over in an endless loop until Thunderbird is killed]

This has been a nasty one. Different user, different mail client.

INBOX with 350 messages in total, 3 of them new. Started Thunderbird,
index page is displayed fine, then clicked on one of the 3 new messages
to read it. For no apparent reason, Dovecot dies with signal 6.
Thunderbird reconnected automatically, and then Dovecot dies again.
Nice endless loop ...

Stopping and restarting the complete Dovecot subsystem with the help
of the init.d script didn't help. Finally the crashes stopped after
removing the cache files in /home/fubar/Mail/.imap/INBOX.

It's obvious that the cache files got corrupted somehow. There was
plenty of disk space free. And the cache files have been freshly
created from scratch with Dovecot 1.1.0. Other folders were not
affected. Except Dovecot, nobody ever touches these cache files.

Well, the good news is, it stopped crashing after removing the cache
files. The bad news is, without the cache files (which I removed)
the problem cannot be reproduced.

So, there's nothing more to offer than these two backtraces. Both
crashes are not related to each other and happened to different users
with different clients.

Maybe the backtraces and my 

Re: [Dovecot] Multiple quota roots with quota-fs backend

2008-07-20 Thread Ralf Becker

Timo Sirainen schrieb am 20.07.2008 20:40:

The rest I added only to v1.2, at least for now:
http://hg.dovecot.org/dovecot-1.2/rev/796307638449

I also thought that the root checking usually isn't necessary if there's
only a single quota root, so it skips it then.



I'm not sure with that, because even if there is just one quota root not 
all existing mailbox have to be located in it. Let's take Grandy Fu's 
configuration as example. It pictures a situtation where the checking is 
necessary:


  dovecot.conf:

  mail_location = mbox:~/mail:INBOX=/var/mail/%u
  plugin {
quota  = fs:INBOX:mount=/var/mail
  }

  /var/mail
  -
   * has quotas
   * for mailboxes hosted by this file system 'getrootquota' should
 report used/total quota sizes, because it is covered by
 quota = fs:INBOX:mount=/var/mail

  /home/h1 (or any other fs where mailboxes may reside)
  -
   * has no quotas
   * for mailboxes hosted by this file system 'getrootquota' should
 report nothing, because it is _not_ covert by any quota root

--
__

 Dipl.-Inform. (FH) Ralf Becker Rechenzentrum (r/ft) der FH Trier
 (Network|Mail|Web|Firewall)   University of applied sciences
 Administrator   Schneidershof, D-54293 Trier

   Mail: [EMAIL PROTECTED]Fon: +49 651 8103 499
Web: http://www.fh-trier.de/~beckerrFax: +49 651 8103 214
 PubKey: http://www.fh-trier.de/~beckerr Crypto: GnuPG, S/MIME
__

 Wenn Gott gewollt haette, dass E-Mail in HTML geschrieben wuerden,
 endeten Gebete traditionell mit /amen. (Tom Listen)


smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Dovecot] AIX: mntctl implementation for NFS quota support

2008-07-20 Thread Ralf Becker



Timo Sirainen schrieb am 20.07.2008 18:01:

Committed with a few changes, could you try if it still works? :)
http://hg.dovecot.org/dovecot-1.1/rev/ecc57955b99d



There is a small compiling issue:

--- dovecot-1.1.2-orig/src/lib/mountpoint.c 2008-07-20 
17:56:16.0 +0200

+++ dovecot-1.1.2/src/lib/mountpoint.c  2008-07-21 01:02:15.0 +0200
@@ -123,7 +123,7 @@
for (i = 0; i  count  device_path == NULL; i++) {
struct stat vst;
const char *vmt_base = (const char *)vmt;
-   const char *vmt_base, *vmt_object, *vmt_stub, *vmt_hostname;
+   const char *vmt_object, *vmt_stub, *vmt_hostname;

vmt_hostname = vmt_base + vmt-vmt_data[VMT_HOSTNAME].vmt_off;
vmt_object   = vmt_base + vmt-vmt_data[VMT_OBJECT].vmt_off;



 - Instead of just one mntctl() retry I added a while-loop. The required
allocation size can change if more mounts are added, right? So there's
otherwise a small race condition between the size checking and the
actual allocation that could cause an unwanted failure. And I think it's
pretty safe to assume that the kernel won't return values that will
cause infinite looping. :)


Yes, you're right. That looks perfect for me :-)


--
__

 Dipl.-Inform. (FH) Ralf Becker Rechenzentrum (r/ft) der FH Trier
 (Network|Mail|Web|Firewall)   University of applied sciences
 Administrator   Schneidershof, D-54293 Trier

   Mail: [EMAIL PROTECTED]Fon: +49 651 8103 499
Web: http://www.fh-trier.de/~beckerrFax: +49 651 8103 214
 PubKey: http://www.fh-trier.de/~beckerr Crypto: GnuPG, S/MIME
__

 Wenn Gott gewollt haette, dass E-Mail in HTML geschrieben wuerden,
 endeten Gebete traditionell mit /amen. (Tom Listen)


smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Dovecot] Multiple quota roots with quota-fs backend

2008-07-20 Thread Timo Sirainen
On Mon, 2008-07-21 at 01:34 +0200, Ralf Becker wrote:
 Timo Sirainen schrieb am 20.07.2008 20:40:
  The rest I added only to v1.2, at least for now:
  http://hg.dovecot.org/dovecot-1.2/rev/796307638449
  
  I also thought that the root checking usually isn't necessary if there's
  only a single quota root, so it skips it then.
  
 
 I'm not sure with that, because even if there is just one quota root not 
 all existing mailbox have to be located in it. Let's take Grandy Fu's 
 configuration as example. It pictures a situtation where the checking is 
 necessary:

But most people haven't needed it, so it would be unnecessary extra
checks for them. Wonder if it'd be better to just let them have the
extra check or add a configuration option..

I'm also a bit worried that if this check was always done it would break
some existing setup where the check doesn't work correctly for some
reason.



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


Re: [Dovecot] How can i get original mail subject in sieve vacation?

2008-07-20 Thread Zhang Huangbin

Timo Sirainen wrote:

On Sun, 2008-07-13 at 03:41 +0800, Zhang Huangbin wrote:
  

Hi, all.

I want to mix some new words and original mail subject as vacation
subject, how can i get original mail subject in sieve vacation?

Original subject: Hello.
Vacation subject: Auto-Reply msg: Hello.
  ^ New ^ ^Orig^



Yes, this would be a nice feature. But currently it's hard coded, so you
can't do it without modifying sources. Hopefully it is/will be
implemented in Stephan Bosch's Sieve rewrite:
http://hg.rename-it.nl/dovecot-libsieve/
  


Thanks for your reply. :)


--
Best Regards.

Zhang Huangbin

- iRedMail: Mail Server Solution for Red Hat(R) Enterprise Linux  
 CentOS 5.x: http://iRedMail.googlecode.com/




Re: [Dovecot] How can i get original mail subject in sieve vacation?

2008-07-20 Thread Zhang Huangbin

Stephan Bosch wrote:
Yes, the new Sieve implementation supports this behavior. This is a 
typical case of the new variables extension to the rescue. The 
following script shows a tested example of how this would be achieved:




vacation :subject Auto-Reply msg: ${subject} text: 


This is really what i want, Good Job, Stephan.

Thanks for your great work. :)

--
Best Regards.

Zhang Huangbin

- iRedMail: Mail Server Solution for Red Hat(R) Enterprise Linux  
 CentOS 5.x: http://iRedMail.googlecode.com/




Re: [Dovecot] Mails invisible (index corrupted?)

2008-07-20 Thread Patrick Nagel
Hi Timo,

thanks for getting back to me :)

On Sunday 20 July 2008, Timo Sirainen wrote:
 On Wed, 2008-07-16 at 16:43 +0800, Patrick Nagel wrote:
  Hi,
 
  I got a complaint from a user today, that a few mails disappeared from
  her Inbox, both when accessing via IMAP with Thunderbird and in the IMAP
  Webmail client (RoundCube Webmail, caching deactivated).
 
  Searching (in Subject or From header) within the Inbox turned up the
  missing messages though.

 If they're found when searching via Dovecot, then Dovecot sees them..

Yes, searching via dovecot - FTS (Squat) is activated though, if that makes 
any difference.

  After checking all relevant client settings (filter rules etc.),
  restarting Thunderbird multiple times, etc., I tried deleting her
  dovecot.index.cache file, restarting Thunderbird again, but that didn't
  change anything. Only after deleting dovecot.index.*, everything went
  back to normal. I can't find anything useful in the log.

 dovecot.index.*? Does that mean dovecot.index.log* or also
 dovecot.index? You did leave dovecot-uidlist alone anyway?

Excerpts from my bash history file:

tar czf dovecot_metadata.tar.gz dovecot*
mv dovecot_metadata.tar.gz ..
rm dovecot.index.cache

[then we did some testing, problem still persisted]

tar czf dovecot_metadata2.tar.gz dovecot*
mv dovecot_metadata2.tar.gz ..
rm dovecot.index*
rm dovecot-uidlist

[all mails were visible again]

(so probably deleting dovecot-uidlist solved it?)

  Any hints on what could have caused this? Where to look?

 Looking at the actual IMAP traffic would/should have shown what the
 problem was. For example using rawlog:
 http://wiki.dovecot.org/Debugging/Rawlog

I switched on rawlog for that user now.

  I backed up
  dovecot.index, dovecot.index.cache and dovecot.index.log before I deleted
  them, but they probably contain sensitive information, so I won't post
  them to the list.

 Only dovecot.index.cache contains sensitive information. I could take a
 look at dovecot.index and dovecot.index.log, but I doubt they show
 anything useful.

I have attached dovecot_metadata.tar.gz minus dovecot.index.cache.

Thanks a lot!
Patrick.

-- 
STAR Software (Shanghai) Co., Ltd.http://www.star-group.net/
Phone:+86 (21) 3462 7688 x 826 Fax:   +86 (21) 3462 7779

PGP key: https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005


dovecot_metadata.tar.gz
Description: application/tgz


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


[Dovecot] Deliver mail as 'read'?

2008-07-20 Thread Peter Collinson
I'd like to be able to deliver certain mail as 'read'  from procmail.  
My procmail rules call deliver with -m

to directly to inject filtered mail to maildir based directories.

I like to keep copies of mail I've sent by cc'ing it to myself and  
using procmail to filter and store copies in the

appropriate directory.

I cannot seem to find a way of delivering cc'd mail from me to me as  
'read'. I'm running  dovecot-1.0.7-2.el5 on a CentOS 5 distribution.


Any hints on how I may achieve this are welcomed. Happy to upgrade if  
needs be.


Thanks.

_
Peter Collinson