Re: [Dovecot] mbox, hierarchical folders/folders and IMAP
On 12/24/2011 10:26 AM, Alexander Chekalin wrote: > Stan, thank you for the reply, > > But I believe I obey this rule: I create "folder with ONLY folders inside", > then in it another "folder with ONLY folders inside", and the into this > second folder I create "folder with ONLY messages inside" (the path is > "oldmail/lists/dovecot", and oldmail and lists are folders in filesystem, > while dovecot is mbox container in filesystem). > > My problem is I can not understand which way should I create "folder with > ONLY folders inside", and which way to create messages-only folder, going > down to IMAP protocol commands. PHP for example looks like use only one > command to create a mailbox, no difference what type of it I need. > > I understand PHP isn't the only script language to deal with IMAP, so I seek > for advice how IMAP works with on protocol level. Ah, ok. I didn't fully understand your issue. Maybe Timo, or someone else, knows the necessary imap folder creation command sequence for this. -- Stan
Re: [Dovecot] sieve in sql or reporting
On Dec 23, 2011, at 8:35 PM, Stephan Bosch wrote: > On 12/24/2011 5:26 AM, Stephan Bosch wrote: >> On 12/24/2011 3:28 AM, Bradley Giesbrecht wrote: >>> With dovecot2 and pigeonhole sieve/managesieve is it currently possible to >>> store sieve rules in an sql database? >> Unfortunately, not yet. It is listed somewhere on the TODO list, but it does >> not have high priority so far. >> >>> If not is there a way to query all accounts; looking for things like active >>> vacation rules? >> >> I'm working on an evolution of the sieve_pipe plugin called the >> sieve_extprograms plugin. One of the things it adds is a new action command >> called "execute", which may suit your needs. It will only be available for >> Dovecot v2.1 though. You can read the latest version of the specification >> here (example 4 should match your application): >> >> http://hg.rename-it.nl/pigeonhole-0.3-sieve-extprograms/raw-file/tip/doc/rfc/spec-bosch-sieve-extprograms.txt >> > > Oh btw, if you are looking for a way to disable vacation rules after some > period of time, you can use the date extension > (http://tools.ietf.org/html/rfc5260#section-4). For example: > > require ["date", "relational", "vacation"]; > > if currentdate :value "le" "date" "2011-12-09" { > vacation "I'm out of office this week. I'll be back on Saturday 10th to > reply to your e-mails."; > } Stephan, thank you for both responses. My idea was to add sieve rules to a report so I could look up an email address and explain to the user why things happen. I can read in the users sieve scripts from the file system, or put them into sql myself for that matter. If a managesieve query command already existed I would use that. Regards, Bradley Geisbrecht
Re: [Dovecot] mbox, hierarchical folders/folders and IMAP
Stan, thank you for the reply, But I believe I obey this rule: I create "folder with ONLY folders inside", then in it another "folder with ONLY folders inside", and the into this second folder I create "folder with ONLY messages inside" (the path is "oldmail/lists/dovecot", and oldmail and lists are folders in filesystem, while dovecot is mbox container in filesystem). My problem is I can not understand which way should I create "folder with ONLY folders inside", and which way to create messages-only folder, going down to IMAP protocol commands. PHP for example looks like use only one command to create a mailbox, no difference what type of it I need. I understand PHP isn't the only script language to deal with IMAP, so I seek for advice how IMAP works with on protocol level. 24.12.2011, в 13:31, Stan Hoeppner написал(а): > On 12/23/2011 10:00 AM, Alexander Chekalin wrote: >> Hello, >> >> I'm now dealing with funny problem. I try to use Dovecot (2.1.rc1, >> actually) and mbox format to store old mailing, to keep logic of "one >> folder = one file". >> >> If I'd choose Maildir, I'd be able to create hierarchical folders (like >> "OldMail -> Maillists -> Dovecot"), and in fact on disk such a folders >> would be stored as real folders with dots in their names. In PHP it is >> easy to create with "imap_createmailbox()" function, I'd simple fire it >> 3 times (for "OldMail", for "OldMail.Maillists" and for >> "OldMail.Maillists.Dovecot"). >> >> But when I do the same with mbox, in fact it creates separate files >> (indeed, named "OldMail", "OldMail.Maillists" and >> "OldMail.Maillists.Dovecot") instead of creating filesystem folders >> ("OldMail/Maillists/Dovecot"). PHP is not guilty, Thunderbird won't >> create such folders as well. I can only create folders myself (say, with >> mkdir in the shell), chown it, and the it perfectly works in IMAP. >> >> Now I just wanted to know, are there any way to create IMAP-folders and >> subfolders using standard IMAP functionality? > > Yes. This has been common knowledge for many years, and is covered by > lots of documentation, including dovecot and tbird docs. With mbox > storage, an IMAP FOLDER contains only sub folders or it contains only > messages. It CANNOT contain BOTH. Thunderbird forces you to answer > this question each time you create a new IMAP FOLDER in the account root > tree. Surely you've seen the radio buttons in the new folder creation box. > > -- > Stan >
[Dovecot] Compressing existing maildirs
I've just enabled zlib for our users, and am looking at how to compress the existing files. The routine for doing this at http://wiki2.dovecot.org/Plugins/Zlib seems a bit complicated. What do you think about simply doing: find /var/vmail -type f -name "*,S=*" -mtime +1 -exec gzip -S Z -6 '{}' + I.e. find all maildir-files: - with size in the name ("*,S=*") - modified before I enabled zlib plugin - compress them - add the Z suffix - keep timestamps (gzip does that by default) It's of course racy without the maildirlock, but are there any other problems with this approach ? -jf
Re: [Dovecot] OT: sieve in sql or reporting
Am 24.12.2011 12:30, schrieb Stephan Bosch: > On 12/24/2011 11:53 AM, Jerry wrote: >> I know this isn't strictly part of this topic; however, I was wondering >> if sieve had acquired the ability to "forward as attachment" a received >> email? I know it did not have that ability previously. It is something >> that I could really use. > > In the standard Sieve language this is still not possible. It is > possible to "enclose" an e-mail, but it is explicitly not allowed to > redirect something like that; it can only be stored. I still don't know > why. Also, the enclose extension is not implemented for Pigeonhole so far. > > If you need it for a very specific task, you can try the sieve_pipe > plugin for Dovecot v2.0: > > http://wiki2.dovecot.org/Pigeonhole/Sieve/Plugins/Pipe > > You can then write your own script that does the forward-as-attachment > action. As I indicated earlier, I'm working on a more intricate plugin > for Dovecot v2.1. > > Regards, > > Stephan > many people would like to see "forward as attachment" in sieve but i guess there must be good tec reasons why it was not done since yet i thought about it as an advanced notify action ? that should be possible Merry X-Mas ! -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria
Re: [Dovecot] OT: sieve in sql or reporting
On Sat, 24 Dec 2011 12:30:00 +0100 Stephan Bosch articulated: > On 12/24/2011 11:53 AM, Jerry wrote: > > I know this isn't strictly part of this topic; however, I was > > wondering if sieve had acquired the ability to "forward as > > attachment" a received email? I know it did not have that ability > > previously. It is something that I could really use. > > In the standard Sieve language this is still not possible. It is > possible to "enclose" an e-mail, but it is explicitly not allowed to > redirect something like that; it can only be stored. I still don't > know why. Also, the enclose extension is not implemented for > Pigeonhole so far. > > If you need it for a very specific task, you can try the sieve_pipe > plugin for Dovecot v2.0: > > http://wiki2.dovecot.org/Pigeonhole/Sieve/Plugins/Pipe > > You can then write your own script that does the > forward-as-attachment action. As I indicated earlier, I'm working on > a more intricate plugin for Dovecot v2.1. Thank you very much for your extremely rapid response. -- Jerry ♔ Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the Reply-To header. __
Re: [Dovecot] OT: sieve in sql or reporting
On 12/24/2011 11:53 AM, Jerry wrote: I know this isn't strictly part of this topic; however, I was wondering if sieve had acquired the ability to "forward as attachment" a received email? I know it did not have that ability previously. It is something that I could really use. In the standard Sieve language this is still not possible. It is possible to "enclose" an e-mail, but it is explicitly not allowed to redirect something like that; it can only be stored. I still don't know why. Also, the enclose extension is not implemented for Pigeonhole so far. If you need it for a very specific task, you can try the sieve_pipe plugin for Dovecot v2.0: http://wiki2.dovecot.org/Pigeonhole/Sieve/Plugins/Pipe You can then write your own script that does the forward-as-attachment action. As I indicated earlier, I'm working on a more intricate plugin for Dovecot v2.1. Regards, Stephan
Re: [Dovecot] dovecot / postfix mail bounce problem
On Fri, 23 Dec 2011 08:02:25 -0800 (PST) IcedEarth articulated: > > Hello, > > i use a globalsieve rule to collect spam for all mail accounts in a > specific mailbox. > > Here is the code: > > vi /var/vmail/globalsieverc > > require ["fileinto"]; > # Move spam to junk folder > if not address :is "to" "antis...@xxx.com" { >if header :contains "X-Spam-Flag" ["YES"] { > redirect "antis...@xxx.com"; > stop; >} > } > > But the spam mails are not delivered. > > cat /var/log/mail.info > > postfix/pipe[32301]: AD8F78E2128D: to=, > relay=dovecot, delay=0.14, delays=0.08/0/0/0.06, dsn=5.4.6, > status=bounced (mail forwarding loop for antis...@xxx.de) > > Why is there a loop? I don't unterstand that. This question really belongs on the Postfix forum. Please read the directions for posting on that forum first. http://www.postfix.com/DEBUG_README.html Pay attention to the "Reporting problems to postfix-us...@postfix.org" section at the end of the article. -- Jerry ♔ Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the Reply-To header. __ Be frank and explicit with your lawyer ... it is his business to confuse the issue afterwards.
Re: [Dovecot] OT: sieve in sql or reporting
On Sat, 24 Dec 2011 05:35:59 +0100 Stephan Bosch articulated: > On 12/24/2011 5:26 AM, Stephan Bosch wrote: > > On 12/24/2011 3:28 AM, Bradley Giesbrecht wrote: > >> With dovecot2 and pigeonhole sieve/managesieve is it currently > >> possible to store sieve rules in an sql database? > > Unfortunately, not yet. It is listed somewhere on the TODO list, > > but it does not have high priority so far. > > > >> If not is there a way to query all accounts; looking for things > >> like active vacation rules? > > > > I'm working on an evolution of the sieve_pipe plugin called the > > sieve_extprograms plugin. One of the things it adds is a new action > > command called "execute", which may suit your needs. It will only > > be available for Dovecot v2.1 though. You can read the latest > > version of the specification here (example 4 should match your > > application): > > > > http://hg.rename-it.nl/pigeonhole-0.3-sieve-extprograms/raw-file/tip/doc/rfc/spec-bosch-sieve-extprograms.txt > > > > > > Oh btw, if you are looking for a way to disable vacation rules after > some period of time, you can use the date extension > (http://tools.ietf.org/html/rfc5260#section-4). For example: > > require ["date", "relational", "vacation"]; > > if currentdate :value "le" "date" "2011-12-09" { > vacation "I'm out of office this week. I'll be back on > Saturday 10th to reply to your e-mails."; > } I know this isn't strictly part of this topic; however, I was wondering if sieve had acquired the ability to "forward as attachment" a received email? I know it did not have that ability previously. It is something that I could really use. -- Jerry ♔ Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the Reply-To header. __
Re: [Dovecot] Corrupted index cache file and high CPU usage
On 12/23/2011 11:08 AM, hydra wrote: > Selinux wasn't running. > > I can reproduce the problem with this setup: > > - restore the maildir with the broken index.cache > - run `/usr/bin/doveadm -D expunge -A mailbox Trash savedbefore 1w` in an > infinite loop > - use horde webmail to access the mail with IMAP > - randomly display messages > > I could reproduce the problem on: > Linux-2.6.37-hardened-r7 > Linux-2.6.39-hardened-r8 > Linux-3.0.4-hardened-r5 > Linux-3.0.6-gentoo > Linux-3.1.4-gentoo > > However I failed to reproduce the problem on: > Linux-2.6.36-hardened-r9 > > So it seems it was introduced in 2.6.37. I'm going to inspect it later on. > By wishing you a God blessed merry Christmas I thank you for the support ;) Aha, cool. Glad you're making some progress, and that you now know it's kernel related in some way, just as Timo suspected. Keep in mind it may not necessarily be a code change problem in 2.6.37 onward. Could be a compiler/linker issue. It could also be the default EXT4 journal behavior changed (I haven't checked), or something similar. Merry Christmas to you as well hydra. I don't really deserve much credit for support here. I've just nudged you in the direction you already knew you should be heading. :) Best regards, -- Stan
Re: [Dovecot] mbox, hierarchical folders/folders and IMAP
On 12/23/2011 10:00 AM, Alexander Chekalin wrote: > Hello, > > I'm now dealing with funny problem. I try to use Dovecot (2.1.rc1, > actually) and mbox format to store old mailing, to keep logic of "one > folder = one file". > > If I'd choose Maildir, I'd be able to create hierarchical folders (like > "OldMail -> Maillists -> Dovecot"), and in fact on disk such a folders > would be stored as real folders with dots in their names. In PHP it is > easy to create with "imap_createmailbox()" function, I'd simple fire it > 3 times (for "OldMail", for "OldMail.Maillists" and for > "OldMail.Maillists.Dovecot"). > > But when I do the same with mbox, in fact it creates separate files > (indeed, named "OldMail", "OldMail.Maillists" and > "OldMail.Maillists.Dovecot") instead of creating filesystem folders > ("OldMail/Maillists/Dovecot"). PHP is not guilty, Thunderbird won't > create such folders as well. I can only create folders myself (say, with > mkdir in the shell), chown it, and the it perfectly works in IMAP. > > Now I just wanted to know, are there any way to create IMAP-folders and > subfolders using standard IMAP functionality? Yes. This has been common knowledge for many years, and is covered by lots of documentation, including dovecot and tbird docs. With mbox storage, an IMAP FOLDER contains only sub folders or it contains only messages. It CANNOT contain BOTH. Thunderbird forces you to answer this question each time you create a new IMAP FOLDER in the account root tree. Surely you've seen the radio buttons in the new folder creation box. -- Stan