Re: [Dovecot] Dovecot shared library to replace libc-client
On Tue, 3 Jul 2012, Timo Sirainen wrote: On 3.7.2012, at 8.53, Asheesh Laroia wrote: I see there is a dovecot shared library. I haven't looked into the details, but here are things I'm interested in: 1. Replacing libc-client's use as a client library .. I envision creating libdovecot-c-client-alike that is a set of headers and a library that is API-compatible with (at least a subset of) c-client. You can call that a compatibility shim. Then e.g. php5-imap could be given the path to those headers and the corresponding libdovecot-c-client-alike library, and when it thinks it is linking to c-client, it could instead link to the libdovecot-c-client-alike. Yeah, that's a possibility. Although Dovecot's libraries are still more about the server side stuff than client side stuff, so it's possible that there are many important missing things. Also libc-client is commonly used to do IMAP access and Dovecot's imapc backend is still lacking quite a lot of that functionality. Timo, I appreciate the super speedy response! This might be convenient if you want to limit how much of a public API is presented by the current dovecot.so that gets installed in e.g. /usr/lib/dovecot/. The compatiblity shim could have a small API, and if you don't want provide ABI guarantees within dovecot.so, the shim could dlopen() dovecot.so rather than link to it. I'm still not ready to give ABI or even API guarantees to libdovecot.. There are still several important large changes to do and I don't really want to keep a ton of ugly backwards compatibility stuff just for external users of the library. Also another potential problem is that libdovecot.so doesn't use a global namespace prefix for all of its functions, so linking it with php could cause symbol name conflicts (especially md5_*, sha1_* and such could cause trouble, like they already have caused with libmysql). Yeah, I totally understand your desire to not make backwards compatiblity a goal of the project. Interesting point about the global namespace prefix. Is this something you'd be willing to reconsider, and start using a global namespace prefix? Once Dovecot becomes more finished (a few years?) I could consider API/ABI guarantees.. Of course nothing prevents anyone else from distributing a (patched) libdovecot already that actually does give some ABI guarantees. I just don't want to spend time on it. And v2.1 - v2.2 - v2.3 etc. transitions are going to be large changes. Yeah -- what I think is the most sensible, at the moment, is to distribute a small shim that has reasonably-tight dependencies to dovecot itself, and so when you upgrade dovecot, you probably have to upgrade the shim. So it proxies away the instability in dovecot, and provides a small, stable API/ABI. That's something that it seems you might not be interested in, but I wonder if I can convince you otherwise. If not, I might try convincing others to write it, but I'm hoping you might since you are so great! (-: 2. Use of Dovecot shared library within alpine, embedding the imapd Right now, the mail client alpine embeds a copy of the UW IMAP source. It uses this when accessing local mail spools, for example. If Dovecot's IMAPd were available as a shared library, perhaps with a c-client-like API, (although not necessarily -- it would be feasible to upgrade alpine to a different API), then alpine could use Dovecot's mail drivers directly. I wonder if it would make any sense to for Alpine not use libdovecot API directly but rather talk IMAP protocol to Dovecot code (maybe running in a separate process)? The Dovecot configuration could be passed pretty easily from Alpine code without requiring any extra config files. That's my fallback plan at the moment, yeah. It seems like more work, though, but it has some serious tidiness possibly going for it. -- Asheesh.
[Dovecot] Dovecot shared library to replace libc-client
Hi all Dovecotters, Lots of programs (e.g, PHP) link to a library called c-client, which is a derivative of the original IMAP implementation, UW IMAP. (For those new to UW IMAP, read here: http://www.washington.edu/imap/ ) UW IMAP is not in as much of active development as it used to be, so I am curious: I see there is a dovecot shared library. I haven't looked into the details, but here are things I'm interested in: 1. Replacing libc-client's use as a client library In Debian, for example, you can search for packages that depend on this library as a client. It looks like this: $ ~ apt-cache rdepends libc-client2007e libc-client2007e Reverse Depends: uw-mailutils uw-imapd libc-client2007e-dev ipopd prayer php5-imap mailsync libmail-cclient-perl asterisk aolserver4-nsimap uw-mailutils libc-client2007e-dev prayer php5-imap mailsync libmail-cclient-perl asterisk-voicemail-imapstorage Let's say, hypothetically, we wanted to switch php5-imap to using Dovecot where it currently uses libc-client. I envision creating libdovecot-c-client-alike that is a set of headers and a library that is API-compatible with (at least a subset of) c-client. You can call that a compatibility shim. Then e.g. php5-imap could be given the path to those headers and the corresponding libdovecot-c-client-alike library, and when it thinks it is linking to c-client, it could instead link to the libdovecot-c-client-alike. This might be convenient if you want to limit how much of a public API is presented by the current dovecot.so that gets installed in e.g. /usr/lib/dovecot/. The compatiblity shim could have a small API, and if you don't want provide ABI guarantees within dovecot.so, the shim could dlopen() dovecot.so rather than link to it. 2. Use of Dovecot shared library within alpine, embedding the imapd Right now, the mail client alpine embeds a copy of the UW IMAP source. It uses this when accessing local mail spools, for example. If Dovecot's IMAPd were available as a shared library, perhaps with a c-client-like API, (although not necessarily -- it would be feasible to upgrade alpine to a different API), then alpine could use Dovecot's mail drivers directly. So, those two are the dream. Timo and others, what are your thoughts? Thanks for reading this far! -- Asheesh. P.S. The radical request #2 would be an excellent, decisive way to end a sad thread in the Debian bug tracker about Alpine + Maildir: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=405762 .
Re: [Dovecot] dsync deleting too many emails (sdbox)
On Thu, 9 Feb 2012, Timo Sirainen wrote: On 9.2.2012, at 21.47, Timo Sirainen wrote: I've anyway done several fixes in v2.1. Can you try if these problems happen with it too? And in any case cleanup the dbox from the *.broken files, so that doveadm force-resync won't give any errors. A bit more specifically: The last such dbox bug was fixed only today, so you'd need v2.1 hg version or wait for v2.1.rc6 which should happen this week. And in general: It would be helpful to have a clean fully working dbox, and then know the *first* error(s) that gets printed about dsync corrupting it. Otherwise it's difficult to guess what are some old problems and what are new ones and which problems happens only because of another problem. Good to know. This weekend I can try to set up something of a 'lab' for testing dsync + (s)dbox, both to see if I can reproduce the errors with the old versions, and to see if the new versions fix them. I'll keep in mind the consideration of knowing the first error that gets printed! -- Asheesh.
[Dovecot] dsync deleting too many emails (sdbox)
I'm using dsync to synchronize emails on a laptop where wifi connectivity sometimes fails in the middle of a sync. I have a shell script that runs dsync, and here is one line of it including the output of dsync: + dsync -f -m realmail mirror /home/paulproteus/projects/ssh-attach/run ssh rose.makesad.us dsync dsync-local(paulproteus): Error: dbox /home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails: Unexpectedly lost uid=337460 dsync-local(paulproteus): Error: msg guid lookup failed: Internal error occurred. Refer to server log for more information. [2012-02-02 11:02:12] dsync-local(paulproteus): Warning: sdbox /home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails: Rebuilding index dsync-local(paulproteus): Warning: sdbox /home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails: Ignoring invalid filename 130608.broken dsync-local(paulproteus): Warning: sdbox /home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails: Ignoring invalid filename 66159.broken dsync-local(paulproteus): Error: Corrupted dbox file /home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails/u.66159 (around offset=16): EOF reading msg header (got 0/30 bytes) dsync-local(paulproteus): Error: link(/home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails/u.66159, /home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails/u.66159.broken) failed: File exists dsync-local(paulproteus): Error: Corrupted dbox file /home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails/u.66159 (around offset=16): EOF reading msg header (got 0/30 bytes) dsync-local(paulproteus): Warning: sdbox: Skipping unfixable file: /home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails/u.66159 dsync-local(paulproteus): Warning: sdbox /home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails: Ignoring invalid filename 336269.broken dsync-local(paulproteus): Error: Corrupted dbox file /home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails/u.130608 (around offset=16): EOF reading msg header (got 0/30 bytes) dsync-local(paulproteus): Error: link(/home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails/u.130608, /home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails/u.130608.broken) failed: File exists dsync-local(paulproteus): Error: Corrupted dbox file /home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails/u.130608 (around offset=16): EOF reading msg header (got 0/30 bytes) dsync-local(paulproteus): Warning: sdbox: Skipping unfixable file: /home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails/u.130608 dsync-remote(paulproteus): Error: proxy server timed out dsync-local(paulproteus): Error: Corrupted dbox file /home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails/u.336269 (around offset=16): EOF reading msg header (got 0/30 bytes) dsync-local(paulproteus): Error: link(/home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails/u.336269, /home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails/u.336269.broken) failed: File exists dsync-local(paulproteus): Error: Corrupted dbox file /home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails/u.336269 (around offset=16): EOF reading msg header (got 0/30 bytes) dsync-local(paulproteus): Warning: sdbox: Skipping unfixable file: /home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails/u.336269 dsync-local(paulproteus): Warning: Transaction log file /home/paulproteus/Maildir/dbox/mailboxes/realmail/dbox-Mails/dovecot.index.log was locked for 1528 seconds That seemed problematic, but not dangerous. Then I ran a fresh sync, and found 3000 (of 60,000) messages had been deleted and expunged from the realmail box. I'm guessing this is some bad interaction with sdbox and partial file downloads? I haven't read the code for this, but I would guess the dsync process isn't being atomic about file transfers, so it is leaving half-completed transfers in place, which results in corrupt files when they're next examined. dovecot -n output: # 2.0.15: /etc/dovecot/dovecot.conf # OS: Linux 3.0.0-2-amd64 x86_64 Debian wheezy/sid mail_location = sdbox:~/Maildir/dbox passdb { driver = pam } protocols = imap ssl_cert = /etc/ssl/certs/dovecot.pem ssl_key = /etc/ssl/private/dovecot.pem userdb { driver = passwd } -- Asheesh.
Re: [Dovecot] /usr/lib/dovecot/imap ignores log settings?
On Thu, 29 Dec 2011, Timo Sirainen wrote: On 28.12.2011, at 20.31, Asheesh Laroia wrote: Hi Dovecot peeps, I'm enjoying running /usr/lib/dovecot/imap directly as a PREAUTH IMAP pipe. I find that it outputs log messages whose severity is INFO to stdout. I'm running it as follows: /usr/lib/dovecot/imap -c /tmp/dovecot.conf and I see the following messages output to stdout: stderr actually. Right. Thanks for that; I saw it was file descriptor 2 in the strace after I hit send. I'd like that message to actually not be printed, which is why I set log_path to syslog. Not possible currently. Either do: /usr/lib/dovecot/imap 2 ~/imap.log Or patch the source: [snip] Great! That should be okay for now. -- Asheesh.
[Dovecot] /usr/lib/dovecot/imap ignores log settings?
Hi Dovecot peeps, I'm enjoying running /usr/lib/dovecot/imap directly as a PREAUTH IMAP pipe. I find that it outputs log messages whose severity is INFO to stdout. I'm running it as follows: /usr/lib/dovecot/imap -c /tmp/dovecot.conf and I see the following messages output to stdout: * PREAUTH [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in as paulproteus imap(paulproteus): Info: Connection closed bytes=0/305 Naturally, the first line is great. My /tmp/dovecot.conf is: cut here # single-dbox mail_location = sdbox:~/Maildir/dbox log_path = syslog info_log_path = /dev/null /cut I'm also attaching strace output, created by running this command: echo | strace /usr/lib/dovecot/imap -c /tmp/dovecot.conf /tmp/straced 21 (The point of the echo | is to provide a newline and then EOF to /usr/lib/dovecot/imap.) You can see in the strace output that /usr/lib/dovecot/imap outputs the Connection closed message to file descriptor 2. I'd like that message to actually not be printed, which is why I set log_path to syslog. -- Asheesh.execve(/usr/lib/dovecot/imap, [/usr/lib/dovecot/imap, -c, /tmp/dovecot.conf], [/* 31 vars */]) = 0 brk(0) = 0x1eb8000 access(/etc/ld.so.nohwcap, F_OK) = -1 ENOENT (No such file or directory) mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff03ee31000 access(/etc/ld.so.preload, R_OK) = -1 ENOENT (No such file or directory) open(/usr/lib/dovecot/tls/x86_64/libdovecot-storage.so.0, O_RDONLY) = -1 ENOENT (No such file or directory) stat(/usr/lib/dovecot/tls/x86_64, 0x7fff1a7c24f0) = -1 ENOENT (No such file or directory) open(/usr/lib/dovecot/tls/libdovecot-storage.so.0, O_RDONLY) = -1 ENOENT (No such file or directory) stat(/usr/lib/dovecot/tls, 0x7fff1a7c24f0) = -1 ENOENT (No such file or directory) open(/usr/lib/dovecot/x86_64/libdovecot-storage.so.0, O_RDONLY) = -1 ENOENT (No such file or directory) stat(/usr/lib/dovecot/x86_64, 0x7fff1a7c24f0) = -1 ENOENT (No such file or directory) open(/usr/lib/dovecot/libdovecot-storage.so.0, O_RDONLY) = 3 read(3, \177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0\340\313\2\0\0\0\0\0..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=898088, ...}) = 0 mmap(NULL, 2993560, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff03e939000 mprotect(0x7ff03ea0d000, 2093056, PROT_NONE) = 0 mmap(0x7ff03ec0c000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd3000) = 0x7ff03ec0c000 close(3)= 0 open(/usr/lib/dovecot/libdovecot.so.0, O_RDONLY) = 3 read(3, \177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0\200\217\1\0\0\0\0\0..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=533816, ...}) = 0 mmap(NULL, 2639392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff03e6b4000 mprotect(0x7ff03e734000, 2093056, PROT_NONE) = 0 mmap(0x7ff03e933000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7f000) = 0x7ff03e933000 mmap(0x7ff03e936000, 9760, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff03e936000 close(3)= 0 open(/usr/lib/dovecot/libdl.so.2, O_RDONLY) = -1 ENOENT (No such file or directory) open(/etc/ld.so.cache, O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=127929, ...}) = 0 mmap(NULL, 127929, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff03ee11000 close(3)= 0 access(/etc/ld.so.nohwcap, F_OK) = -1 ENOENT (No such file or directory) open(/lib/x86_64-linux-gnu/libdl.so.2, O_RDONLY) = 3 read(3, \177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0\340\r\0\0\0\0\0\0..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=14768, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff03ee1 mmap(NULL, 2109696, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff03e4b mprotect(0x7ff03e4b2000, 2097152, PROT_NONE) = 0 mmap(0x7ff03e6b2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7ff03e6b2000 close(3)= 0 open(/usr/lib/dovecot/librt.so.1, O_RDONLY) = -1 ENOENT (No such file or directory) access(/etc/ld.so.nohwcap, F_OK) = -1 ENOENT (No such file or directory) open(/lib/x86_64-linux-gnu/librt.so.1, O_RDONLY) = 3 read(3, \177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0\220!\0\0\0\0\0\0..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=31744, ...}) = 0 mmap(NULL, 2128856, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff03e2a8000 mprotect(0x7ff03e2af000, 2093056, PROT_NONE) = 0 mmap(0x7ff03e4ae000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7ff03e4ae000 close(3)
Re: [Dovecot] alpine + Maildir
On Fri, 6 May 2011, Timo Sirainen wrote: On 5.5.2011, at 23.43, upen wrote: If maildir support in alpine does not work like it does for mbox then I'll have to configure IMAP setings in pine.conf for alpine users. I must say that alpine is installed on mail server :). Although IMAP setting may work fine, it will prompt user for password initially when checking email and while sending first email. I'd like to avoid this by using #md or #mc. You can configure Alpine to execute Dovecot's imap binary and talk to it. That makes it work nicely with Dovecot and won't prompt the user for a password. If you're using v1.x you can run dovecot --exec-mail imap and with v2.0 you just need to run imap. I don't know specifically what this setting in Alpine is called. This is what I am doing right now. http://www.asheesh.org/note/sysop/passwordless-alpine.html says a little more. I strongly recommend this. In fact, I think I should someday talk to the re-alpine team and figure out how to make this easier to configure. It's already reasonably easy, but it can require some fiddling. -- -- Asheesh. http://asheesh.org/ You're not my type. For that matter, you're not even my species!!!
[Dovecot] Using Dovecot code in a non-LGPL package
Hi Timo (and all!), Venaktesh is a friend of mine working on a patch to the venerable Alpine mail reader so it can read Maildir format mailboxes on disk. Venkatesh wanted to know if he could use some code from Dovecot's lib-storage (safely opening/reading Maildirs, including accounting for NFS and ESTALE) and the UID-message mapping code. This way, Dovecot and Alpine would agree on how to handle UIDs for a given Maildir-format mailbox. Plus Alpine could benefit from the thought you've put into the safety of Maildirs on IMAP (which is *not* trivial!). But there are some possible licensing issues. Alpine (formerly known as PINE) is now licensed under the Apache License 2.0. As far as I can tell, if he wants to contribute a patch back to Alpine upstream, he should use use the Apache License 2.0. But Dovecot is licensed under LGPL 2.1; if he takes Dovecot code, modifies it, and mixes it with Alpine, that would not be allowed by the licenses together (as I understand it). The Apache License 2.0 is a permissive, non-copyleft license like the MIT License, but it adds a patent retaliation clause. See http://www.apache.org/licenses/LICENSE-2.0.html for its text and http://www.gnu.org/philosophy/license-list.html for a short statement of its compatibility with GPLv3; http://en.wikipedia.org/wiki/Apache_License#GPL_compatibility has a little more. License-wise, there are two choices, if you're willing Timo: the modified Dovecot code could be released under GPLv3, which *is* compatible with the Alpine license - it would just mean Alpine+Maildir would be GPLv3 when put together. Or you could grant a special permission to Venkatesh to distribute the modified Dovecot code under the Apache License 2.0. Timo (and others), what do you think? The past of least resistance is to say that a derivative work of Dovecot can be made using GPLv3; the most convenient would be to say that particular portions can be used under the Apache License 2.0. -- Asheesh. -- Why do we have two eyes? To watch 3-D movies with.
Re: [Dovecot] Maildir format use question
On Sun, 1 Mar 2009, Rick Romero wrote: So I'm left with a quandry. I guess the simple question is, Should mail in cur, EVER not have a flag? I suppose if it were marked as UNSEEN after being SEEN, that's possible. So I just answered myself there :) Just SELECTing a mailbox causes Dovecot to Is it possible to have Dovecot NOT move a file from new/ to cur/ until a flag has been assigned to the mail? Just from a, possible, performance standpoint - it seems when accessing an INBOX from a PHP webmail system with MANY new mails, there is an unnecessary(?) mass move of these files to another folder. No, (as I understand it) because the time when they are moved to cur/ is when they are assigned UIDs. You can avoid this performance loss (as I understand it) by using Dovecot deliver to deliver the messages straight into cur/. (Others including Timo, correct me if I misunderstand!) -- Asheesh. -- Many pages make a thick book, except for pocket Bibles which are on very very thin paper.
Re: [Dovecot] Replication status
On Mon, 9 Feb 2009, Timo Sirainen wrote: Replication is still on my TODO list and I've a bit of code for the replication plugin implemented, but it's not very far. Anyway since I now started working for Mailtrust they'll decide what the priorities are for new Dovecot features. I can't say for sure if/when I'll start coding the replication again, but my current understanding is that they're interested in it, but some other things are more important to get done first. My reaction to some other things are more important to get done first is, I can't think of anything. (-: So throwing money at me won't help, but nothing of course stops you from writing the code :) I can send you the code I have so far if you want it. By all means, send me the code, or preferably toss it in some hg branch on the web. -- Asheesh. -- Q: What's the difference betweeen USL and the Graf Zeppelin? A: The Graf Zeppelin represented cutting edge technology for its time.
[Dovecot] Replication status
I remember last year we discussed Dovecot replication a bit on this list, e.g. http://www.dovecot.org/list/dovecot/2008-May/030446.html . Has there been any development related to this, and can I help at all? The more I think about the hacks I'm employing to synchronize mail, the more I realize I want this. So hopefully I can put either some money or some time where my mouth is. -- Asheesh. -- Its name is Public Opinion. It is held in reverence. It settles everything. Some think it is the voice of God. -- Mark Twain
Re: [Dovecot] read only FS access
On Tue, 28 Oct 2008, Mathieu Kretchner wrote: Hello, I would like to know if it's possible to subscribe to a folder that is on a read only File System ? We have a snapshot mechanism that create a .snapshot directly in the user folder. This is done by our NAS and we would like to give an access to this backup to our users. If you tell Dovecot to store the cache and indexes elsewhere, that should work fine. I haven't tried it, though. -- Asheesh. -- Avoid gunfire in the bathroom tonight.
Re: [Dovecot] Converting from MBOX to Maildir broke procmail and Spamassasin and halted incoming mail
On Wed, 17 Sep 2008, Dan Roberts wrote: It was quickly pointed out that my system was set up to use MBOX and not MAILDIR, and some helpful links and notes were sent back and forth giving me a good clue as to how to perform the conversion process. I did have success in getting my mail accounts converted from mbox to maildir, but then ran aground. I could see all of my existing mail and create new folders, but I could not see any of my incoming mail. http://markmail.org/message/4wghlnywxuljwmnh - you will want to start /etc/procmailrc with DROPPRIVS=YES My working /etc/procmailrc is as such: [EMAIL PROTECTED]:~ $ cat /etc/procmailrc DROPPRIVS=YES LOGFILE=${HOME}/procmail-log MAILDIR=${HOME}/Maildir DEFAULT=./ [EMAIL PROTECTED]:~ $ I should be using Dovecot Deliver but haven't still gotten around to it. -- Asheesh. -- If wishes were horses, then beggars would be thieves.
Re: [Dovecot] Sorting a folder (by THREAD) takes a long time
On Fri, 7 Mar 2008, Timo Sirainen wrote: How large is your INBOX? Unless you've disabled index files the threading should go pretty fast even for thousands of messages. (now it's archive and Lists that are so big) ca. 100K messages But if it really is because of THREAD, you're in luck. I've almost finished thread index implementation and I'm also considering making it available for v1.1 as a plugin. That would rule. (Unless I can already get it as part of the 1.2 hg tree, in which case I'm not averse to upgrading) On Fri, 7 Mar 2008, Benjamin R. Haskell wrote: I'd do the traces if I were you. Maybe it's something to do with Thread Sorts By Arrival or similar Alpine threading quirks. There was also traffic a couple months ago about threading scaling non-linearly in Alpine depending on that setting. I assume you're running a recent snapshot, but I don't recall whether that issue was resolved. Good question about Thread sorts by arrival. I disabled that for now. Attaching to the imap process in gdb and interrupting to get a stack trace every once in a while, I find it's mostly (80%) in this: #2 0xb7e28ff3 in readdir64 () from /lib/tls/i686/cmov/libc.so.6 #3 0x0806fbe1 in maildir_scan_dir (ctx=0x80f6170, new_dir=false) at maildir-sync.c:421 #4 0x0807060d in maildir_sync_context (ctx=0x80f6170, forced=value optimized out, lost_files_r=0xbf9a7aab) at maildir-sync.c:778 #5 0x080706f6 in maildir_storage_sync_init (box=0x81076a0, flags=value optimized out) at maildir-sync.c:837 #6 0x080ba49f in mailbox_sync (box=0x81076a0, flags=MAILBOX_SYNC_FLAG_FULL_READ, status_items=111, status_r=0xbf9a7b18) at mail-storage.c:536 #7 0x0805fb75 in cmd_select_full (cmd=0x8100c78, readonly=false) at cmd-select.c:39 #8 0x0805fd19 in cmd_select (cmd=0x8100c78) at cmd-select.c:87 #9 0x08061389 in client_command_input (cmd=0x8100c78) at client.c:505 and maybe (maybe less) 20% in this: (gdb) bt #0 mail_cache_lookup_iter_next (ctx=0xbf9a78b0, field_r=0xbf9a78d0) at mail-cache-lookup.c:226 #1 0x0809e208 in mail_cache_field_exists (view=0x8109820, seq=106065, field=1) at mail-cache-lookup.c:260 #2 0x080929fe in index_mail_set_seq (_mail=0x8116390, seq=106065) at index-mail.c:1054 #3 0x0809656a in index_storage_search_next_nonblock (_ctx=0x8108358, mail=0x8116390, tryagain_r=0xbf9a7a7b) at index-search.c:1039 #4 0xb7f0d441 in fts_mailbox_search_next_nonblock (ctx=0x8108358, mail=0x8116390, tryagain_r=0xbf9a7a7b) at fts-storage.c:617 #5 0x080ba642 in mailbox_search_next (ctx=0x8108358, mail=0x8116390) at mail-storage.c:633 #6 0x080680e9 in imap_thread (cmd=0x8100c78, charset=0x8104f50 US-ASCII, args=0x8109bf8, type=MAIL_THREAD_REFERENCES) at imap-thread.c:142 Opening the folder takes some 10 seconds. FWIW, I know that only one message has changed in the folder since I last SELECTed it - that was an APPEND, which Dovecot knew about - maybe it could have resynchronized the folder in the background during that APPEND so the next open would be instantaneous. Can maybe Dovecot show me the last cached version of the folder so I can see the index immediately, and in the background re-sync that? That way opening folders could be instantaneous, and each next IMAP action could give me a chance to see the synchronized state once it's ready. -- Asheesh. -- we: The single most important word in the world.
Re: [Dovecot] login processes from attacks staying for hours
On Thu, 24 Jul 2008, Kai Schaetzl wrote: Other programs have their own built-in values/parameters for timeouts, which makes sense as one program's typical timeout needs may be quite different from another one. So, each program should at least have a few *configurable* parameters that control timeouts like how long an authentication can take or when a data transfer timeout occurs. The IDLE timeout in dovecot seems to be 30 minutes. I would expect it to close any non-authenticated connection *at least* after this time - if not earlier. Indeed, as I recall, the IMAP protocol in general sets a 30 minute timeout across the board. So killing any connection with no data for that long seems like a very sane idea. Timo, what do you think? -- Asheesh. -- After the last of 16 mounting screws has been removed from an access cover, it will be discovered that the wrong access cover has been removed.
Re: [Dovecot] Search over big folder hierarchy (was: Global FTS index?)
On Tue, 24 Jun 2008, Timo Sirainen wrote: Hmm. Or v1.2 has virtual mailboxes - you could create a single virtual mailbox from all your other mailboxes and then search it. I think if Squat is enabled it'll create a single index from all the mails. I'm not sure if I want to leave it like that though.. I hope that the index is shared - that you index the index by inode number, not filename or message UID in a mailbox, since that way you can avoid duplicate storage of index data between virtual mailboxes and normal ones. I have also been thinking about making Squat indexes global for all mailboxes. If done well it should reduce disk space as well as enable fast multi-mailbox searches, but I'm a bit worried about memory usage and other slowness when updating the index. The Squat building/updating could use more work, but I haven't yet figured out a great solution for it. Well, I think it would be okay - deploy it and we'll all tell you. (-; (As always, thanks for this amazing software.) -- Asheesh. -- The wonderful thing about a dancing bear is not how well he dances, but that he dances at all.
Re: [Dovecot] Keeping \Seen flag private
On Fri, 27 Jun 2008, Imobach González Sosa wrote: There's no problem in disallowing the users to update the Seen flag. What I want is that every user have their own Seen flags. Timo and others will know more; but for me, I would just deliver the messages to multiple people and see that Dovecot deliver will use hardlinks for the multiple deliveries - that way, the message flags in the filename are still canonical. -- Asheesh. -- The light at the end of the tunnel may be an oncoming dragon.
Re: [Dovecot] Problem Compiling 1.1.1 on AIX
On Wed, 25 Jun 2008, Timo Sirainen wrote: Can you somehow enable C99 support for xlc? Is there something like a -c99 parameter? P.S. Is it possible to just try installing the GNU Compiler Collection, and then compiling with GCC on your platform? -- Asheesh. -- Hiccuping trembling into the WASTE DUMPS of New Jersey like some drunken CABBAGE PATCH DOLL, coughing in line at FIORUCCI'S!!
Re: [Dovecot] Installation Problem -
On Mon, 16 Jun 2008, Kaushal Gandhi wrote: Hello, I have installed dovecot Version 1.0.14 on Centos Linux 4.6. When I do ./configure --with-pam, I get below mentioned error. Download the OpenSSL development packages for your distribution. My guess is openssl-devel but I don't use CentOS. -- Asheesh. -- You have taken yourself too seriously.
[Dovecot] Lucene index not updated when one saves a message from one folder to the other
I'm running 1.1 rc8, and I enabled the Lucene indexes. I find that if a bunch of messages arrive in INBOX and I then move them to archive, the next time I do an X-TEXT-FAST search, Dovecot has to re-index the mails that I think it had indexed when they were in INBOX. This seems silly, since Dovecot was the one copying them (and then deleting, since that's what I mean by move). Will this change? -- Asheesh. -- Elliptic paraboloids for sale.
Re: [Dovecot] mbox: extra linefeed after Content-Length header in 1.1.rc8
On Wed, 4 Jun 2008, Diego Liziero wrote: On Tue, Jun 3, 2008 at 3:05 PM, Timo Sirainen [EMAIL PROTECTED] wrote: On Tue, 2008-06-03 at 10:34 +0200, Diego Liziero wrote: mbox messages get header corruption caused by an extra linefeed after Content-Length Fixed: http://hg.dovecot.org/dovecot-1.1/rev/e043135e971d Works, thank you. Now I have to fix users mbox files. As the extra linefeed is between Content-Length and Subject headers, I'm thinking about using a regexp based replace such as s/(Content-Length: [0-9]+)\n\n(Subject: )/$1\n$2/s but I can't find how to make multiple lines matching work. Python has an re.MULTILINE option you can pass to the regular expression so that it can cross lines. Perhaps Perl or your favorite regular expression toolkit has something similar? If not, Python it is! (-; -- Asheesh. -- Do not drink coffee in early A.M. It will keep you awake until noon.
Re: [Dovecot] v1.1.rc6 released (managesieve updated)
On Fri, 30 May 2008, Stephan Bosch wrote: Timo Sirainen schreef: 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 Previous managesieve wont compile against rc6, so I made a quick new release (expecting rc7 to arrive soon): http://www.rename-it.nl/dovecot/1.1/dovecot-1.1.rc6-managesieve-0.10.2.diff.gz http://www.rename-it.nl/dovecot/1.1/dovecot-1.1.rc6-managesieve-0.10.2.diff.gz.sig Out of curiosity, have you considered maintaining your managesieve work using a Mercurial branch off Timo's tree? I think that might be easier for you, and I think it might make things easier for others using your patch. You could use hg bisect to find the exact commits of his that break your patch, which would presumably be nice for you. And, it would be a nice little application of distributed revision control that Timo's working with. As always, thanks for this! -- Asheesh. -- Spiritual leadership should remain spiritual leadership and the temporal power should not become too important in any church. -- Eleanor Roosevelt
Re: [Dovecot] procmail -- deliver question
On Thu, 22 May 2008, Ben Budts wrote: Hi there, I use dovecot-1.1-rc4, got imap, imaps, pop3 pop3s working fine with the mbox format. I use sendmail-8.14.2 as an MTA, sendmail uses procmail as an LDA. Does it run it as the user in question, or as root? I migrated to maildir format now, and pipe all my mail to deliver right now to be able to make use of the indexing etc... Problem is I run into some errors : #My .procmailrc PATH=/usr/bin:/usr/local/bin:/usr/sbin SHELL=/bin/bash SENDMAIL=sendmail -oi -t DELIVER=/opt/dovecot/libexec/dovecot/deliver LOGFILE=$HOME/procmail.log #/dev/null VERBOSE=on LOGABSTRACT = all #DEFAULT=$HOME/Maildir/ #MAILDIR=$HOME/Maildir/ :0 w | $DELIVER # Is that /etc/procmailrc or .procmailrc? If it's /etc/procmailrc, add this to the start: DROPPRIVS=YES And remove that setuid stuff from deliver, I'd say. (These are local UNIX users, right?) -- Asheesh. -- QOTD: What I like most about myself is that I'm so understanding when I mess things up.
Re: [Dovecot] moving folders bug - rc4
On Thu, 15 May 2008, Anil wrote: I am fairly new to dovecot... I had a user who in outlook tried to move one of the folders into another folder but it crapped out. I kind of fear that Outlook sent the wrong IMAP commands. Can you reproduce this and keep a Dovecot rawlog of the IMAP session? -- Asheesh. -- Life, like beer, is merely borrowed. -- Don Reed
Re: [Dovecot] Wrong message information
On Fri, 9 May 2008, Anders wrote: Timo Sirainen wrote: On May 8, 2008, at 6:15 PM, Anders wrote: We have a few users that every so often get empty data in their message overview. From and subject are empty, and the date is 1-Jan-1970. When opening the message in full view, all things are fine. Also, the data in the actual maildir file is fine. It looks a lot like the issue described here: http://dovecot.org/list/dovecot/2008-March/029282.html That was fixed in v1.1. Seems not ;-) I confirm it not being fixed. The server is Linux, ext3, no NFS, and Dovecot 1.1.rc4. Do you use quota? I run Linux on amd64, no NFS, ext3, Dovecot built from the nightly .deb repository posted earlier. We have quota plugin enabled, but these users have no quota set. I don't have it enabled. The few clients that have had this problem so far have been Outlook Express. I wouldn't be surprised if it was OE's fault. I'm using alpine and getting the same issue. I would, I guess, suggest adding an assert in the Dovecot that the date isn't epoch start. What can be done to debug this? Enable rawlogs for the users experiencing it. Then when they see the problem for a message, check if there's anything in rawlogs that shows wrong replies. http://wiki.dovecot.org/Debugging/Rawlog I guess I'll do that myself, too. I will enable that, and probably post the logs when it happens again. Thanks! Same here. -- Asheesh. -- Give me enough medals, and I'll win any war. -- Napoleon
Re: [Dovecot] deliver custom maildir creation
On Mon, 5 May 2008, Steve Roemen wrote: / I'm testing a new setup of postfix using deliver to put the messages into the user's maildir, and am curious if there is a way to make deliver create custom maildirs when it delivers to a valid user without a maildir? 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. If others know more Dovecotty ways to handle this, please speak up! -- Asheesh. -- The church saves sinners, but science seeks to stop their manufacture. -- Elbert Hubbard
Re: [Dovecot] Replication protocol design
On Thu, 1 May 2008, Ed W wrote: I currently use a small self written proxy app which does some simple analysis of what imap client is talking and does some prefetching via pipelined commands to reduce latency and also sets up a compressed pipe back to the server. Even over broadband it gives quite a significant speedup on large folders and on dialup it gives a huge performance boost. Nothing too clever going on though Perhaps we could look at some optimisations like that in the first instance? Are you serious? Can I have a copy!? -- Asheesh. -- You're currently going through a difficult transition period called Life.
Re: [Dovecot] icedove update
On Fri, 25 Apr 2008, Karl Schmidt wrote: Something came up that Confounded problems in my move from UW-imap to dovecot. I found a problem with the new icedove update in Debian lenny when moving from 1.5.0.13+1.5.0.14b.dfsg1-0etch1 to 2.0.0.9-3 that could look like a dovecot issue. Icedove runs for a while but eventually quits updating the displayed email, yet appears to be working and busy trying to get messages from the server. I think it is related to message filters, but not sure. The fix was to move .mozilla-thundrebird somewhere and restart icedove and create a new profile. There may be a more elegant fix. I guess you should file a bug against Thunderbird or Icedove! That seems like it corrupted its state in a way that it surely should not have! -- Asheesh. -- Interchangeable parts won't.
Re: [Dovecot] Replication protocol design
On Tue, 29 Apr 2008, Timo Sirainen wrote: I'll probably be implementing multi-master replication this summer. My previous thoughts about it are here: http://dovecot.org/list/dovecot/2007-December/027284.html Below is a description of how the replication protocol will probably work. It should work just as well for master-slave and multi-master setups. Comments welcome. I'll write later a separate mail about how it'll be implemented to Dovecot. (I'm CC:ing tv since he and I once chatted about IMAP replication.) Multi-master will be very interesting. I'm really curious what you will do as far as this scenario: 1. A mail arrives in server1 2. User reads it (therefore the mail has a UID assigned) 3. server2 gets isolated from server1 4. A mail arrives at server2 5. User logs in to server2 and reads it (therefore the mail has a UID assigned) 6. server2 and server1 are connected again, and are told to sync Questions: a. Does the client get told two different messages have the same UID in the folder? b. What is the graceful sync proposal? Oh, look - you mention that right at the end of your protocol: A special case is when two servers have been saving messages independently from each others. In this case it's possible that the servers have used the same UIDs for different messages (different global UIDs). These need to be resolved by giving both conflicting UIDs new unused UIDs, otherwise IMAP clients may show them as wrong messages from their caches. FIXME: If the other server had expunged a conflicting UID it still should be given a new UID. How do we find out this has happened? I guess this doesn't address my Question (a), though. The above scenario may be handled by your root-based election process - but what prevents two roots from simultaneously existing, and therefore two masters existing, and then the above scenario happening? I'm really interested to see where this goes - I think this would be really swell as a replacement for my use of offlineimap. I also want to have you consider letting non-root users use Dovecot replication features; that way, I could just have a cron job that asks my laptop's Dovecot to replicate from my server's Dovecot, without giving it any special permissions. Thanks for all the great work Dovecot represents! -- Asheesh. -- I joined scientology at a garage sale!!
Re: [Dovecot] Dovecot + iPhone
On Wed, 23 Apr 2008, Tim Riley wrote: dovecot version: 1.0.13 (RPM from http://atrpms.net/) protocol: IMAP dovecot -n: # 1.0.13: /etc/dovecot.conf log_path: /var/log/dovecot/dovecot.log listen: *removed* ssl_cert_file: /etc/pki/dovecot/certs/dovecot.pem ssl_key_file: /etc/pki/dovecot/private/dovecot.pem login_dir: /usr/local/var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login mail_privileged_group: mail mail_location: mbox:~/mail:INBOX=/var/mail/%u mbox_lazy_writes: no imap_client_workarounds: outlook-idle delay-newmail auth default: cache_size: 1024 passdb: driver: pam args: session=yes cache_key=%u dovecot userdb: driver: passwd I want to start out by saying that Dovecot works 100% when viewing/moving mail (on our company mail server that I maintain) via Outlook Express and/or Windows Mail. I'm having issues with moving mail via my iPhone. If I move a message from my Inbox to another folder, the mail gets COPIED...not moved. So it exists in my Inbox as well as the folder I moved it to. That's odd. Can you provide a Dovecot rawlog? http://www.dovecot.org/bugreport.html has general information on debugging, and http://wiki.dovecot.org/Debugging/Rawlog has more information on Rawlog in particular. -- Asheesh. -- Clothes make the man. Naked people have little or no influence on society. -- Mark Twain
Re: [Dovecot] Moving Maildir email messages and backing things up.
On Mon, 21 Apr 2008, mouss wrote: Karl Schmidt wrote: mouss wrote: karl wrote: What would happen if I ran a script that did this: mv ~/Maildir/.folder_one/cur/* ~/Maildir/.folder_two/cur/ My hunch is it might break things. shouldn't break anything. if the MUA is caching actions (happens with thunderbird at least), then the view in the client will be different but this is not a big problem (at least for me). So on the server I could run something simple like: #!/bin/bash bogofilter -Ns -B /home/karl/Maildir/.s-2B-scaned_spam mv ~/Maildir/.s-2B-scaned_spam/cur/* ~/Maildir/.archived_spam/cur/ you'd better use an axuiliary directory: mv $dir/.Junk.Trash/cur/* $dir/.Junk.Trash/todo/ $learn_spam $dir/.Junk.Trash/todo/ mv $dir/.Junk.Trash/todo/* $dir/.Corpus.junk/cur/ I think you could get away with using the Maildir built-in tmp directory if you wanted for this. -- Asheesh. -- Invest in physics -- own a piece of Dirac!
Re: [Dovecot] Sieve script executed, but nothing happens
On Fri, 18 Apr 2008, Wouter Amsterdam wrote: if address :is to user@ mydomain.nl { Is this space intentional? useratspacemydomain.nl? -- Asheesh. -- In the long run, every program becomes rococo, and then rubble. -- Alan Perlis
Re: [Dovecot] A little assistance with Sieve
On Mon, 7 Apr 2008, [EMAIL PROTECTED] wrote: Unfortunately, this does not seem to be over, yet. I have a script in the right place now, it is set as Active, but it does not seem to be doing anything. That is, everything is still going to the INBOX instead of to the designated directories, and there are no entries in the log files. I am using subdirectories, and am showing them as . - maildir format. Is this correct? Is there something I should have in dovecot.conf in either imap or lda that links to the script? I shall continue to search, but a hint or two would help. I'm reentering this conversation a little late - but how are you delivering mail? Via the Dovecot LDA (in which case Sieve should be used)? Or directly via e.g. procmail (in which case Sieve never gets a chance to be run)? -- Asheesh. -- Truth is hard to find and harder to obscure.
Re: [Dovecot] Broken Debian package
On Sun, 6 Apr 2008, Thing wrote: So maybe dovecot.index.cache became corrupt? Hmm! Perhaps you should still upgrade, then. -- Asheesh. -- The last person who said that (God rest his soul) lived to regret it.
Re: [Dovecot] Icedove (Thunderbird) crashes when reading IMAP messages
On Thu, 3 Apr 2008, Cam Ellison wrote: This is a Debian lenny/sid installation. Dovecot has been installed on it for over a year, with no problems. Lately (i.e. the past few months), if I attempt to read a message, Icedove crashes. It does not do this when I read a message downloaded from the ISP's POP3 server (not that I do this very often - almost all my mail goes through Dovecot). Have you tried creating a new account with the same settings as the normal Dovecot account? Maybe Icedove/Thunderbird has corrupted some local data. If it persists, then get a raw log from Dovecot and let's see what has to be done from there. -- Asheesh. -- An age is called Dark not because the light fails to shine, but because people refuse to see it. -- James Michener, Space
Re: [Dovecot] Dovecot config
On Fri, 4 Apr 2008, Dien Phan wrote: We are using a web mail software that allows users to login either as us 'abc' or '[EMAIL PROTECTED]'. The problem is: when a user logs in as 'abc' (without domain part) dovecots creates a directory /var/MailRoot/domains/abc and check mail there (as I understand because %d is blank). My question is how to config dovecot so it automatically add default domain %d is blank. I don't know off-hand, but I will offer an alternate possibility: It should be easy to modify the webmail package to add the suffix you want. Note that this is not me saying you cannot or should not do this at the Dovecot layer; just trying to help how I can. -- Asheesh. -- Your happiness is intertwined with your outlook on life.
Re: [Dovecot] dovecot dead
On Mon, 24 Mar 2008, Allen Sim wrote: I am a new linux user.I jz setting up a mail server.Downloaded Configured the components:CentOS,OpenLDAP,pam,dovecotMailServer,s endmial,squireelmail etc Okay. But wehn i want to check whether it works or not, so i open up my clientmail, wchi is Netscape 7.2. in Edit Mail Newsgroups Account Setting server setting... i had put the ip address for the machine... but error pop out: Could not connect to mail server 10.XX.XX.XXX;the connection was refused. what's wrong wth it??? I don't know, let's see. how to check wthere the mail server work? my second question. Dovecot dead but subsys locked aft i typed: /etc/init.d/dovecot status, it shows:dovecot dead but subsys locked. I deleted /var/lock/subsys/dovecot. but whn i start my dovecot,etc/init.d/dovecot start, same problem occur againhow to solve ths??? below is frm /var/log/maillog : Mar 19 15:17:28 hosting sendmail[3617]: m2J1EtMP003319: to=[EMAIL PROTECTED], ctladdr=[EMAIL PROTECTED] (0/0), delay=06:02:32, xdelay=00:00:00, mailer=local, pri=665894, dsn=4.0.0, stat=Deferred: local mailer (/usr/libexec/dovecot/deliver) exited with EX_TEMPFAIL What version of Dovecot are you using? Have you read through http://wiki.dovecot.org/WhyDoesItNotWork ? i am new in this. anyone can help??? appreciate ur reply I don't know this 'subsys locked' thing printed by your init script. Have you tried doing '/etc/init.d/dovecot restart'? And do check out the dovecot.org page I just linked. -- Asheesh. -- Emotions are alien to me. I'm a scientist. -- Spock, This Side of Paradise, stardate 3417.3
Re: [Dovecot] Automatic Debian repository now provides source packages
On Wed, 19 Mar 2008, Stephan Bosch wrote: Hello Dovecot users, Last week I announced my automatic Debian repository for dovecot-1.1. Asheesh Laroia requested source package support and as promised I built it this weekend. Now that it has succesfully released new packages for Timo's latest changes I have activated the new script. Super rad! -- Asheesh. -- These screamingly hilarious gogs ensure owners of X Ray Gogs to be the life of any party. -- X-Ray Gogs Instructions
Re: [Dovecot] problems with postfix-procmail-deliver
On Mon, 17 Mar 2008, Andy Greenwood wrote: I'm relatively new to Dovecot, but I really like what I'm seeing so far. I have one problem that I was hoping you could help me with though. I use Postfix for my mail server, then pass that on to procmail for filtering, and finally to deliver to put the mail in the appropriate Maildir folder. However, this isn't working. Postfix passes the mail to procmail correctly, but procmail is failing when it tries to call deliver. My system-wide procmailrc matches the lower one shown here: http://wiki.dovecot.org/procmail?highlight=%28procmail%29 which uses deliver. My personal ~/.procmailrc is of similar format Okay. However, my procmail logs show this error message for every message that comes through: Fatal: destination user parameter (-d user) not given http://www.mail-archive.com/dovecot@dovecot.org/msg08468.html (-: -- Asheesh. -- You can get everything in life you want, if you will help enough other people get what they want.
Re: [Dovecot] Help! OT: Blackberry IMAP client suggestions/experience needed
On Thu, 13 Mar 2008, Stewart Dean wrote: Sure it will in your situation...but when you have more than one client going after the mailbox, they'll step on each other's work n vanilla Dovecot. And in this case there are at least 2 and as many as 4 or 5 mail clients all open at the same time going after an mbox format inbox. Doctor, it hurts when I do $foo. Then stop doing it! Is there a reason you're hurting yourself by using mbox? -- Asheesh. -- Deadwood, n.: Anyone in your company who is more senior than you are.
Re: [Dovecot] imap sent-mail folder sometimes dosen't get updated when used by more than a mailer at the same time.
On Wed, 12 Mar 2008, Diego Liziero wrote: Perhaps, as it never happened with wu-imap, it could be fixed with dovecot, too. The hard part is to understand why it happens. I wonder if an IMAP trace for a working UW-IMAP setup and the failing Dovecot setup might help. -- Asheesh. -- Satire is what closes in New Haven.
Re: [Dovecot] Automatic Debian repository with packages for Dovecot-1.1 including Sieve and ManageSieve support.
On Sat, 8 Mar 2008, Stephan Bosch wrote: Hello Dovecot users, For those of you who like to live on the edge, there is now a Debian-testing repository available with hourly updates from recent Dovecot-1.1 changes in the Mercurial repositories. It automatically releases a new set of packages if it notices any changes in any of the repositories. The packages are built with dovecot-sieve-1.1 and dovecot-1.1-managesieve included. Currently, it only provides binaries for the i386 architecture and no source packages are available. The small Debian-specific patches that are included in the official Debian packages are currently not included for this repository. Also, the packages are currently not PGP signed. Reasonable enough. (-: I urge you to provide source packages so (a) I can read the debian diff, and (b) I can build them for my amd64 server. -- Asheesh. -- If our behavior is strict, we do not need fun!
Re: [Dovecot] Logging Options
On Thu, 6 Mar 2008, Steffen Ille wrote: Dear Listmembers, I tried to figure out how to get statistics not only about the amount of mails which where sent from / to my mailusers, but also about the size in byte (e.g. to compare with other traffic stats) for each of my users. postfix shows me the size of sent mails per user, but afaik I cannot get the size of rcvd mails per user with it. I use the dovecot LDA with postfix and in this lda - logfiles I also cannot see a byte-like size of delivered mails. Is there any possibility get such statistics working? I actually deliver to Dovecot via procmail, which if you enable its log option will store byte sizes. Also Postfix may be involved in inbound mail, in which case its logs would be of use also. -- Asheesh. -- Visit beautiful Wisconsin Dells.
[Dovecot] Sorting a folder (by THREAD) takes a long time
My email workflow with Dovecot is that mail gets delivered to INBOX, where I handle it and then move it into a folder called archive. I have alpine set to use the Default sort of THREAD of a folder. After moving a (few) mail(s) from INBOX to archive, archive takes a long time (10-50s) to load while alpine tells me: [Sorting archive ... ] (I can do the IMAP traces, but I figure alpine's terminology is going to be so similar to IMAP terminology that it should be straightforward enough for Timo to know what I'm talking about.) I don't actually know enough about Dovecot to say for sure what makes this slow, but maybe it's just indexes not being updated? What might be making this slow, and what hope is there for it being fast? (-: It seems like the really nice thing to do would be, after the save, in the background examine the archive folder and update whatever caches need to be updated. The more work that happens while I'm not waiting, the happier I'll be! (Same goes for my mom, and the other less-technical users of Dovecot.) Is this the kind of thing I could write a plugin for...? -- Asheesh. -- It seems to make an auto driver mad if he misses you.
Re: [Dovecot] messages downloading repeatedly to mozilla/seamonkey pop3 client
On Wed, 5 Mar 2008, Ben Julian wrote: All changes resulted in only a brief (1-2hr) cessation of the problem. I've subscribed for a month or so now and searched the archives, but if I missed a solution to this in there, I apologize. That sounds like a drag. Let's see if we can help you. Can you paste the results of dovecot -n into a message? That way we can see your whole configuration. What version of Dovecot are you using, and where did you get it from? (I'm expecting you to tell me you're running some really old version, and I further expect that if you upgrade your woes will go away; but let's see!) -- Asheesh. -- A long-forgotten loved one will appear soon. Buy the negatives at any price.
Re: [Dovecot] deliver procmail
On Thu, 28 Feb 2008, Jeff Grossman wrote: Thanks for the information. I have one additional question, it is probably not a Dovecot question more of a Procmail question. I tried adding the above code to my /etc/procmailrc file but it did not work. Do I have to put that code in each users .procmailrc file? I would prefer to just put it in on a system wide basis. My current /etc/procmailrc file has this line: DEFAULT=$HOME/Maildir/ Do I keep that line and put the above Deliver code in? And if so, do I keep the DEFAULT line at the top or after the Deliver code? Since /etc/procmailrc is executed as root typically, you probably need to make this the first line of it: DROPPRIVS=YES At least, that's what I have, and that's my recollection of my reason. (-: -- Asheesh. -- It is a poor judge who cannot award a prize.
Re: [Dovecot] Follow-up re: gcc 2.96 - Re: PATCH: compile dovecot-1.1.beta14 with gcc 2.95
On Wed, 27 Feb 2008, Timo Sirainen wrote: On Feb 27, 2008, at 4:22 PM, Kevin A. McGrail wrote: I can't argue with that logic but documenting it in a wiki or INSTALL or including the patches with the distribution might be more agreeable. Why are you people still using so old gcc versions? As an observer, I'd like to remark that it's amazing that twentiety-century known-broken non-releases http://gcc.gnu.org/gcc-2.96.html of GCC are in use in 2008. I'm honestly curious what keeps you guys on them. -- Asheesh. -- Maybe you can't buy happiness, but these days you can certainly charge it.
Re: [Dovecot] Dovecot 1.0.10 - IMAP - Nokia N95 ?
On Tue, 26 Feb 2008, Patrick wrote: I was wondering if anyone has IMAP working between Dovecot 1.0.10 and a Nokia N95 (8GB version with firmware 15.x.x.x)? I've been trying to make it work using a default Dovecot config but the N95 just hangs when updating the folder list which has a bunch of nested folders. Can you log the IMAP conversation with e.g. Dovecot's rawlog: http://wiki.dovecot.org/MainConfig?highlight=rawlog ? -- Asheesh. -- I never loved another person the way I loved myself. -- Mae West
Re: [Dovecot] Update from 1.0.10 - 1.1rc1 file message-parser.c: line 766 (message_parser_parse_next_block): assertion failed
On Sat, 23 Feb 2008, Ralf Hildebrandt wrote: Feb 23 20:40:36 postamt dovecot: IMAP(username): Raw backtrace: It looks like you could make this report even more helpful by providing a single message that reproduces this failure, or by proving a gdb backtrace as per http://www.dovecot.org/bugreport.html . It's a SIGABRT, not a SIGSEGV, so there is a chance Timo could fix it without the above information, but I imagine it would help. -- Asheesh. -- - /usr/local/libexec/dovecot/imap(client_destroy+0x6c) [0x8001c0ac] - Feb 23 20:40:36 postamt dovecot: IMAP(username): file message-parser.c: line 766 (message_parser_parse_next_block): assertion failed: (ctx-input-eof || ctx-input-closed || ctx-input-stream_errno != 0) /usr/local/libexec/dovecot/imap [0x8001c893] - /usr/local/libexec/dovecot/imap(io_loop_handle_timeouts+0xeb) [0x80099ddb] - /usr/local/libexec/dovecot/imap(io_loop_handler_run+0x93) [0x8009aa03] - /usr/local/libexec/dove Feb 23 20:40:36 postamt dovecot: IMAP(username): /usr/local/libexec/dovecot/imap(main+0x4ae) [0x80024d6e] - /lib/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7db7450] - /usr/local/libexec/dovecot/imap [0x80015be1] Feb 23 20:40:36 postamt dovecot: child 15224 (imap) killed with signal 6 -- Ralf Hildebrandt ([EMAIL PROTECTED]) [EMAIL PROTECTED] Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155 http://www.arschkrebs.de vista policy violation: Microsoft optical mouse detected penguin patterns on mousepad. Partition scan in progress to remove offending incompatible products. Reactivate MS software.
Re: [Dovecot] v1.1.rc1 released
On Sat, 23 Feb 2008, Wolfram Schlich wrote: I just committed the Gentoo ebuild for 1.1.rc1 with sieve and managesieve support (both since 1.1.beta15): http://packages.gentoo.org/package/net-mail/dovecot I've also made available unofficial Debian packages. Note that they don't have Sieve support. I'd suggest compiling them yourself. I compiled them against Debian Stable amd64 and they work well there; you can just apt-get install dovecot after adding my repositories if you want to use my binaries. Here's how to do use the source packages: 1. Edit your sources.list to include my repository Add these lines: deb http://www.asheesh.org/ubuntu/ sid main deb-src http://www.asheesh.org/ubuntu/ sid main 2. Install apt-src so you can build the packages yourself $ sudo aptitude install apt-src 3. Use apt-src to build (note: it doesn't install by default) the new Dovecot packages $ apt-src -b install dovecot 4. Install the resulting .deb files: $ sudo dpkg -i *.deb Have fun! Yes, have fun! (-: -- Asheesh. -- He asked me if I knew what time it was -- I said yes, but not right now. -- Steven Wright
Re: [Dovecot] Strange Error
On Mon, 18 Feb 2008, Davi Bariani Boin wrote: Hello Everybody, I´m trying to make a work with procmail and deliver on Fedora 7. Part of flow are the following: - procmail get the mail from Sendmail - procmail ask to deliver/dovecot if have any retriction (sizer mailbox, etc) - procmail put the mail on inbox user. I had include the following line in the promail config: | /usr/libexec/dovecot/deliver -m $DEFAULT and the procmail log shows me the following : procmail: Assigning MAILDIR=/home/admin/mail procmail: Assigning INCLUDERC=/home/admin/Procmail/rc.spam-mail procmail: Couldn't determine implicit lockfile from /usr/libexec/dovecot/deliver procmail: Locking .lock procmail: Executing /usr/libexec/dovecot/deliver,-m,/var/spool/mail/admin procmail: Non-zero exitcode (75) from /usr/libexec/dovecot/deliver This is the interesting part. Why did Dovecot Deliver return 75? -- Asheesh. -- Your business will go through a period of considerable expansion.
[Dovecot] Finding Dovecot 1.1 hg
When I do either: $ hg clone http://hg.dovecot.org/dovecot/1.1/ or $ hg clone http://hg.dovecot.org/dovecot/ and cd into the resulting directory (1.1/ or dovecot/) and do autogen.sh and configure, ./configure tells me at the end: NOTE: This is the UNSTABLE development branch of Dovecot v1.2. I wanted Dovecot v1.1, I thought, to help Timo get that out the door! Timo? -- Asheesh. -- Leibowitz's Rule: When hammering a nail, you will never hit your finger if you hold the hammer with both hands.
Re: [Dovecot] Convert MBOX
On Thu, 31 Jan 2008, Erin D. Hughes wrote: Evaggelos Balaskas wrote: to avoid such problems i simple create a new user with userdb_mail=maildir and using thunderbird i just copied the emails from one account to other :) Thanks Evaggelos for your reply unfortunately I need to convert about 17,000 mboxes to maildirs. Re-reading my last mail I see that maybe I was not so clear. I have used mb2md to good success, albeit not on so many. -- Asheesh. -- Because I don't need to worry about finances I can ignore Microsoft and take over the (computing) world from the grassroots. -- Linus Torvalds
Re: [Dovecot] Strange signal 11 crashes
On Tue, 29 Jan 2008, Andreas Ntaflos wrote: I found that compiling the zeroc-ice package (on Debian-based distros), which is huge, very reliably results in random crashes and aborts when relevant hardware is dying. # apt-get source zeroc-ice # cd zeroc-ice-?.?.? # make *blam* Just to mention a few of my favorite commands in Debianland: $ apt-get -b source zeroc-ice That does the same with fewer commands. And if you have the apt-src package: $ apt-src -b install zeroc-ice does the same *plus* installs zeroc-ice's build-dependencies! (in apt-src teminology, it installs the source package to the current directory (meaning, it downloads and unpacks the source), and then -builds it. The above invocation will not actually install the package. -- Asheesh. -- None love the bearer of bad news. -- Sophocles
Re: [Dovecot] Multiple copies of a message
On Tue, 29 Jan 2008, Anne Wilson wrote: I have a problem and I don't know which part of the mail chain could be causing it, although dovecot does seem to be the most logical source. I get multiple copies of messages to my Inbox. I have just deleted 24 copies of a newsletter from Computer Shopper. The worst example I have seen of this had more than 90 copies. This doesn't happen to any subfolder of Inbox, just Inbox itself. Does your SMTP server's logs indicate receiving it multiple times? Me, I use a procmail recipe that removes duplicates, so I don't see duplicate messages if they have the same Message ID. Also, what do the headers of these duplicates suggest - are they fully identical?. -- Asheesh. -- I've run DOOM more in the last few days than I have the last few months. I just love debugging ;-) (Linus Torvalds)
Re: [Dovecot] More efficient Deleting of a whole folder (or Purging Trash)
On Tue, 29 Jan 2008, Bill Cole wrote: For Dovecot, the mailbox index also has to be updated for each deletion, and while that in itself is not terribly expensive per message, it has to be done one message at a time to maintain consistency between the index and the real mail. In general, this isn't really true - because Dovecot can deal with other programs accessing the Maildir, it can't treat the index as canonical. Therefore if Dovecot knows it is deleting a whole folder, Dovecot could just as easily skip over the index updates or equivalently decide to do them all at once at the end, at which point the index is empty. -- Asheesh. -- Any sufficiently advanced technology is indistinguishable from a rigged demo. -- Andy Finkel, computer guy
Re: [Dovecot] More efficient Deleting of a whole folder (or Purging Trash)
On Tue, 29 Jan 2008, Bill Cole wrote: At 6:32 PM -0800 1/29/08, Asheesh Laroia imposed structure on a stream of electrons, yielding: On Tue, 29 Jan 2008, Bill Cole wrote: For Dovecot, the mailbox index also has to be updated for each deletion, and while that in itself is not terribly expensive per message, it has to be done one message at a time to maintain consistency between the index and the real mail. In general, this isn't really true - because Dovecot can deal with other programs accessing the Maildir, it can't treat the index as canonical. I was speaking specifically of what Dovecot might be able to do to speed up user experience, which would be to update (i.e. clear) the index, then spawn off something to actually do the slow task of deleting the files. To keep that behavior from cascading into pointless index rebuilds during the cleanup time, there would need to be some big changes in how Dovecot keeps index files in synch. Ah, I see. Or put another way: the consistency problem is not that Dovecot can't regenerate its index files from the mailbox, but rather that it can and will do so whenever it sees a directory change, and it always trusts the data over the index (that's GOOD.) If the index were to be updated ahead of a slow change of the data in order to provide the user the appearance of speed, it violates the design of the index system. Therefore if Dovecot knows it is deleting a whole folder, Dovecot could just as easily skip over the index updates or equivalently decide to do them all at once at the end, at which point the index is empty. Except that it wouldn't really help. The index updates are not the expensive part, the changes to the filesystem are. In this case it looks like an issue with XFS, a filesystem that is not normally recommended for usage that involves the creation and deletion of a lot of small files. Changing a little bit of data in an index file is very fast compared to the deletion of a file from a directory with 35k entries. I misunderstood the cause of the slowness then, if it is really true that updating the index is not an important factor. I don't remember seeing profiling, but since I don't have any myself I'll take your word for it. -- Asheesh. -- Atomic batteries to power, turbines to speed. -- Robin, The Boy Wonder
Re: [Dovecot] New server error
On Thu, 24 Jan 2008, Anne Wilson wrote: I'm setting up a replacement mail server on a CentOS 5.1 box. The dovecot version is 1.0.rc15. 'dovecot -n' returns Can you try upgrading to a more recent Dovecot? 1.0.10 is the current stable release. -- Asheesh. -- Why does New Jersey have more toxic waste dumps and California have more lawyers? New Jersey had first choice.
Re: [Dovecot] Imap proxy with tls?
On Sun, 13 Jan 2008, Someone Something wrote: I have a server with dovecot installed with imap and tls working (call that the remote server). Now I want to have a few computers at the same place to access the same account on the remote server. I have another server (call this the local server) at the local site to do this with but am not sure how to do it. The proxy setup http://wiki.dovecot.org/PasswordDatabase/ExtraFields/Proxy looks about right but that does not seem to support tls? I need tls going from the local server to the remote server. I want all emails on the remote server to be the same as on the local server. This way all clients at the local site have very fast access to email and can still get to the email when not at the local site. This is a little different from what you're doing, but let me tell you how I do the above: I run offlineimap on the local server, and it syncs the changes to and from the remote server. -- Asheesh. -- Q: How many Marxists does it take to screw in a light bulb? A: None: The light bulb contains the seeds of its own revolution.
Re: [Dovecot] Imap proxy with tls?
On Sun, 13 Jan 2008, Someone Something wrote: offlineimap looks like it will work. Do you know if it works well on big changes? I have about 1.5 gigs of email at the local site that will need to be uploaded to the main server. After its uploaded it will have to weed through it all during the sync every time. Think that will be ok? BTW, I use offlineimap's IMAP-Maildir sync, not IMAP-IMAP, which is newer and I trust it less. It's okay for large mailboxes; the first sync will take forever, but after that it's not too bad. I would make backups; a friend ran into a Dovecot bug that due to memory pressure didn't list all the UIDs in a Maildir, so offlineimap thought the messages were remotely deleted. I've never suffered problems like this, and maybe no one else will now that the Dovecot bug is fixed, but it was sad and worth warning about. You could instead of just relying on backups use offlineimap's feature that tells it not to really delete mail; I don't remember what it's called. An alternate strategy is to use git (or similar) to mirror the Maildir structure across the network. -- Asheesh. -- Some restrictions may apply.
Re: [Dovecot] do not lose mail when dovecot is dead
On Sat, 12 Jan 2008, Daniel wrote: Currently, I'm executing deliver from a wrapper script: # master.cf: dovecot-lda unix [...] argv=[...]/dovecot-lda_wrapper.pl ${recipient} That script finds out the username which must be passed to deliver's -d option, because dovecot's user names are not the same as the recipient email addresses of the user's, so I can not just execute deliver directly with the -d ${recipient} option. This hack prevented deliver's exit code to get recognized by postfix. Can you fix your dovecot-lda_wrapper.pl to either exec deliver, so that when it exits your process exits with the same number, or to do the Perl equivalent of exit $? - that is, exit the wrapper process with the exit code of the Dovecot LDA? -- Asheesh. -- Imitation is the sincerest form of television. -- Fred Allen
Re: [Dovecot] Please help me resolve why mail isn't being delivered to virtual users
On Fri, 11 Jan 2008, Andrew Falanga wrote: In the future, I shall endeavor to look more heavily for the answers before posting, or at least before assuming that no one on this list is willing to help. Thank you to all for the help given. Sure thing. If you have suggestions to improve the wiki, like by stating prerequisites, I'd say make the edits - the curmudgeons here won't remove them, and they could well help people. -- Asheesh. -- The horizon of many people is a circle with a radius of zero. They call this their point of view. -- Albert Einstein
Re: [Dovecot] Please help me resolve why mail isn't being delivered to virtual users
On Tue, 8 Jan 2008, Andrew Falanga wrote: On Jan 7, 2008 9:55 PM, Asheesh Laroia [EMAIL PROTECTED] wrote: On Mon, 7 Jan 2008, Andrew Falanga wrote: I have to admit that I'm not quite sure why no one has responded to me about this one. If I'm not providing enough information or incorrect information please tell me. It's quite important that this e-mail system be working. Well, I can try to help. In general that's what we'll all do, but we have other things to do in our lives, too. (-: Zeroth question: Why use virtual users rather than regular-old UNIX users? The regular way requires much less configuration, after all! Well, that is actually how I got things working. Now that Christmas is past, the church staff is returning to work full-throttle and had to have e-mail services. (About three weeks ago, the windoze system they were running died.) As to why to use virtual users, we were wanting to go that route because one thought is to give e-mail accounts to church members who want them. I was thinking that a better way of doing that would be through virtual users. One thought is to to give e-mail accounts to church members who want them - that's easy, just run the system adduser command! In my opinion, fiddling with virtual users is not usually worth the effort. (Now, if you have HUNDREDS OF THOUSANDS of users on one machine, then let's talk!) Basically - the above is a reason to use 'adduser', not a reason to use virtual users! If I'm wrong, please clarify my understanding. Ok, I will try that ASAP. I don't think that I'll get to it tonight (in fact, I'm sorry for taking so long to respond to this but I couldn't take a free minute at work today to respond). Also, since they're working now, at least through POP, the pressure is off. However, in the near future, I need to get IMAP and SSL working. Dovecot IMAP just works (tm) if you use system users, for IMAP and POP3 SSL and everything else wonderful. Why fiddle with virtual users when real users are just as good and easier to set up? I agree with you. I only asked here because I was trying to use the dovecot deliver program, as specified in that wiki page, and I thought that since this applies to everyone using dovecot (mail delivery) you all might know how I need to fix this. Well, I'm not using the Dovecot LDA myself (right now, at least), and another reply on this list explained that the same is true for many here. Best of luck - in general my rule for systems is to keep them as simple as possible. Virtual users can make things easier (like crazy massive user integration across disparate systems), but if you have no reason to use them just forget about them. -- Asheesh. -- Dry clean only.
Re: [Dovecot] Please help me resolve why mail isn't being delivered to virtual users
On Wed, 9 Jan 2008, Charles Marcus wrote: On 1/9/2008, Asheesh Laroia ([EMAIL PROTECTED]) wrote: Basically - the above is a reason to use 'adduser', not a reason to use virtual users! If I'm wrong, please clarify my understanding. My understanding is using Virtual Users is inherently more secure, since the users do not have system accounts, much less shell accounts. There should be a straightforward way to set their shell to something that prevents shell login but allows Dovecot login. Then they have their own separate security contexts (i.e., UID), so in the case that Dovecot goes horribly awry each user's data is isolated from the other's. I believe /bin/false will work for this; since it is not listed in /etc/shells, shell login will fail even with e.g. ssh [EMAIL PROTECTED] /bin/sh, but PAM should authorize the user for Dovecot. I would double-check this before using it in production. -- Asheesh. -- Life is difficult because it is non-linear.
Re: [Dovecot] Please help me resolve why mail isn't being delivered to virtual users
On Wed, 9 Jan 2008, Pascal Volk wrote: Am 09.01.2008 21:43 schrieb Asheesh Laroia: Not in the way I was describing: Let's say some person logs on to your Dovecot-based IMAP service and figures out how to take over Dovecot to read and modify arbitrary files on the system. (Timo, I hope this doesn't happen - but bear with me.) To be clear, Dovecot's imap handler runs as the UNIX UID associated with the user logging in, not root. In the virtual user setup that the thread starter described, the user shares his UNIX UID with the other virtual users on the system. So he has UNIX permission to read and write other users' mail. This will be only the case, if you have a poor™ setup. If the setup is done right, each imap/pop user will have it's on UID. And therefor each imap/pop process will run with the UID from the user. ,--[ `ps aux | grep imap | head -n 5` ]-- | 70001 5691 0.0 0.0 2676 1416 ?S12:45 0:00 imap | 70002 5693 0.0 0.0 2600 1212 ?S12:45 0:00 imap | 70014 5695 0.0 0.0 2676 1256 ?S12:45 0:00 imap | 70013 5696 0.0 0.0 2420 1164 ?S12:45 0:00 imap | 7 5698 0.0 0.0 2564 1200 ?S12:45 0:00 imap `-- In my setup where you assign separate UIDs to each user, the attacking user can only read/modify the files that he has UNIX filesystem permission to read/modify. That would limit the attacker to only being able to destroy his own mail, unlike the virtual user setup. Virtual users do not have all of their data jumbled together into one file, which seems to me anyway what you are referring to. No, I meant filesystem-level permissions. Obviously no one is talking about different users having all their data jumbled together into one file; sorry if I wasn't clear. Filesystem-level permissions are also possible with virtual Users: ,--[ `ls -l /srv/mail/1/70003 | tail -n 5` ]-- | drwx-- 3 70007 70003 4096 2007-12-31 17:48 70007 | drwx-- 3 70008 70003 4096 2007-10-16 23:07 70008 | drwx-- 3 70009 70003 4096 2007-10-16 23:08 70009 | drwx-- 3 70010 70003 4096 2007-10-16 23:08 70010 | drwx-- 3 70011 70003 4096 2007-12-31 18:19 70011 `-- As they say, I have been schooled. (-: My apologies - I wasn't aware of these virtual user with a UID setups. I was only aware of the virtual users all share a UID setup like the thread starter described. Can you provide a link to documentation on the system that you're describing? -- Asheesh. -- Chicken Little only has to be right once.
Re: [Dovecot] Sendmail, procmail, dovecot and quota
On Tue, 8 Jan 2008, papi mac wrote: I have Fedora 7 from a standard installation running sendmail, procmail and dovecot 1.0 installed on a single partition. I now need to set up mail quotas for most of the users but not all. Just protecting /var/spool/mail/$LOGNAME is probably good enough for me. Since I just want mail quotas and the installation is on just 1 partition I don't have an easy way to use file system quotas. By reading through the dovecot documentation and list archives I have the feeling that this is possible with the versions and setup I have. I would probably need a main line like this (apart from other lines) per user mailbox that needs to be managed: dirsize:/var/spool/mail/joe-user:storage 10240 to give joe-user a 10 mb limit. Full dislosure: I haven't actually used Dovecot's quotas. (-: Since this server is in production I don't have the luxury of experimenting (extensively) on it. I have a question though that I have not been able to answer yet. If the flow of mail goes from sendmail to procmail to the mailbox, how is it possible for dovecot to implement quotas on the inbox? Or would dovecot write something there that procmail has to honor? If you use the Dovecot delivery agent called deliver as the last chain, it will bounce the mail or not depending on of the user is above quota. -- Asheesh. -- When the wind is great, bow before it; when the wind is heavy, yield to it.
Re: [Dovecot] Sendmail, procmail, dovecot and quota
On Tue, 8 Jan 2008, papi mac wrote: You mean by having a procmail rule to send the mail on to dovecot for delivery? If so, what would the line in the procmail rule look like? Right, that's what I mean - at the end of the default procmail rules (like in /etc/procmailrc), pipe the message to deliver with the right arguments. I don't actually use deliver, either, but maybe others can say more, or maybe you can figure it out from here. -- Asheesh. -- Time washes clean Love's wounds unseen. That's what someone told me; But I don't know what it means. -- Linda Ronstadt, Long Long Time
Re: [Dovecot] Please help me resolve why mail isn't being delivered to virtual users
On Mon, 7 Jan 2008, Andrew Falanga wrote: I have to admit that I'm not quite sure why no one has responded to me about this one. If I'm not providing enough information or incorrect information please tell me. It's quite important that this e-mail system be working. Well, I can try to help. In general that's what we'll all do, but we have other things to do in our lives, too. (-: Zeroth question: Why use virtual users rather than regular-old UNIX users? The regular way requires much less configuration, after all! I have created a system user ID called vmail which is referenced in my PostgreSQL database for UID/GID stuff. All virtual user home directories and INBOXes are made owner vmail and group is users. First question: If you do 'su - vmail -s /bin/sh' you will get a shell running as user vmail. Run 'deliver' with the arguments it takes to deliver to a target user; does mail get delivered? If not, we better fix that first! Originally, I had my sendmail /etc/mail/aliases file setup to map all mail sent to these virtual users to the system user vmail. However, none of the virtual users were getting any mail and vmail was just getting swamped. After doing more digging, I found that I just didn't understand the home directories and INBOX, mbox and such. That's what drove me to configuring what's in there now. Now, following directions on this WIKI page: http://wiki.dovecot.org/LDA/Sendmail?highlight=%28deliver%29 I'm still unable to get the e-mail working for them. Continually, sendmail bails with errors saying it, Can't create output. Because I am using *.mc files, I made a new *.m4 file as directed in /usr/share/sendmail/cf/mailer. Can you turn up the verbosity from sendmail? Dovecot does allow the virtual users to login. In fact, when I did, the first time, there appears a mail directory in their home directories after login. This would indicate to me that the login was successful. Further, I cut/pasted a message sent to one of the virtual users from the vmail INBOX (/var/mail/vmail) into the virtual user's INBOX (/var/mail/jdunkin). Then, logged in as this virtual user and ACTUALLY got the mail. I know this stuff works. What must be done to make sendmail do its thing for deliver? So it sounds like Dovecot is fine and this is a sendmail question. We can try to help, but I don't use Sendmail (I do use Dovecot...), so it's not clear that we'll be able to. What is necessary to fix this situation? Reply with answers to 0 and 1 and we'll see where we can go. -- Asheesh. -- People are going to scream bloody murder about that. -- Seen on linux-kernel
[Dovecot] Dovecot indexing questions
I was playing with Dovecot 1.1 full text indexing through Squat in late October, which was working pretty well. I wanted to ask about this behavior I had: When an email arrives in INBOX using procmail (which delivers to my Maildirs), and I see it in Dovecot, when I next do a search (IMAP SEARCH TEXT) of that folder, the search takes a long time. Successive searches are lickety-split. My question is: Can there be an option to index greedily? As soon as Dovecot sees the message, I'd like it to update the Squat index. That way, searches are always fast. I guess this implies a small performance hit - namely, that my IMAP server spends CPU and disk time indexing every message at the first time it is seen rather than being able to do batch indexing each time SEARCH TEXT is issued. But when I think about that, that sounds like the server can waste its time so I don't waste mine - which is exactly why I like these computing machines! (That, and because I can waste my time programming them.) -- Asheesh. -- Use extra care when cleaning on stairs.
Re: [Dovecot] Delay on failed pw attempts
On Tue, 1 Jan 2008, Dean Brooks wrote: Hi, Is there a way, or can a way be added, to add an auth_failed_delay=10s style option that would put in an artificial delay after a failed password attempt? As it stands now, Dovecot seems highly vulnerable to widescale brute-force password dictionary scans. But not if you secure access to Dovecot using e.g. fail2ban. Why is adding complexity to Dovecot better than using a dedicated tool? -- Asheesh. -- Kites rise highest against the wind -- not with it. -- Winston Churchill
Re: [Dovecot] Delay on failed pw attempts
On Tue, 1 Jan 2008, Frank Kintrup wrote: Is there a way, or can a way be added, to add an auth_failed_delay=10s style option that would put in an artificial delay after a failed password attempt? As it stands now, Dovecot seems highly vulnerable to widescale brute-force password dictionary scans. Even if it's not configurable, can a delay be hardcoded to something like, say, 10 or 15 seconds? -- Dean Brooks [EMAIL PROTECTED] I recently installed an application called Fail2Ban (http://www.fail2ban.org), which scans log files and filters out failed login attempts. If a configurable number of failed attempts from the same IP is found, the IP is blocked out via iptables or hosts.deny for some time (default 10 minutes). Works pretty well for SSH, though I'm still waiting for the first attempt on my IMAP or SMTP ports ;-) Oops, you beat me to it! (-: Cheers Maybe you should write this up on the Dovecot wiki! -- Asheesh. -- Most people have a mind that's open by appointment only.
Re: [Dovecot] Help with logging in and getting mail
On Sat, 29 Dec 2007, Andrew Falanga wrote: On Saturday 29 December 2007 14:20:47 Timo Sirainen wrote: On Sat, 2007-12-29 at 14:00 -0700, Andrew Falanga wrote: mail_location: mbox:~/mail/:INBOX=/var/mail/%u .. userdb: driver: sql args: /usr/local/etc/dovecot-sql.conf .. Dec 29 15:01:54 whitbap dovecot: POP3(jdunkin): mkdir_parents(/var/mail/vmail//mail) failed: Not a directory Your SQL lookup returns /var/mail/vmail/ as the user's home directory. You'll need to have a proper per-user directory as their home. For example have the user_query return '/home/virtual/%u' as home. See http://wiki.dovecot.org/VirtualUsers#homedirs Ok, I'm beginning to grasp this. However, my understanding is still incomplete somehow. The changes I've made thus far are: 1) now, all virtual users have a home directory in /virtusers/%u 2) home field in the PostgreSQL database says, /virtusers/userid The errors as before are no longer being shown. However, as I stated before, I have sendmail configured with aliases to map a virtual users, such as jdunkin, to the system user vmail. This user is getting all the mail for the aliases (virtual user accounts). How do I get the mail to each virtual user? Sounds like you would like to call e.g. Dovecot Deliver from sendmail *based on the incoming username* instead of simply dropping the emails into vbox. -- Asheesh. -- Somebody's terminal is dropping bits. I found a pile of them over in the corner.
Re: [Dovecot] Upgrading from 1.0.rc2-1ubuntu2.2 on edgy
On Thu, 20 Dec 2007, Daragh Mc Grath wrote: Hi Guys, Can anyone shed some light as to how I upgrade away from 1.0.rc2-1ubuntu2.2 on edgy? The usual aptitude upgrades aren't doing anything for me, and, downloading the package from another Ubuntu release, and trying a dpkg -i is causing lots of dependency errors. In my (strong) opinion (based in years of using Ubuntu and Debian), the easiest way will be to compile Dovecot yourself, but to do it using the Debian packaging so that what you have is a proper .deb. 1. Add this line to /etc/apt/sources.list: deb-src http://ftp.us.debian.org/debian/ unstable main This adds Debian *source* to your sources.list, but no binary packages, so you will be sure to not accidentally get Deibian packages. 2. $ sudo aptitude update We need to refresh the sources.list. 3. $ sudo aptitude install apt-src We'll use apt-src to make the compiling step really easy. 4. $ sudo apt-src -bi install dovecot This will download the source package, then build it, and then install it! That should be all. This will take you to 1.0.9, it'll be really easy, and you'll be using the Debian package so you won't have to fight your package manager later. When 1.1.0 is released, the same process will get you 1.1.0 as soon as http://packages.debian.org/sid/dovecot-imapd says it has 1.1.0. -- Asheesh. -- I generally avoid temptation unless I can't resist it. -- Mae West
Re: [Dovecot] Fishing attempt locking up dovecot
On Tue, 11 Dec 2007, Patrick Milvich wrote: I've mentioned this before but only heard from one other person who has experienced this, but it's becoming a pretty serious issue. The situation: A spammer sets a bot on a fishing attempt to gain email addresses, causing numerous login processes to spawn and suck up all available resources. Sounds like you could avoid this problem if you configured fail2ban to block the spammer trying all these logins. However, the underlying problem with Dovecot would remain, and so it is worth fixing that too! -- Asheesh. -- The speed of anything depends on the flow of everything.
Re: [Dovecot] disconnect after too many errors?
On Sat, 8 Dec 2007, Peter Hessler wrote: There are a couple of jerks that are tying to dictionary attack my email server, and one of the vectors is pop3/imap logins. Something I would like to do in dovecot, but can't seem to find, is the ability to disconnect after a certain number of errors. The vast majority of my users (i.e. me) don't hand-type POP3 or IMAP transactions, but when we do, we know how to spell things properly. Another suggestion via PAM: pam_shield blocks IPs http://www.ka.sara.nl/home/walter/pam%5Fshield/README.txt describes http://www.ka.sara.nl/home/walter/pam%5Fshield/ . I still think that fail2ban is a better approach. -- Asheesh. -- Sendmail may be safely run set-user-id to root. -- Eric Allman, Sendmail Installation Guide
Re: [Dovecot] disconnect after too many errors?
On Sat, 8 Dec 2007, Peter Hessler wrote: There are a couple of jerks that are tying to dictionary attack my email server, and one of the vectors is pop3/imap logins. Something I would like to do in dovecot, but can't seem to find, is the ability to disconnect after a certain number of errors. The vast majority of my users (i.e. me) don't hand-type POP3 or IMAP transactions, but when we do, we know how to spell things properly. I would use fail2ban, which listens for log files and then adds firewall rules banning the idiots or alternately uses hosts.deny to ban the idiots. (I personally prefer the use of hosts.deny.) -- Asheesh. -- Do you know the difference between a yankee and a damyankee? A yankee comes south to *visit*.
Re: [Dovecot] procmail/formail -- Maildir
On Mon, 3 Dec 2007, Andre Huebner wrote: Hello List, i switched mailformat from mbox to maildir. Now i have a little problem with procmail/formail and headermanipulation of mails. Here an example: 0 * ^From.*gmx.de | (formail -t -Iprocmail: gmx.de) /var/spool/mail/xx You can ask Procmail to deliver to a Maildir. For example: :0 Waf * ^From:.*gmx.de | formail -A procmail: gmx.de This uses formail as a filter, so that the message is transformed but the transformed message is available for later rules. Once procmail falls off the end of its rules, it will deliver the message (now the transformed message) to the default mail spool. If you put these settings at the top of .procmailrc: MAILDIR=${HOME}/Maildir DEFAULT=./ then the default mail spool is a Maildir! I hope that helps. -- Asheesh. -- You're never too old to become younger. -- Mae West
Re: [Dovecot] Can't login from Mac OS X Mail.app
On Tue, 27 Nov 2007, Mike McGonagle wrote: Hello all, I have been working on getting this machine Hi, Mike - can you be more specific as to what the problem you're having is? -- Asheesh. -- It's better to burn out than it is to rust.
Re: [Dovecot] Getting two mails.....
On Tue, 20 Nov 2007, Bjørn T Johansen wrote: When I receive a mail that is addressed to my email address and also with a cc to a mailinglist I subscribe to, I get two mails, which I guess is expected... But I have just moved to Dovecot from Cyrus, and Cyrus seems to know that this is the same mail, so only one of those two mail is stored on the imap srv... Is there some option I am missing in Dovecot or isn't this possible using Dovecot? FWIW I use procmail to filter these things out; look for The first is out of man procmailex and deals with duplicate messages. It should be the very first recipe, and looks like this: at http://www.onlamp.com/pub/a/bsd/2001/12/06/FreeBSD_Basics.html?page=last . -- Asheesh. -- Don't wake me up too soon... Gonna take a ride across the moon... You and me.
Re: [Dovecot] mail_location backends
On Mon, 19 Nov 2007, Harrison Metzger wrote: Hello, Where I work we have have an interesting setup, we have 2 machines with mail accounts on them and both have dovecot. We would really like to centralize all the mail accounts on one machine, but unfortunately the administration has not approved it. However, if we could create the illusion that they are on the same machine that would be acceptable. Check out the Dovecot IMAP proxy, or a separate IMAP proxy project maybe? -- Asheesh. -- The ratio of literacy to illiteracy is a constant, but nowadays the illiterates can read. -- Alberto Moravia
Re: [Dovecot] Search inside body of message
On Sat, 17 Nov 2007, Nikolay Shopik wrote: Yes I'm using deb. Well to make things easier for you I've just tested using other email client (Mullberry). Seems Thunderbird screwup something in encoding (same thing as renaming folders). So that's not dovecot problem ;). That's a drag - follow Timo's steps for the transcript of Mulberry and the transcript of Thunderbird, and file a Thunderbird bug! (-: If you're tired of this and want someone else to, I might be willing to help. -- Asheesh. -- All is well that ends well. -- John Heywood
Re: [Dovecot] Problems executing dovecot.
On Thu, 15 Nov 2007, Marcelo Iturbe wrote: 112 copy 1:100 toBeProcessed Connection to host lost. I keep getting dropped... Does /var/log/syslog say anything interesting? -- Asheesh. -- Real Men don't make backups. They upload it via ftp and let the world mirror it. -- Linus Torvalds
Re: [Dovecot] New full text search indexer
On Wed, 14 Nov 2007, Daniel Watts wrote: Timo - we were just having a conversation about how we might be able to provide full body indexed search for our clients and I realised it might be worth checking the Dovecot list to see if this has been done already... And then I find this thread! What is the latest? Searches in the headers work fantastically but any search in a sizeable folder (1000's messages) often just time out. FWIW in 1.1beta releases, you can enable the squat plugin and get full-text indexed search already. Timo's working on improvements, as you can see, and a replacement, but don't forget that Squat is real and pretty fast. To enable it, do: 1. In the protocol imap { section of the config, add this line to the end: mail_plugins = fts fts_squat Do that just before the close curly brace. 2. If you have a plugin { section of the dovecot.conf, do 2(a). Otherwise, do 2(b). 2a. In the plugin { section, add this line to the end: fts = squat 2b. At the end of the file, write this: plugin { fts = squat } That should be all! SEARCH TEXT will be, shall we say, accelerated. (Note that indexes have to be generated sometime, so the way things are now they're generated at the first SEARCH TEXT.) -- Asheesh. -- Is it clean in other dimensions?
Re: [Dovecot] New full text search indexer
On Wed, 14 Nov 2007, Adam McDougall wrote: Thanks for this list of steps, I've been intending to test it and was just about getting ready to ask the same question. Your email would be mice content to throw on the dovecot wiki under fts (currently empty) Good point, but you do it, it's bedtime here in Japan. (-: -- Asheesh. -- One good reason why computers can do more work than people is that they never have to stop and answer the phone.
Re: [Dovecot] dovecot.index mtime
On Wed, 14 Nov 2007, Matt wrote: Another annoying thing about Exim is it checks if a user is over quotta after it has accepted a message. It then trys to write the message to the users ./new directory and at that point generates a bounce. Meaning over quotta accounts generate alot of bounces to junk mail that have invalid source email addresses from the start. One of the reasons I want to auto suspend unused email accounts. Maybe telling Exim to deliver using the dovecot local delivery agent (called deliver) would fix that issue? -- Asheesh. -- Besides, I think [Slackware] sounds better than 'Microsoft,' don't you? (By Patrick Volkerding)
Re: [Dovecot] mail-sql update
On Mon, 12 Nov 2007, Timo Sirainen wrote: On Mon, 2007-11-12 at 20:07 +0200, Timo Sirainen wrote: Wasted a bit of time getting it to work again. It's horribly inefficient when saving messages and EXPUNGE seems to be somewhat broken, but at least it kinda works. :) http://dovecot.org/patches/mail-sql.patch http://dovecot.org/patches/mail-sql.tar.gz Oh, and it requires the latest v1.1 code tree from hg (or the next nightly snapshot). I did a few fixes to lib-sql. Why not maintain the patch as an hg branch and tell people to get it that way? -- Asheesh. -- Prices subject to change without notice.
[Dovecot] 1.0beta7 still has SEARCH TEXT not search the FROM
I just tried out 1.0beta7 and erased all my indexes and with fts and fts_squat enabled, and when I SEARCH TEXT in Dovecot, it does *not* find messages where the thing I SEARCH for appear only in the From: header. Timo, can you confirm or deny that you still see this behavior? I did clear my indexes before doing it. -- Asheesh. -- Man is the measure of all things. -- Protagoras
Re: [Dovecot] 1.0beta7 still has SEARCH TEXT not search the FROM
On Sat, 10 Nov 2007, Asheesh Laroia wrote: I just tried out 1.0beta7 Er, I mean 1.1beta7. -- Asheesh. -- The first requisite for immortality is death. -- Stanislaw Lem
Re: [Dovecot] Couldn't init INBOX: Can't sync mailbox: Messages keep getting expunged
On Mon, 5 Nov 2007, Tom Sommer wrote: On Sat, November 3, 2007 22:18, Timo Sirainen wrote: On Sat, 2007-11-03 at 14:20 +0100, Tom Sommer wrote: After updating Dovecot, From what version? I think it's related to the change in the cache files. I had a customer who couldn't see any mails in their inbox, what so ever - there were plenty of files in the cur/ folder though. It'd be way nice if Dovecot, upon detecting index etc. insanity, renamed the Dovecot index etc. to dovecot.index.bork and regenerated them. Of course, it may already do that and I've just not been paying attention. (-: -- Asheesh. -- As in certain cults it is possible to kill a process if you know its true name. -- Ken Thompson and Dennis M. Ritchie
Re: [Dovecot] MANAGESIEVE patch v8 for dovecot 1.0.7
On Fri, 2 Nov 2007, Andreas Schneider wrote: Stephan Bosch wrote: Hello dovecot users, Hi Stephan, Have fun testing the patch. Don't hesitate to notify me when there are problems. I've configured horde today and if I try to access managesieve it segfaults. dovecot-infolog: dovecot: 2007-11-02 14:09:49 Info: MANAGESIEVE([EMAIL PROTECTED]): Effective uid=150, gid=12, home=/srv/mail/homes/[EMAIL PROTECTED]/ dovecot: 2007-11-02 14:09:49 Info: MANAGESIEVE([EMAIL PROTECTED]): sieve-storage: using mail-data: maildir:/srv/mail/[EMAIL PROTECTED]/ dovecot: 2007-11-02 14:09:49 Info: MANAGESIEVE([EMAIL PROTECTED]): sieve-storage: using active sieve script path: ~/.dovecot.sieve dovecot: 2007-11-02 14:09:49 Info: MANAGESIEVE([EMAIL PROTECTED]): sieve-storage: using sieve script storage directory: /srv/mail/[EMAIL PROTECTED]//sieve dovecot: 2007-11-02 14:09:49 Info: MANAGESIEVE([EMAIL PROTECTED]): sieve-storage: relative path to sieve storage in active link: /srv/mail/[EMAIL PROTECTED]//sieve/ dovecot: 2007-11-02 14:09:49 Info: MANAGESIEVE([EMAIL PROTECTED]): Disconnected messages: Nov 2 14:09:49 milliways kernel: managesieve-log[24857]: segfault at rip rsp 7fffaf9e6398 error 14 How can I help to debug it? I guess you could attach gdb to the managesieve process. See http://wiki.dovecot.org/MainConfig?highlight=%28gdb%29 . -- Asheesh. -- To err is human, To purr feline. -- Robert Byrne
Re: [Dovecot] sync with gmail?
On Thu, 1 Nov 2007, Neal Becker wrote: I tried Imap-Maildir. That was easy to setup without messing up my existing imap (just use cp -al old-maildir new-maildir). I guess to do Imap-Imap I could create another user account on my dovecot server (I'm the only user on that system, it's just using local accounts and local unix auth). Yeah, I guess you could try it, but it's even less likely to work than IMAP-Maildir. .offlineimaprc is attached. I wanted to try syncing just 1 folder (fetchmail). I've never used offlineimap before, and was just guessing at some of the settings. Your settings look reasonable. Try on the offlineimap list. -- Asheesh. -- Chemist who falls in acid is absorbed in work.
Re: [Dovecot] Assertion failed: (pos input-size)
On Sun, 21 Oct 2007, Asheesh Laroia wrote: Well, hg bisect doesn't seem to be helping me find the answer. I fear that the real problem is in base64_decode, but for now I'm going to sleep instead of drowsily being confused by a debugger. For what it's worth, http://paulproteus.acm.jhu.edu/bug-report/2007-10-22/index_crash.tar.gz causes this assertion fail consistently. This is a tarred-up Maildir (with Dovecot metadata you can feel free to remove) with one message in it. I don't currently have a clue what's going on, but having a small test case may be of use. -- Asheesh. -- Help! I'm trapped in a Chinese computer factory!
Re: [Dovecot] Assertion failed: (pos input-size)
On Sun, 21 Oct 2007, Asheesh Laroia wrote: I fear that the real problem is in base64_decode, but for now I'm going to sleep instead of drowsily being confused by a debugger. When I add the attached patch, which just adds two asserts toward the end of base64_decode(), I can get base64_decode to admit that it advanced the pos pointer beyond where it should be. The asserts are src_pos = src_size because the loops will advance src_pos to the point where it is == src_size. It'd be nice if that didn't happen, and the value of src_pos were always valid, but here I've shown that it gets advanced even beyond == ! (Earlier, I was asserting src_pos src_size, and then every use of base64_decode caused the assertion to fail, so I couldn't even log in.) I'm still testing with the Maildir I linked to last night. It'd be great to know if these new asserts are reasonable, and if so, what sorts of code changes might make them stop failing. (-: -- Asheesh. -- It has long been an axiom of mine that the little things are infinitely the most important. -- Sir Arthur Conan Doyle, A Case of Identitydiff -r 1478fc5cf632 src/lib/base64.c --- a/src/lib/base64.c Sun Oct 21 20:36:35 2007 +0300 +++ b/src/lib/base64.c Mon Oct 22 10:11:40 2007 -0700 @@ -128,6 +128,8 @@ int base64_decode(const void *src, size_ buffer_append(dest, output, 3); } + i_assert(src_pos = src_size); + for (; src_pos src_size; src_pos++) { if (!IS_EMPTY(src_c[src_pos])) break; @@ -136,6 +138,7 @@ int base64_decode(const void *src, size_ if (src_pos_r != NULL) *src_pos_r = src_pos; + i_assert(src_pos = src_size); return ret; }
Re: [Dovecot] Assertion failed: (pos input-size)
On Mon, 22 Oct 2007, Timo Sirainen wrote: On Mon, 2007-10-22 at 10:16 -0700, Asheesh Laroia wrote: On Sun, 21 Oct 2007, Asheesh Laroia wrote: I fear that the real problem is in base64_decode, but for now I'm going to sleep instead of drowsily being confused by a debugger. When I add the attached patch, which just adds two asserts toward the end of base64_decode(), I can get base64_decode to admit that it advanced the pos pointer beyond where it should be. I guess this fixes it: http://hg.dovecot.org/dovecot/rev/d81a50101724 Indeed it does! Super fast searches are go, and seem to give the right results. (-: In fact, SEARCH TEXT (instantaneous) seems to be a lot faster than SEARCH FROM (a few seconds) right now! -- Asheesh. -- Out of sight is out of mind. -- Arthur Clough
[Dovecot] SEARCH TEXT does not seem to search headers
The RFC says http://www.isi.edu/in-notes/rfc3501.txt this: TEXT string Messages that contain the specified string in the header or body of the message. But with the current hg tip (see linked rawlogs), SEARCH TEXT provides results disjoint from SEARCH FROM. I guess that's a bug? http://paulproteus.acm.jhu.edu/bug-report/2007-10-22/20071022-125604-622.out and http://paulproteus.acm.jhu.edu/bug-report/2007-10-22/20071022-125604-622.in -- Asheesh. P.S. Sorry to be so noisy lately -- And that's the way it is... -- Walter Cronkite
[Dovecot] Problem building Dovecot from hg
I did an hg pull; hg update, and now my Dovecot working copy doesn't build: ../../src/lib-storage/index/dbox/libstorage_dbox.a(dbox-file.o): In function `dbox_file_metadata_get': /home/paulproteus/dnlds/dovecot/src/lib-storage/index/dbox/dbox-file.c:820: undefined reference to `dbox_file_maildir_metadata_get' collect2: ld returned 1 exit status make[3]: *** [imap] Error 1 make[3]: Leaving directory `/home/paulproteus/dnlds/dovecot/src/imap' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/paulproteus/dnlds/dovecot/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/paulproteus/dnlds/dovecot' make: *** [all] Error 2 I made it compile on my system by commenting out the return on that line and making it return NULL, but presumably you want it to actually do something. (-: -- Asheesh. -- Virtue does not always demand a heavy sacrifice -- only the willingness to make it when necessary. -- Frederick Dunn
[Dovecot] Segfault by asking for a folder?
I 'hg pull'ed and now my Dovecot segfaults when I select a particular folder. I've removed all files with 'index' in the name, so I don't think it's due to bad indexes. Oct 21 09:18:40 alchemy dovecot: Dovecot v1.1.beta3 starting up Oct 21 09:18:47 alchemy dovecot: imap-login: Login: user=paulproteus, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS Oct 21 09:18:47 alchemy dovecot: child 28714 (imap) killed with signal 11 is in syslog. I haven't stripped the binaries as far as I know, yet here's what seems to happen in gdb: [EMAIL PROTECTED]:~/dovecot.rawlog $ gdb dovecot [snip] This GDB was configured as i486-linux-gnu... Using host libthread_db library /lib/tls/i686/cmov/libthread_db.so.1. (gdb) set args --exec-mail imap (gdb) run Starting program: /usr/local/sbin/dovecot --exec-mail imap * PREAUTH [CAPABILITY IMAP4rev1 SASL-IR SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS UIDPLUS LIST-EXTENDED] Logged in as paulproteus 01 SELECT pinerc Program received signal SIGSEGV, Segmentation fault. Cannot remove breakpoints because program is no longer writable. It might be running in another process. Further execution is probably impossible. 0x08073d0d in ?? () (gdb) bt #0 0x08073d0d in ?? () #1 0xbff92f70 in ?? () #2 0x in ?? () (gdb) bt full #0 0x08073d0d in ?? () No symbol table info available. #1 0xbff92f70 in ?? () No symbol table info available. #2 0x in ?? () No symbol table info available. (gdb) Uh? It seems to also segfault the same way if I select INBOX. -- Asheesh. -- You'll never see all the places, or read all the books, but fortunately, they're not all recommended.
Re: [Dovecot] Upgrade from 1.0.1 - 1.0.5 failed (rc 75)
On Sun, 21 Oct 2007, Andy Shellam (Mailing Lists) wrote: deliver([EMAIL PROTECTED]): Oct 21 17:19:49 Fatal: chroot(/users/mail/[EMAIL PROTECTED]) failed: Operation not permitted Only programs running as UID 0 (root) are allowed to use the chroot system call. Does your use of chroot() for deliver represent something new in your config, or if not, in the way Dovecot interprets your config? -- Asheesh. -- A reverend wanted to telephone another reverend. He told the operator, This is a parson to parson call.
Re: [Dovecot] Segfault by asking for a folder?
On Sun, 21 Oct 2007, Asheesh Laroia wrote: I 'hg pull'ed and now my Dovecot segfaults when I select a particular folder. I've removed all files with 'index' in the name, so I don't think it's due to bad indexes. I 'hg bisect'ed between 1.1.beta3 and the tip with this as my test: sh autogen.sh ./configure make sudo make install echo 'lol SELECT pinerc' | dovecot --exec-mail imap If it didn't segfault, I would tell hg 'hg bisect good'; if it did, I did 'hg bisect bad'. At the end of it all, hg told me: [EMAIL PROTECTED]:~/dnlds/dovecot $ hg bisect good The first bad revision is: changeset: 6599:a6f51026b969 branch: HEAD user:Timo Sirainen [EMAIL PROTECTED] date:Sun Oct 21 18:54:32 2007 +0300 summary: Added maildir_uidlist_init_readonly() and maildir_uidlist_get_uid(). I haven't actually examined this changeset (yet? perhaps tomorrow), but hopefully finding it as the problem will help figure out what's up. This was my first VCS-coordinated bisection. Yippee! -- Asheesh. -- Being against torture ought to be sort of a multipartisan thing. -- Karl Lehenbauer, as amended by Jeff Daiell, a Libertarian
Re: [Dovecot] Segfault by asking for a folder?
On Sun, 21 Oct 2007, Asheesh Laroia wrote: I 'hg bisect'ed between 1.1.beta3 and the tip with this as my test: Actually, now, tip is fixed. Thanks Timo! -- Asheesh. -- Teutonic: Not enough gin.