Re: [Dovecot] Sieve and Namespace in dovecot 2.0.X

2013-10-11 Thread Mauricio Tavares
On Fri, Oct 11, 2013 at 11:08 AM, Mauricio Tavares  wrote:
> On Fri, Oct 11, 2013 at 10:50 AM, Martin Rabl  wrote:
>> Hm. Ok.
>>
>> Am 11.10.2013 16:44, schrieb Mauricio Tavares:
>>>
>>> On Fri, Oct 11, 2013 at 10:33 AM, Martin Rabl 
>>> wrote:

fileinto :create "INBOX.Spam";
>>>
>>>Even though .Spam already exists in the user's mailbox?
>>> doveadm mailbox status -u b...@domain.com messages INBOX.Spam
>>> INBOX.Spam messages=92283
>>
>>
> namespace inbox {
> inbox = yes
> location =
> prefix = INBOX.
> separator =.
> type = private
>
> }
>>
>> Yep, try it - if the folder is there, it will happen nothing.
>>
>> I think, there is a namespace problem, and maybe the spamfolder is located
>> unter INBOX.INBOX.Spam (just an idea).
>>
>> I think, sieve will create a folder, where it assumes there is one.
>> It's just a little experimental ... ;-)
>>
>>
>> Greetings,
>>   Martin
>
> Interesting: now it reports that it put the spam in its proper place:
>
> Oct 11 11:02:27 mail dovecot: lda(b...@domain.com): sieve:
> msgid=<6563.377.5164.515...@pickedit.us> : stored mail into mailbox
> 'INBOX.Spam'
>
> And, it created INBOX.Spam:
>
> drwxr-x---  5 virtual virtual4096 Oct 11 11:02 .INBOX.Spam
> drwxr-x---  5 virtual virtual4096 Oct 11 01:52 .Spam
>
> So, let's drop INBOX altogether
>
>   fileinto :create "Spam";
>
> and see what kind of mess we can come up with, right? =)

And that seems to have worked. Now I feel like
http://wiki2.dovecot.org/Pigeonhole/Sieve/Usage and I do not like each
other...


Re: [Dovecot] Sieve and Namespace in dovecot 2.0.X

2013-10-11 Thread Mauricio Tavares
On Fri, Oct 11, 2013 at 10:50 AM, Martin Rabl  wrote:
> Hm. Ok.
>
> Am 11.10.2013 16:44, schrieb Mauricio Tavares:
>>
>> On Fri, Oct 11, 2013 at 10:33 AM, Martin Rabl 
>> wrote:
>>>
>>>fileinto :create "INBOX.Spam";
>>
>>Even though .Spam already exists in the user's mailbox?
>> doveadm mailbox status -u b...@domain.com messages INBOX.Spam
>> INBOX.Spam messages=92283
>
>
 namespace inbox {
 inbox = yes
 location =
 prefix = INBOX.
 separator =.
 type = private

 }
>
> Yep, try it - if the folder is there, it will happen nothing.
>
> I think, there is a namespace problem, and maybe the spamfolder is located
> unter INBOX.INBOX.Spam (just an idea).
>
> I think, sieve will create a folder, where it assumes there is one.
> It's just a little experimental ... ;-)
>
>
> Greetings,
>   Martin

Interesting: now it reports that it put the spam in its proper place:

Oct 11 11:02:27 mail dovecot: lda(b...@domain.com): sieve:
msgid=<6563.377.5164.515...@pickedit.us> : stored mail into mailbox
'INBOX.Spam'

And, it created INBOX.Spam:

drwxr-x---  5 virtual virtual4096 Oct 11 11:02 .INBOX.Spam
drwxr-x---  5 virtual virtual4096 Oct 11 01:52 .Spam

So, let's drop INBOX altogether

  fileinto :create "Spam";

and see what kind of mess we can come up with, right? =)


Re: [Dovecot] Sieve and Namespace in dovecot 2.0.X

2013-10-11 Thread Martin Rabl

Hm. Ok.

Am 11.10.2013 16:44, schrieb Mauricio Tavares:

On Fri, Oct 11, 2013 at 10:33 AM, Martin Rabl  wrote:

   fileinto :create "INBOX.Spam";

   Even though .Spam already exists in the user's mailbox?
doveadm mailbox status -u b...@domain.com messages INBOX.Spam
INBOX.Spam messages=92283



namespace inbox {
inbox = yes
location =
prefix = INBOX.
separator =.
type = private

}

Yep, try it - if the folder is there, it will happen nothing.

I think, there is a namespace problem, and maybe the spamfolder is 
located unter INBOX.INBOX.Spam (just an idea).


I think, sieve will create a folder, where it assumes there is one.
It's just a little experimental ... ;-)


Greetings,
  Martin


Re: [Dovecot] Sieve and Namespace in dovecot 2.0.X

2013-10-11 Thread Mauricio Tavares
On Fri, Oct 11, 2013 at 10:33 AM, Martin Rabl  wrote:
> Hi,
>
> try
>
>   fileinto :create "INBOX.Spam";
>
> Bye,
>Martin
>
  Even though .Spam already exists in the user's mailbox?

doveadm mailbox status -u b...@domain.com messages INBOX.Spam
INBOX.Spam messages=92283

> Am 11.10.2013 16:30, schrieb Mauricio Tavares:
>
>> Based on what I read in
>> http://wiki2.dovecot.org/Pigeonhole/Sieve/Usage, if I have a namespace
>> defined as
>>
>> tail conf.d/10-mail.conf
>>
>> namespace inbox {
>>inbox = yes
>>location =
>>prefix = INBOX.
>>separator =.
>>type = private
>>
>> }
>>
>> A global script like
>>
>> cat /etc/dovecot/sieve/global-spam.sieve
>> require ["fileinto", "regex"];
>> # Must use regex here as 'contains' may not be valid, it erroneously
>> # moved:
>> # X-Spam-Status: No, score=-4.0 required=8.0 tests=ALL_TRUSTED,BAYES_00,
>> #
>> DCC_CHECK_NEGATIVE,HTML_MESSAGE,T_TM2_M_HEADER_IN_MSG,UNTRUSTED_Relay,
>> #   XM_SPF_Neutral autolearn=disabled version=3.2.5, No
>> #
>> # Due to the 'YES' in BAYES, let's just make sure YES is at the
>> # _beginning_ of X-Spam-Status, while ignoring anything past it.
>> #if header :regex "X-Spam-Status" "^[Yy][Ee][Ss].*" {
>> if header :matches "X-Spam-Status" "Yes*" {
>>fileinto "INBOX.Spam";
>>stop;
>> }
>>
>> should put spam in bob/.Spam. But, I am getting an error message
>> stating that INBOX.Spam does not exist:
>>
>> Oct 11 09:57:33 mail dovecot: lda(b...@domain.com): Error: sieve:
>> msgid=<0.0.0.71c.1cec689a21cff08.706...@ip.aidolip.us>: failed to
>> store into mailbox 'INBOX.Spam': Mailbox doesn't exist: INBOX.Spam
>>
>> How come?
>>
>
>
> --
> Viele Grüße,
>
>   Martin Rabl


Re: [Dovecot] Sieve and Namespace in dovecot 2.0.X

2013-10-11 Thread Martin Rabl

Hi,

try

  fileinto :create "INBOX.Spam";

Bye,
   Martin

Am 11.10.2013 16:30, schrieb Mauricio Tavares:

Based on what I read in
http://wiki2.dovecot.org/Pigeonhole/Sieve/Usage, if I have a namespace
defined as

tail conf.d/10-mail.conf

namespace inbox {
   inbox = yes
   location =
   prefix = INBOX.
   separator =.
   type = private

}

A global script like

cat /etc/dovecot/sieve/global-spam.sieve
require ["fileinto", "regex"];
# Must use regex here as 'contains' may not be valid, it erroneously
# moved:
# X-Spam-Status: No, score=-4.0 required=8.0 tests=ALL_TRUSTED,BAYES_00,
#   DCC_CHECK_NEGATIVE,HTML_MESSAGE,T_TM2_M_HEADER_IN_MSG,UNTRUSTED_Relay,
#   XM_SPF_Neutral autolearn=disabled version=3.2.5, No
#
# Due to the 'YES' in BAYES, let's just make sure YES is at the
# _beginning_ of X-Spam-Status, while ignoring anything past it.
#if header :regex "X-Spam-Status" "^[Yy][Ee][Ss].*" {
if header :matches "X-Spam-Status" "Yes*" {
   fileinto "INBOX.Spam";
   stop;
}

should put spam in bob/.Spam. But, I am getting an error message
stating that INBOX.Spam does not exist:

Oct 11 09:57:33 mail dovecot: lda(b...@domain.com): Error: sieve:
msgid=<0.0.0.71c.1cec689a21cff08.706...@ip.aidolip.us>: failed to
store into mailbox 'INBOX.Spam': Mailbox doesn't exist: INBOX.Spam

How come?




--
Viele Grüße,

  Martin Rabl


[Dovecot] Sieve and Namespace in dovecot 2.0.X

2013-10-11 Thread Mauricio Tavares
Based on what I read in
http://wiki2.dovecot.org/Pigeonhole/Sieve/Usage, if I have a namespace
defined as

tail conf.d/10-mail.conf

namespace inbox {
  inbox = yes
  location =
  prefix = INBOX.
  separator =.
  type = private

}

A global script like

cat /etc/dovecot/sieve/global-spam.sieve
require ["fileinto", "regex"];
# Must use regex here as 'contains' may not be valid, it erroneously
# moved:
# X-Spam-Status: No, score=-4.0 required=8.0 tests=ALL_TRUSTED,BAYES_00,
#   DCC_CHECK_NEGATIVE,HTML_MESSAGE,T_TM2_M_HEADER_IN_MSG,UNTRUSTED_Relay,
#   XM_SPF_Neutral autolearn=disabled version=3.2.5, No
#
# Due to the 'YES' in BAYES, let's just make sure YES is at the
# _beginning_ of X-Spam-Status, while ignoring anything past it.
#if header :regex "X-Spam-Status" "^[Yy][Ee][Ss].*" {
if header :matches "X-Spam-Status" "Yes*" {
  fileinto "INBOX.Spam";
  stop;
}

should put spam in bob/.Spam. But, I am getting an error message
stating that INBOX.Spam does not exist:

Oct 11 09:57:33 mail dovecot: lda(b...@domain.com): Error: sieve:
msgid=<0.0.0.71c.1cec689a21cff08.706...@ip.aidolip.us>: failed to
store into mailbox 'INBOX.Spam': Mailbox doesn't exist: INBOX.Spam

How come?