Re: [Dovecot] Patch for vpopmail roaming users support

2011-07-06 Thread Nicolas Croiset (Campus Grenoble 90,8)

Hi Matt,

I try on my setup the patch you made last month and the 
/home/vpopmail/etc/open-smtp leaves empty. If I go back with the 
vpopmail mode, it is working.


I don't understand what's happened really.

Bye.
--
++
| E-mail : nicolas.croi...@brume.org |
| Annuaire des radios AM/FM/DMB : http://www.annuradio.fr/   |
++


Re: [Dovecot] Logging a special message into Dovecot source code

2011-07-06 Thread Pascal Volk
On 07/06/2011 08:47 AM Meisam Navaki wrote:
> Hi,
> I wanna modify Dovecot source code.For that,I need to know how can we log a
> special message into Dovecot source code?
> I tried to write a function to write a message in a file and added it to
> Dovecot source code,but it didn't work.
> I'm wondering if we can use Dovecote logging functions,but I don't know what
> are those functions and how can we use them.
> Thanks in advance.
> 

There are the functions i_{panic,fatal,error,warning,info,debug}. See
also:
http://hg.dovecot.org/dovecot-2.0/file/537d4b6d9a7a/src/lib/failures.h#l50


Regards,
Pascal
-- 
The trapper recommends today: f007ba11.1118...@localdomain.org


Re: [Dovecot] Public Mailbox & ACLs

2011-07-06 Thread Udo Lembke


Hi Tom,
any hints in the dovecot-log if you enable verbose logging?

info_log_path = /var/log/dovecot.log
auth_verbose = yes
auth_debug = yes
mail_debug = yes

And how looks your acl-files?


Udo

Am 06.07.2011 16:39, schrieb Tom Clark:

Hi Udo,

Glad you got it working. I decided to do the list test. This is what I'm
getting as a user not allowed access to the shared folders:

02 LIST "" *
* LIST (\HasNoChildren) "." "Drafts"
* LIST (\HasNoChildren) "." "Trash"
* LIST (\HasChildren) "." "INBOX"
* LIST (\HasChildren) "." "Shared.System"
* LIST (\HasChildren) "." "Shared.Support"
02 OK List completed.

As you can see I can list Shared.System and Shared.Support which is what I
don't want!

Tom




Re: [Dovecot] sieve problem email silently discard

2011-07-06 Thread fakessh
On Wed, 6 Jul 2011 18:17:07 +0200
fakessh @  wrote:

> On Mon, 04 Jul 2011 15:01:55 +0200
> Stephan Bosch  wrote:
> 
> > Op 4-7-2011 14:19, m...@smtp.fakessh.eu schreef:
> > >  Le lundi 4 juillet 2011 00:40, m...@smtp.fakessh.eu a écrit :
> > > > I just change my sieve script by removing the implicit discard a
> > > > fileinto :create "Junk.spam.spam"
> > [...]
> > >  it just happened a mail that was issued in INBOX.spam.spam supposedly
> > >  a hit with spam than 500 which does not appear in the body of the
> > >  mail here
> > [...]
> > >  I do not see why this email was issued in this box
> > 
> > I've executed sieve-test with your script and message, which reproduces 
> > the problem at my end:
> > 
> > ===
> > $ sieve-test -t - -T level=matching ~/fakessh.sieve ~/fakessh.eml
> >## Started executing script 'frop'
> > 2: header test
> > 2:   starting `:value-ge' match with `i;ascii-numeric' comparator:
> > 2:   extracting `X-Spam-score' headers from message
> > 2:   matching value `-1.9'
> > 2: with key `500' => 1
> > 2:   finishing match with result: matched
> > 3: jump if result is false
> > 3:   not jumping
> > 5: discard action; cancel implicit keep
> > 6: stop command; end all script execution
> >## Finished executing script 'frop'
> > 
> > Performed actions:
> > 
> >   * discard
> > 
> > Implicit keep:
> > 
> >(none)
> > 
> > sieve-test(stephan): Info: final result: success
> > ===
> > 
> > This turns out to be a classic mistake actually (which I didn't think of 
> > either). It is related to the (admittedly counter-intuitive) nature of 
> > the i;ascii-numeric comparator.
> > 
> >  From RFC4790, Section 9.1.1 
> > (http://tools.ietf.org/html/rfc4790#section-9.1.1):
> > `The "i;ascii-numeric" collation is a simple collation intended for use 
> > with arbitrarily-sized, unsigned decimal integer numbers stored as octet 
> > strings. US-ASCII digits (0x30 to 0x39) represent digits of the numbers. 
> > Before converting from string to integer, the input string is truncated 
> > at the first non-digit character. All input is valid; strings that do 
> > not start with a digit represent positive infinity.'
> > 
> > This comparator thus works on UNSIGNED integers only. Even worse, 
> > negative numbers are mapped to positive infinity, which is obviously > 
> > 500! There is your problem. I remember that issue was reported some time 
> > ago by someone else too.
> > 
> > To solve your problem, you need to check for the negative sign first. E.g.:
> > 
> > require ["comparator-i;ascii-numeric","relational"];
> > if allof(
> >  not header :matches "x-spam-score" "-*",
> >  header :value "ge" :comparator "i;ascii-numeric" "x-spam-score" 
> > "500")
> > {
> >discard;
> >stop;
> > }
> 
> a simple script are one syntax proximate to a sample exemple to stephan
> 
> 
> how to make a complex script that deals with both spam spam hist flag 
> suspicious address diverse
> 
> i try this
> ~]# cat /var/sieve-scripts/roundcube.sieve
> 
> require 
> ["fileinto","regex","comparator-i;ascii-numeric","reject","relational","mailbox","reject","variables","envelope","subaddress"];
> # rule:[spammanage]
> #if anyof (header :contains "X-Spam-Flag" "YES")
> #{
> #   fileinto "Junk";
> #}
> if allof(
>  not header :matches "x-spam-score" "-*",
>  header :value "ge" :comparator "i;ascii-numeric" "x-spam-score"
> "500")
> {
>discard;
>stop;
> }
> if anyof (
># puremsg scores (30% or higher)
>header :matches ["X-Spam-Flag"] ["Yes"]
> ) {
>fileinto "Junk";
>stop;
> }
> 
> elsif anyof (
> header :contains "Received"
>  [ "[4.63.221.224",
> 
>  ]
> )
> {
> fileinto :create "Junk";
> }
> elsif anyof (
>   header :contains ["SPAM", "X-Spam-Status"]
>  ["ADDRESSES_ON_CD","ACT_NOW",
>  ]
> )
> {
> fileinto :create "Junk";
> }
> 
> 
> or better much approch is 
> the succession a if anyof elsif anyof
> not work for the discard action
> 
> 
> > 
> > Or, even better: start using the spamtest(plus) extension.
> > 
> > Regards,
> > 
> > Stephan.
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> 
> 


work well transform allof in anyof


-- 
 http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x092164A7
 gpg --keyserver pgp.mit.edu --recv-key 092164A7


pgpNzLPdhDzcY.pgp
Description: PGP signature


Re: [Dovecot] sieve problem email silently discard

2011-07-06 Thread fakessh
On Mon, 04 Jul 2011 15:01:55 +0200
Stephan Bosch  wrote:

> Op 4-7-2011 14:19, m...@smtp.fakessh.eu schreef:
> >  Le lundi 4 juillet 2011 00:40, m...@smtp.fakessh.eu a écrit :
> > > I just change my sieve script by removing the implicit discard a
> > > fileinto :create "Junk.spam.spam"
> [...]
> >  it just happened a mail that was issued in INBOX.spam.spam supposedly
> >  a hit with spam than 500 which does not appear in the body of the
> >  mail here
> [...]
> >  I do not see why this email was issued in this box
> 
> I've executed sieve-test with your script and message, which reproduces 
> the problem at my end:
> 
> ===
> $ sieve-test -t - -T level=matching ~/fakessh.sieve ~/fakessh.eml
>## Started executing script 'frop'
> 2: header test
> 2:   starting `:value-ge' match with `i;ascii-numeric' comparator:
> 2:   extracting `X-Spam-score' headers from message
> 2:   matching value `-1.9'
> 2: with key `500' => 1
> 2:   finishing match with result: matched
> 3: jump if result is false
> 3:   not jumping
> 5: discard action; cancel implicit keep
> 6: stop command; end all script execution
>## Finished executing script 'frop'
> 
> Performed actions:
> 
>   * discard
> 
> Implicit keep:
> 
>(none)
> 
> sieve-test(stephan): Info: final result: success
> ===
> 
> This turns out to be a classic mistake actually (which I didn't think of 
> either). It is related to the (admittedly counter-intuitive) nature of 
> the i;ascii-numeric comparator.
> 
>  From RFC4790, Section 9.1.1 
> (http://tools.ietf.org/html/rfc4790#section-9.1.1):
> `The "i;ascii-numeric" collation is a simple collation intended for use 
> with arbitrarily-sized, unsigned decimal integer numbers stored as octet 
> strings. US-ASCII digits (0x30 to 0x39) represent digits of the numbers. 
> Before converting from string to integer, the input string is truncated 
> at the first non-digit character. All input is valid; strings that do 
> not start with a digit represent positive infinity.'
> 
> This comparator thus works on UNSIGNED integers only. Even worse, 
> negative numbers are mapped to positive infinity, which is obviously > 
> 500! There is your problem. I remember that issue was reported some time 
> ago by someone else too.
> 
> To solve your problem, you need to check for the negative sign first. E.g.:
> 
> require ["comparator-i;ascii-numeric","relational"];
> if allof(
>  not header :matches "x-spam-score" "-*",
>  header :value "ge" :comparator "i;ascii-numeric" "x-spam-score" 
> "500")
> {
>discard;
>stop;
> }

a simple script are one syntax proximate to a sample exemple to stephan


how to make a complex script that deals with both spam spam hist flag 
suspicious address diverse

i try this
~]# cat /var/sieve-scripts/roundcube.sieve

require 
["fileinto","regex","comparator-i;ascii-numeric","reject","relational","mailbox","reject","variables","envelope","subaddress"];
# rule:[spammanage]
#if anyof (header :contains "X-Spam-Flag" "YES")
#{
#   fileinto "Junk";
#}
if allof(
 not header :matches "x-spam-score" "-*",
 header :value "ge" :comparator "i;ascii-numeric" "x-spam-score"
"500")
{
   discard;
   stop;
}
if anyof (
   # puremsg scores (30% or higher)
   header :matches ["X-Spam-Flag"] ["Yes"]
) {
   fileinto "Junk";
   stop;
}

elsif anyof (
header :contains "Received"
 [ "[4.63.221.224",

 ]
)
{
fileinto :create "Junk";
}
elsif anyof (
  header :contains ["SPAM", "X-Spam-Status"]
 ["ADDRESSES_ON_CD","ACT_NOW",
 ]
)
{
fileinto :create "Junk";
}


or better much approch is 
the succession a if anyof elsif anyof
not work for the discard action


> 
> Or, even better: start using the spamtest(plus) extension.
> 
> Regards,
> 
> Stephan.
> 
> 
> 
> 
> 
> 
> 


-- 
 http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x092164A7
 gpg --keyserver pgp.mit.edu --recv-key 092164A7


pgpVjXIaMQ9Zm.pgp
Description: PGP signature


Re: [Dovecot] Public Mailbox & ACLs

2011-07-06 Thread Tom Clark
Hi Udo,

Glad you got it working. I decided to do the list test. This is what I'm
getting as a user not allowed access to the shared folders:

02 LIST "" *
* LIST (\HasNoChildren) "." "Drafts"
* LIST (\HasNoChildren) "." "Trash"
* LIST (\HasChildren) "." "INBOX"
* LIST (\HasChildren) "." "Shared.System"
* LIST (\HasChildren) "." "Shared.Support"
02 OK List completed.

As you can see I can list Shared.System and Shared.Support which is what I
don't want!

Tom

-Original Message-
From: dovecot-boun...@dovecot.org [mailto:dovecot-boun...@dovecot.org] On
Behalf Of Udo Lembke
Sent: 06 July 2011 3:05 PM
To: Tom Clark
Cc: dovecot@dovecot.org
Subject: Re: [Dovecot] Public Mailbox & ACLs


Hi Tom,

Am 06.07.2011 14:38, schrieb Tom Clark:
> Hi Udo,
>
> My folders are public mailboxes rather than shared. Why don't you copy
your
> namespace and dovecot-acl files here and we'll have a look at them?
i like to do so - and during copy/paste i found the issue!!

Jul 06 15:06:41 imap(te...@example.org): Debug: acl vfile: reading file 
/var/data/public/kunde_2/dovecot-acl
...
Jul 06 15:06:41 imap(te...@example.org): Debug: acl vfile: reading file 
/var/data/archiv/example.org/test4/public/kunde_2/dovecot-acl
...
Jul 06 15:06:41 imap(te...@example.org): Debug: acl: No lookup right to 
mailbox: public/kunde_2

This came throug one link ( /var/data/archiv/example.org/test4/public -> 
/var/data/public )
I removed the link and now i can't see the public-folders below the 
users archiv-area. But below the public-namespace the ACLs now working!!

BTW. i think also with links should ACLs working.

Thanks.

Udo



Re: [Dovecot] share an IMAP folder ?

2011-07-06 Thread Udo Lembke


Am 06.07.2011 16:19, schrieb Matt Rude:

...
Johan,
How are your users sharing there folders in Roundcube?  Are you running
a plugin or is there native support that I'm just not seeing?

Thanks
-Matt


Hi,
Personal Settings -> Folder

But you have to allow the folders via ACL-file (dovecot-acl) see 
http://wiki.dovecot.org/ACL


Udo



Re: [Dovecot] Problems with acl and shared namespace [solved]

2011-07-06 Thread Udo Lembke


The problem with not reconiced acl-files are solved.

It's an bad idea to use a link from one shared/public area to another.

Am 05.07.2011 12:47, schrieb Udo Lembke:


...
The public shared area are symlinked below the archiv-area:
ls -lsa archiv/example.org/test4/
insgesamt 16
4 drwx-- 3 dovecot dovecot 4096  5. Jul 11:40 .
4 drwx-- 3 dovecot dovecot 4096  5. Jul 11:27 ..
4 drwx-- 2 dovecot dovecot 4096  5. Jul 11:27 archiv
4 -rw--- 1 dovecot dovecot  108  5. Jul 11:40 dovecot-acl-list
0 lrwxrwxrwx 1 rootroot  16  5. Jul 11:27 public -> 
/var/data/public




After removing the link, the list command show the right result:
The problem is, that the acls are not reconiced - the acl should 
forbid an access, but access is possible.


This show the telnet imap-session:
. list "" "*"
* LIST (\HasNoChildren) "/" "Drafts"
* LIST (\HasNoChildren) "/" "Spam"
* LIST (\HasNoChildren) "/" "Sent"
* LIST (\HasNoChildren) "/" "Trash"
* LIST (\HasNoChildren) "/" "INBOX"
* LIST (\Noselect \HasChildren) "/" "public"
* LIST (\Noselect \HasChildren) "/" "archiv/te...@example.org"
* LIST (\Noselect \HasChildren) "/" "archiv/te...@example.org/public"
* LIST (\Noselect \HasChildren) "/" 
"archiv/te...@example.org/public/kunde_2"
* LIST (\HasNoChildren) "/" 
"archiv/te...@example.org/public/kunde_2/Kundenmails"
* LIST (\Noselect \HasChildren) "/" 
"archiv/te...@example.org/public/kunde_3"
* LIST (\HasNoChildren) "/" 
"archiv/te...@example.org/public/kunde_3/Kundenmails"

* LIST (\Noselect \HasNoChildren) "/" "archiv/te...@example.org/archiv"
. OK List completed.


. list "" "*"
* LIST (\HasNoChildren) "/" "Drafts"
* LIST (\HasNoChildren) "/" "Spam"
* LIST (\HasNoChildren) "/" "Sent"
* LIST (\HasNoChildren) "/" "Trash"
* LIST (\HasNoChildren) "/" "INBOX"
* LIST (\Noselect \HasChildren) "/" "public"
* LIST (\Noselect \HasChildren) "/" "archiv/te...@example.org"
* LIST (\Noselect \HasNoChildren) "/" "archiv/te...@example.org/archiv"
. OK List completed.


Udo


Re: [Dovecot] share an IMAP folder ?

2011-07-06 Thread Matt Rude
On 6/30/2011 5:12 PM, Johan Hendriks wrote:
> Frank Bonnet schreef:
>> Hello
>>
>> Is it possible to share an Imap folder for a user with another one ?
>>
>> user a > imap-folder1
>> ^
>> user b >--|
>>
>> Could user a share his folder "imap-folder1" with user b
>> in readonly mode ?
>>
>> I use "real" users ( not virtuals )
>>
>> Thanks a lot.
>>
>>
> This is possible, we use this in combination with roundcube to share
> folders.
> Users log in to there webmail interface and can share there folder there.
> Thunderbird has an plugin also.
> But the most users use Microsoft Outlook, with has as far i know no
> option to create a share.
> 
> You can create this shared folders through namespaces.
> 
> Gr
> Johan Hendriks
> 

Johan,
How are your users sharing there folders in Roundcube?  Are you running
a plugin or is there native support that I'm just not seeing?

Thanks
-Matt



smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Dovecot] Public Mailbox & ACLs

2011-07-06 Thread Udo Lembke


Hi Tom,

Am 06.07.2011 14:38, schrieb Tom Clark:

Hi Udo,

My folders are public mailboxes rather than shared. Why don't you copy your
namespace and dovecot-acl files here and we'll have a look at them?

i like to do so - and during copy/paste i found the issue!!

Jul 06 15:06:41 imap(te...@example.org): Debug: acl vfile: reading file 
/var/data/public/kunde_2/dovecot-acl

...
Jul 06 15:06:41 imap(te...@example.org): Debug: acl vfile: reading file 
/var/data/archiv/example.org/test4/public/kunde_2/dovecot-acl

...
Jul 06 15:06:41 imap(te...@example.org): Debug: acl: No lookup right to 
mailbox: public/kunde_2


This came throug one link ( /var/data/archiv/example.org/test4/public -> 
/var/data/public )
I removed the link and now i can't see the public-folders below the 
users archiv-area. But below the public-namespace the ACLs now working!!


BTW. i think also with links should ACLs working.

Thanks.

Udo


Re: [Dovecot] Dovecot communication with sasl in dovecot source code

2011-07-06 Thread Stephan Bosch

Op 6-7-2011 13:43, Meisam Navaki schreef:

Actually,I want to disable authentication in dovecot.I don't want dovecot to
authenticate.For that,I'm looking for into dovecot source code to find where
dovecot compares passwords or do something like this.


Why would you want to do that? :)

Regards,

Stephan.


Re: [Dovecot] Public Mailbox & ACLs

2011-07-06 Thread Tom Clark
Hi Udo,

My folders are public mailboxes rather than shared. Why don't you copy your
namespace and dovecot-acl files here and we'll have a look at them?

Tom

-Original Message-
From: Udo Lembke [mailto:udo.lem...@albertbauer.com] 
Sent: 06 July 2011 1:36 PM
To: Tom Clark
Cc: dovecot@dovecot.org
Subject: Re: [Dovecot] Public Mailbox & ACLs


Hi Tom,
are the ACLs working for you as namespace-type shared, or public?
The non-reconiced ACLs are on type public at my installation (all user 
can access all folders).

I had already in 20-imap.conf:
protocol imap {
   mail_plugins = $mail_plugins acl imap_acl
...

and in 10-mail.conf:
mail_plugins = acl autocreate quota

OK, acl are doubled, but i hope that's no problem.

Udo

Am 06.07.2011 13:49, schrieb Tom Clark:
> Hi Udo,
>
> I'm using 2.0.8. I've managed to get the ACLs working by adding:
>
> mail_plugins = acl
> protocol imap {
>mail_plugins = $mail_plugins imap_acl
> }
>
> To the bottom of 10-mail.conf in /etc/dovecot/conf.d/ (not sure if this is
> technically the right place. It may be better adding them to the plugins
> file).
>
> Then added the dovecot-acl files into the subdirectories.
>
> The only problem I'm having is that I can't get dovecot to NOT display the
> top level shared folders.
>
> Tom




Re: [Dovecot] Public Mailbox & ACLs

2011-07-06 Thread Udo Lembke


Hi Tom,
are the ACLs working for you as namespace-type shared, or public?
The non-reconiced ACLs are on type public at my installation (all user 
can access all folders).


I had already in 20-imap.conf:
protocol imap {
  mail_plugins = $mail_plugins acl imap_acl
...

and in 10-mail.conf:
mail_plugins = acl autocreate quota

OK, acl are doubled, but i hope that's no problem.

Udo

Am 06.07.2011 13:49, schrieb Tom Clark:

Hi Udo,

I'm using 2.0.8. I've managed to get the ACLs working by adding:

mail_plugins = acl
protocol imap {
   mail_plugins = $mail_plugins imap_acl
}

To the bottom of 10-mail.conf in /etc/dovecot/conf.d/ (not sure if this is
technically the right place. It may be better adding them to the plugins
file).

Then added the dovecot-acl files into the subdirectories.

The only problem I'm having is that I can't get dovecot to NOT display the
top level shared folders.

Tom




[Dovecot] proxying user logged in with master user

2011-07-06 Thread Miguel Cabeça
Hello,

I'm running dovecot 1.2.15 and I'm having a problem proxying a user to another 
host, when this user is logged in with a masteruser.
I have two dovecot servers configured to serve half of the users locally and to 
proxy the other half to the other host. 
Proxying is done using the masteruser feature (username*proxy) and it works as 
expected as the following test shows:

# nc localhost 143
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE STARTTLS 
AUTH=PLAIN AUTH=LOGIN AUTH=GSSAPI] Dovecot ready.
01 LOGIN ist90001 password_for_ist90001
01 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT 
SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN 
NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT 
SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS QUOTA] Logged in
^C

And the corresponding log entry:

Jul  6 13:10:06 mail1 dovecot: imap-login: proxy(ist90001): started proxying to 
X.Y.Z.W:143/ist90001*proxy: user=, method=PLAIN, rip=127.0.0.1, 
lip=127.0.0.1, secured
Jul  6 13:10:09 mail1 dovecot: imap-login: proxy(ist90001): disconnecting 
127.0.0.1

The ist90001 is proxied to the other host as expected and as configured.


The problem occurs when I try to use another masteruser to log into the server:

# nc localhost 143
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE STARTTLS 
AUTH=PLAIN AUTH=LOGIN AUTH=GSSAPI] Dovecot ready.
01 LOGIN ist90001*super password_for_super_masteruser
01 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT 
SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN 
NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT 
SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS QUOTA] Logged in
^C

But this time the user isn't proxied to the other host. Instead he is logged in 
this host:

Jul  6 13:11:14 mail1 dovecot: imap-login: Login: user=, 
method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jul  6 13:11:16 mail1 dovecot: IMAP(ist90001): Connection closed bytes=0/292


Is this the intended behavior or a bug? I was expecting the user to be logged 
in with the password of the super masteruser, and then be proxied to the other 
host as it happens when the user is logged in with it's own password.

I can provide any configuration details if needed.

Best Regards
Miguel Cabeça

Re: [Dovecot] Public Mailbox & ACLs

2011-07-06 Thread Tom Clark
Hi Udo,

I'm using 2.0.8. I've managed to get the ACLs working by adding:

mail_plugins = acl
protocol imap {
  mail_plugins = $mail_plugins imap_acl
}

To the bottom of 10-mail.conf in /etc/dovecot/conf.d/ (not sure if this is
technically the right place. It may be better adding them to the plugins
file).

Then added the dovecot-acl files into the subdirectories.

The only problem I'm having is that I can't get dovecot to NOT display the
top level shared folders.

Tom

-Original Message-
From: dovecot-boun...@dovecot.org [mailto:dovecot-boun...@dovecot.org] On
Behalf Of Udo Lembke
Sent: 06 July 2011 10:39 AM
To: dovecot@dovecot.org
Subject: Re: [Dovecot] Public Mailbox & ACLs


Hi Tom,
sorry that I can't help you, but i have the same issue ( see thread 
"[Dovecot] Problems with acl and shared namespace" ).
With a slightly different config (separator / and so on) but the same 
result - the public mailboxes are full accessible also from unauthorized 
accounts.

I have also no answer to my questions - so i hope one of us get an answer.

BTW. which dovecot version do you use? I use 2.0.13 - perhaps i should 
try 1.x? But i want to use new software on the new mailserver...

Udo

Am 06.07.2011 10:12, schrieb Tom Clark:
> Hi,
>
> I've tried doing the following still with no luck.
>
> namespace {
>type = public
>separator = .
>prefix = Shared.
>location = maildir:/var/spool/maildir:INDEX=~/Maildir/Shared
>subscriptions = no
> }
>
> This allows everyone still to see Shared on subscriptions. Does anyone
know
> how to stop this??
>
> Tom
> ...




[Dovecot] Dovecot communication with sasl in dovecot source code

2011-07-06 Thread Meisam Navaki
> Actually,I want to disable authentication in dovecot.I don't want dovecot
> to authenticate.For that,I'm looking for into dovecot source code to find
> where dovecot compares passwords or do something like this.I found fuction
> named sasl_serever_auth_begin,but I couldn't understand what does it exactly
> do.
>
>
> On Thu, Jun 30, 2011 at 10:08 AM, Timo Sirainen  wrote:
>
>> On Tue, 2011-06-28 at 12:07 +0430, Meisam Navaki wrote:
>> > Hi all,
>> > I'm reading dovecot source codes(2.0.13),and I need to know how dovecot
>> > communicate with sasl?
>>
>> For what purpose? Dovecot's login process communicates with auth process
>> via http://wiki2.dovecot.org/Design/AuthProtocol
>>
>> > I traced the source code from cmd_login function,and found out something
>> > about sasl_callback.
>> > but i never found where this function called and also I couldn't
>> understand
>> > how sasl inform the dovecot from authentication result.
>> > I'll be thankful if someone could help me out.
>>
>> The code is a bit tricky jumping all around.. I can help more if you
>> tell me what it is that you actually want to do.
>>
>>
>>
>
>
> --
> --
> *Regards
> Meisam Navaki Arefi,
> *
> *System Programmer,
> *
> **
> *Bayan Co.
> *
>



-- 
-- 
*Regards
Meisam Navaki Arefi,
*
*M.Sc student,Computer Science,
*
**
*Amirkabir University Of Technology
*
*424 Hafez Avenue, Tehran ,Iran*


Re: [Dovecot] Dovecot communication with sasl in dovecot source code

2011-07-06 Thread Meisam Navaki
Actually,I want to disable authentication in dovecot.I don't want dovecot to
authenticate.For that,I'm looking for into dovecot source code to find where
dovecot compares passwords or do something like this.I found fuction named
sasl_serever_auth_begin,but I couldn't understand what does it exactly do.

On Thu, Jun 30, 2011 at 10:08 AM, Timo Sirainen  wrote:

> On Tue, 2011-06-28 at 12:07 +0430, Meisam Navaki wrote:
> > Hi all,
> > I'm reading dovecot source codes(2.0.13),and I need to know how dovecot
> > communicate with sasl?
>
> For what purpose? Dovecot's login process communicates with auth process
> via http://wiki2.dovecot.org/Design/AuthProtocol
>
> > I traced the source code from cmd_login function,and found out something
> > about sasl_callback.
> > but i never found where this function called and also I couldn't
> understand
> > how sasl inform the dovecot from authentication result.
> > I'll be thankful if someone could help me out.
>
> The code is a bit tricky jumping all around.. I can help more if you
> tell me what it is that you actually want to do.
>
>
>


-- 
-- 
*Regards
Meisam Navaki Arefi,
*
*System Programmer,
*
**
*Bayan Co.
*


Re: [Dovecot] Public Mailbox & ACLs

2011-07-06 Thread Udo Lembke


Hi Tom,
sorry that I can't help you, but i have the same issue ( see thread 
"[Dovecot] Problems with acl and shared namespace" ).
With a slightly different config (separator / and so on) but the same 
result - the public mailboxes are full accessible also from unauthorized 
accounts.


I have also no answer to my questions - so i hope one of us get an answer.

BTW. which dovecot version do you use? I use 2.0.13 - perhaps i should 
try 1.x? But i want to use new software on the new mailserver...


Udo

Am 06.07.2011 10:12, schrieb Tom Clark:

Hi,

I've tried doing the following still with no luck.

namespace {
   type = public
   separator = .
   prefix = Shared.
   location = maildir:/var/spool/maildir:INDEX=~/Maildir/Shared
   subscriptions = no
}

This allows everyone still to see Shared on subscriptions. Does anyone know
how to stop this??

Tom
...




[Dovecot] Logging a special message into Dovecot source code

2011-07-06 Thread Meisam Navaki
Hi,
I wanna modify Dovecot source code.For that,I need to know how can we log a
special message into Dovecot source code?
I tried to write a function to write a message in a file and added it to
Dovecot source code,but it didn't work.
I'm wondering if we can use Dovecote logging functions,but I don't know what
are those functions and how can we use them.
Thanks in advance.

-- 
*Regards
Meisam Navaki Arefi,
*
*System Programmer,
*
**
*Bayan Co.
*
*
*




-- 
-- 
*Regards
Meisam Navaki Arefi,
*
*M.Sc student,Computer Science,
*
**
*Amirkabir University Of Technology
*
*424 Hafez Avenue, Tehran ,Iran*


Re: [Dovecot] Public Mailbox & ACLs

2011-07-06 Thread Tom Clark
Hi,

I've tried doing the following still with no luck. 

namespace {
  type = public
  separator = .
  prefix = Shared.
  location = maildir:/var/spool/maildir:INDEX=~/Maildir/Shared
  subscriptions = no
}

This allows everyone still to see Shared on subscriptions. Does anyone know
how to stop this??

Tom

-Original Message-
From: dovecot-boun...@dovecot.org [mailto:dovecot-boun...@dovecot.org] On
Behalf Of Tom Clark
Sent: 04 July 2011 3:19 PM
To: dovecot@dovecot.org
Subject: [Dovecot] Public Mailbox & ACLs

Hi,

I'm having a problem I can't get my head around. I'm trying to setup a
public mailbox that is hidden from all users unless granted access through
an ACL.

My folder structure is (migrated from a Courier IMAP/Qmail server):

/var/spool/maildir - main public folder (contains a few .qmail files to
redirect mail to the correct subfolder)
/var/spool/maildir/Support - support public folder (a public folder rather
than a maildir)
/var/spool/maildir/Support/.SubFolder1 - support sub folder 1 (a maildir)
/var/spool/maildir/Support/.SubFolder2 - support sub folder 2 (another
maildir)
/var/spool/maildir/System
/var/spool/maildir/System/.SubFolder1
/var/spool/maildir/System/.SubFolder2

I couldn't get the namespace working correctly to just have 1 folder called
"Shared" (you just got an empty folder when trying to subscribe). I ended up
making 2 namespaces below:

namespace {
  type = public
  separator = .
  prefix = Shared.Support.
  location = maildir:/var/spool/maildir/Support:INDEX=~/Maildir/Support
  subscriptions = no
}

namespace {
  type = public
  separator = .
  prefix = Shared.System.
  location = maildir:/var/spool/maildir/System:INDEX=~/Maildir/System
  subscriptions = no
}

This allowed me to get the result I was looking for. Using an ACL I get a
Shared->Support/System->Subfolders view. However the problem is when a user
is not in the ACL they can still see the Shared->Support/System folders
(just none of the subfolders) and obviously can't subscribe.

Could someone let me know what I am doing wrong and if there is a better way
of doing this?

Many thanks,

Tom