Re: [Dovecot] Dovecot and quota enforcement - only reporting?

2008-10-28 Thread Joseba Torre
How are you delivering your mails to mailboxes? If you don't use dovecot's 
deliver quota won't get updated (unless you use filesystem quota)

HTH


El Lunes, 27 de Octubre de 2008 a las 17:53, [EMAIL PROTECTED] escribió:
 At 10:48 PM 10/21/2008, Rick Steeves wrote:
 When I delete mail and expunge it, the quota updates.  However,
 inbound email doesn't appear to update the quota.
 
 Two questions, probably related:
 What causes the quota (which I presume is the maildirsize file) to update?
 Is there any actual quota enforcement, or just reporting? Because if
 I send mail to an account, even if it currently reporting (via
 maildirsize or . getquotaroot) that the user is over quota, they
 still can send and receive email.

 Just checking to see if there are any insights here.

 Rick



-- 
Joseba Torre. CIDIR Bizkaia.


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


[Dovecot] read only FS access

2008-10-28 Thread Mathieu Kretchner
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.

Thanks.
begin:vcard
fn:Mathieu Kretchner
n:Kretchner;Mathieu
org:INRIA;Syslog
adr;dom:;;2004 route des lucioles - BP93;Sophia Antipolis;;06902 CEDEX
email;internet:[EMAIL PROTECTED]
tel;work:04 92 38 76 67
x-mozilla-html:FALSE
version:2.1
end:vcard



Re: [Dovecot] New %%h variable for shared namespaces (was: New generic userdb lookup api)

2008-10-28 Thread Sascha Wilde
Sascha Wilde [EMAIL PROTECTED] writes:
 Ok, as discussed I have made some changes (hopefully improvements) in
 the new auth-master API for userdb requests...

And using this new I finally put a first alpha version of the missing
%%h variable for shared name spaces together.

See http://hg.intevation.org/kolab/dovecot-1.2_kolab-branch/rev/e83efa40a1dc

With this it is possible to define a name space like this:

namespace shared {
  separator = /
  prefix = users/%%u/
  location = Maildir:/%%h/maildir
  subscriptions = no
}

where %%h is substituted with the home directory of user %%u, which is
needed e.g. when the mail location is configured as:

mail_location = maildir:~/maildir


cheers
sascha
-- 
Sascha Wilde  OpenPGP key: 4BB86568
http://www.intevation.de/~wilde/  http://www.intevation.de/
Intevation GmbH, Neuer Graben 17, 49074 Osnabrück; AG Osnabrück, HR B 18998
Geschäftsführer:   Frank Koormann,  Bernhard Reiter,  Dr. Jan-Oliver Wagner


pgpPGEmsU0sjv.pgp
Description: PGP signature


[Dovecot] Keep the email on the server

2008-10-28 Thread Rubens A. Mascari

Hello,

I migrate my server POP3/IMAP recently the Courier-IMAP for Dovecot and 
am having
problems when the user configures your e-mail client to leave a copy of 
mail on the server.


All mail in the inbox, are brought all the time that you check your mailbox
input via POP3, causing a large traffic of unnecessary data every time. 
In my opinion

you should bring only the new mail, unread.

Can you tell me if this is a configuration issue on Dovecot?

Thank you all

--

Att.

Rubens Aurelio Mascari .   _
Linux  Internet Developer  ICQ# 2730907 ...  °v°
Odara Internet LTDA (44) 3226-3662 . /(_)\
Maringá - Paraná .. http://www.odara.com.br   ^ ^
__.--.__ QuEm TeM o CoNhEcImEnTo TeM o PoDeR __.--.___



Re: [Dovecot] Keep the email on the server

2008-10-28 Thread Charles Marcus
On 10/28/2008, Rubens A. Mascari ([EMAIL PROTECTED]) wrote:
 Can you tell me if this is a configuration issue on Dovecot? 

Only if you provide enough information... do you think we are mind
readers? ;)

For starters, what version of dovecot? What is output of dovecot -n?

-- 

Best regards,

Charles


Re: [Dovecot] Keep the email on the server

2008-10-28 Thread Rubens A. Mascari

# 1.0.7: /etc/dovecot.conf
protocols: pop3 imap pop3s imaps
listen(default): *:143
listen(imap): *:143
listen(pop3): *:110
ssl_listen(default): *:993
ssl_listen(imap): *:993
ssl_listen(pop3): *:995
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
login_greeting: Odara Internet POP3  IMAP Server
login_processes_count: 20
login_max_processes_count: 200
first_valid_uid: 88
last_valid_uid: 88
first_valid_gid: 88
last_valid_gid: 88
mail_location: maildir:~:INDEX=MEMORY
maildir_copy_with_hardlinks: yes
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3): quota
mail_plugin_dir(default): /usr/lib64/dovecot/imap
mail_plugin_dir(imap): /usr/lib64/dovecot/imap
mail_plugin_dir(pop3): /usr/lib64/dovecot/pop3
imap_client_workarounds(default): outlook-idle delay-newmail
imap_client_workarounds(imap): outlook-idle delay-newmail
imap_client_workarounds(pop3): outlook-idle
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
auth default:
 mechanisms: plain login digest-md5 cram-md5 ntlm gssapi
 passdb:
   driver: sql
   args: /etc/dovecot-mysql.conf
 userdb:
   driver: sql
   args: /etc/dovecot-mysql.conf
 socket:
   type: listen
   client:
 path: /var/spool/postfix/private/auth
 mode: 432
 user: postfix
 group: mail

Att.

Rubens Aurelio Mascari .   _
Linux  Internet Developer  ICQ# 2730907 ...  °v°
Odara Internet LTDA (44) 3226-3662 . /(_)\
Maringá - Paraná .. http://www.odara.com.br   ^ ^
__.--.__ QuEm TeM o CoNhEcImEnTo TeM o PoDeR __.--.___


Charles Marcus escreveu:

On 10/28/2008, Rubens A. Mascari ([EMAIL PROTECTED]) wrote:
  
Can you tell me if this is a configuration issue on Dovecot? 



Only if you provide enough information... do you think we are mind
readers? ;)

For starters, what version of dovecot? What is output of dovecot -n?

  


[Dovecot] Quick question regarding autocreate plugin

2008-10-28 Thread Jakob Curdes

Hello,

just a quick question: if I want to use the autocreate plugin with 
1.1.5, I have to compile it by hand, right? How do I do that? Can I 
adapt a Makefile from another plugin?


JC


[Dovecot] allow_nets overridden by cache

2008-10-28 Thread Guy
Hi,

I've just started trying allow_nets on one of my servers. I have
auth_debug and auth_verbose both enabled and the output is as follows:
Oct 28 13:05:48 mink dovecot: auth-worker(default):
auth([EMAIL PROTECTED],x.x.x.x): allow_nets: Matching for network
127.0.0.1/8
Oct 28 13:05:48 mink dovecot: auth-worker(default):
auth([EMAIL PROTECTED],x.x.x.x): allow_nets: Matching for network
10.0.7.176/28
Oct 28 13:05:48 mink dovecot: auth-worker(default):
passdb([EMAIL PROTECTED],x.x.x.x): allow_nets check failed: IP not in
allowed networks
Oct 28 13:05:50 mink dovecot: auth(default): client out: FAIL   1265
 [EMAIL PROTECTED]
Oct 28 13:05:50 mink dovecot: auth(default):
cache([EMAIL PROTECTED],x.x.x.x): hit: hidden
[EMAIL PROTECTED]
Oct 28 13:05:50 mink dovecot: auth(default): client out: OK 1266
 [EMAIL PROTECTED]

auth_cache_ttl is set to 300. If I set it to 1 then the allow_nets
successfully rejects. Once I set it back up to 300 the cache overrides
the result from the allow_nets check and let's the account log in even
though the allow_nets check fails.

I've tried waiting for longer than the 300 seconds and then logged in
again, but I still get the same result as above.

Is there a gotcha that I'm unaware of or have I done something stupid
(which seems the most likely :P)?

Thanks
Guy

-- 
Don't just do something...sit there!


Re: [Dovecot] dovecot expire doesn't work (?)

2008-10-28 Thread LÉVAI Dániel

Hi!

Anybody has this working? I mean, at least somebody has to use this 
expire plugin with BDB, no? :D
I think, maybe the problem is withing the plugin { expire = } setting; 
to be honest, I'm a little confused with this.

I have a maildir layout like this:
[..some dirs..]/$USER/Maildir/

Under the above directory, there are the users' subdirectories. So the 
subdirectory in question (spamassassin/SPAM), is 
[..somedirs..]/$USER/Maildir/.spamassassin.SPAM/


# ls -1a [..somedirs..]/$USER/Maildir/.spamassassin.SPAM/
./
../
cur/
dovecot-uidlist
dovecot.index
dovecot.index.cache
dovecot.index.log
maildirfolder
new/
tmp/

According to the WIKI page, I must write this to my dovecot.conf:
plugin {
expire = spamassassin/SPAM 1
expire_dict = proxy::expire
}

That is, if I want to expire the emails under the spamassassin/SPAM 
directory, after 1 day. Is this correct? I'm asking this because with 
this setup, the expire-tool does nothing... nothing in the logs either.
I've experimented with expire = spamassassin.SPAM and 
expire=spamassassin/SPAM/* too, but no luck. Could someone send me 
some working dovecot.conf, and setup, so I can diff it against mine? Or 
maybe just a little tossing in the right direction would be enough.


Thanks in advance!

Daniel


LÉVAI Dániel wrote:

Hi!

I'm using dovecot-1.1.5 and trying to make the expire plugin work.
What I've configured in dovecot.conf is the following:

protocol imap,pop3,lda {
mail_plugins = [...] expire
}

dict {
expire = db:/var/dovecot/expire/expire.db
}


plugin {
  expire = spamassassin/SPAM 2 spamassassin/HAM 2
  expire_dict = proxy::expire
}

I have a sieve rule, to copy certain messages to my spamassassin/SPAM 
folder. Then I want to expire those messages after 2 days (I think I've 
configured that under the plugin{} section in dovecot.conf).
So the actual message saving is done by the dovecot's deliver, but I 
have the plugin loaded under the protocol lda {} section too.
So I thought now I just have to wait 2 days, and run the expire-tool, 
and then it will expire the messages.
Now I have three messages dated back to 10.25, but running the 
expire-tool outputs nothing.

# dovecot --exec-mail ext /usr/local/libexec/dovecot/expire-tool --test

Nothing in the logfiles, and nothing on the console. I have the 
/var/dovecot/expire directory:

# ls -la /var/dovecot/expire/
total 1640
drwx--  2 root  wheel   512 Oct 26 19:47:53 2008 ./
drwxr-x---  3 root  wheel   512 Oct 27 07:57:42 2008 ../
-rw---  1 root  wheel 24576 Oct 27 13:00:01 2008 __db.001
-rw---  1 root  wheel 57344 Oct 27 13:00:01 2008 __db.002
-rw---  1 root  wheel270336 Oct 27 13:00:01 2008 __db.003
-rw---  1 root  wheel 98304 Oct 27 13:00:01 2008 __db.004
-rw---  1 root  wheel 49152 Oct 27 13:00:01 2008 __db.005
-rw---  1 root  wheel 32768 Oct 26 19:47:37 2008 expire.db
-rw---  1 root  wheel  10485760 Oct 27 14:22:08 2008 log.01

It contains the familiar BDB files, so I think it works, although the 
expire.db's modify time is yesterday, but deliver saved some messages 
also today to the spamassassin/SPAM folder.


What could be the problem? Am I missing something?

Thanks!

Daniel




--
LEVAI Daniel
PGP key ID = 0x4AC0A4B1
Key fingerprint = D037 03B9 C12D D338 4412  2D83 1373 917A 4AC0 A4B1


[Dovecot] antispam - Unable to determine the destination user

2008-10-28 Thread Romanczyk Guillaume

Hello,
I'm trying to install dovecot antispam plugin and I've some problems 
with dspam user.
When I move a mail out of 'SPAM' folder I have this error in my 
/var/log/messages :


 Oct 28 17:01:41 tony2 imap: antispam: /usr/bin/dspam --source=error 
--class=innocent --signature=47de4679174462472577556 ...
 Oct 28 17:01:41 tony2 dspam[24313]: Unable to determine the 
destination user

 Oct 28 17:01:41 tony2 dspam[24313]: DSPAM agent misconfigured: aborting

I've tried to install it by 'emerging' and compiling from sources but 
with the same result.


plugin .config :

 BACKEND=dspam-exec
 DOVECOT=/usr/include/dovecot
 INSTALLDIR=/usr/lib/dovecot/imap
 USER=vpopmail   
 GROUP=vpopmail

 #(same result with different user/group)
 antispam_dspam_args = --user;[EMAIL PROTECTED]
 DEBUG=syslog
 DEBUG_VERBOSE=1
 PLUGINNAME=antispam

Mail server configuration :
- NetQmail  (1.05-r8)
- Vpopmail (5.4.16)
- Dovecot (1.1.4-r1)
- dspam   (3.8.0-r13)
All these packages are emerge without mysql support.

If someone is able to give me some help...

--
Guillaume Romanczyk
Itaapy http://itaapy.com Tel +33 (0)1 42 23 67 45
9 rue Darwin, 75018 Paris  Fax +33 (0)1 53 28 27 88 



Re: [Dovecot] antispam - Unable to determine the destination user

2008-10-28 Thread Claudio Prono
Try to put in dspam.conf that line:

MySQLUIDInSignature on



Romanczyk Guillaume ha scritto:
 Hello,
 I'm trying to install dovecot antispam plugin and I've some problems
 with dspam user.
 When I move a mail out of 'SPAM' folder I have this error in my
 /var/log/messages :

  Oct 28 17:01:41 tony2 imap: antispam: /usr/bin/dspam --source=error
 --class=innocent --signature=47de4679174462472577556 ...
  Oct 28 17:01:41 tony2 dspam[24313]: Unable to determine the
 destination user
  Oct 28 17:01:41 tony2 dspam[24313]: DSPAM agent misconfigured: aborting

 I've tried to install it by 'emerging' and compiling from sources but
 with the same result.

 plugin .config :

  BACKEND=dspam-exec
  DOVECOT=/usr/include/dovecot
  INSTALLDIR=/usr/lib/dovecot/imap
  USER=vpopmailGROUP=vpopmail
  #(same result with different user/group)
  antispam_dspam_args = --user;[EMAIL PROTECTED]
  DEBUG=syslog
  DEBUG_VERBOSE=1
  PLUGINNAME=antispam

 Mail server configuration :
 - NetQmail  (1.05-r8)
 - Vpopmail (5.4.16)
 - Dovecot (1.1.4-r1)
 - dspam   (3.8.0-r13)
 All these packages are emerge without mysql support.

 If someone is able to give me some help...


-- 

Claudio Prono
Systems Development @ Atpss.net Srl, Divisione Implementazione Sistemi
Via San Bernardino, 17 - 10137 Torino (TO) - IT
Tel +39-011.32.72.100  Fax +39-011.32.46.497
PGP Fingerprint: 75C2 4049 E23D 2FBF A65F  40DB EA5C 11AC C2B0 3647
Disclaimer: http://atpss.net/disclaimer
 



Re: [Dovecot] antispam - Unable to determine the destination user

2008-10-28 Thread Romanczyk Guillaume

Claudio Prono a écrit :

Try to put in dspam.conf that line:

MySQLUIDInSignature on

  

Even if I do not use MySql ?

--
Guillaume Romanczyk ~ System Administrator
Itaapy http://itaapy.com Tel +33 (0)1 42 23 67 45
9 rue Darwin, 75018 Paris  Fax +33 (0)1 53 28 27 88 



Re: [Dovecot] dovecot expire doesn't work (?)

2008-10-28 Thread e-frog


Anybody has this working? 


Yes.


plugin {
expire = spamassassin/SPAM 1
expire_dict = proxy::expire
}


For me it works by using '.' as hierarchy separator. So in your case expire = 
spamassassin.SPAM 1 should work. This could be different when using namespaces, 
which I don't.

That is, if I want to expire the emails under the spamassassin/SPAM 
directory, after 1 day. Is this correct? I'm asking this because with 
this setup, the expire-tool does nothing... nothing in the logs either.


Try and set mail_debug=yes. It should log more.




Re: [Dovecot] antispam - Unable to determine the destination user

2008-10-28 Thread Hugo Monteiro

Romanczyk Guillaume wrote:

Claudio Prono a écrit :

Try to put in dspam.conf that line:

MySQLUIDInSignature on

  

Even if I do not use MySql ?



If you don't use MySQL you will need to use the --user parameter to set 
the corresponding owner of the signature.


Then you have another problem. You either run the dspam call as the same 
_system_ user as what you are providing in the --user parameter, eg. run 
it as real system user johndoe with --user johndoe, or you are running 
the dspam call as a generic system user, such as mail or other. In 
that case you will need to tell dspam to trust that user in dspam.conf - 
look for the Trust directive.


Another way would be to use the recent (CVS) external lookup feature to 
remap the virtual user to an authorized system user. Either the 
johndoe if there are real system users, or the generic one.


Regards,

Hugo Monteiro.

--
ci.fct.unl.pt:~# cat .signature

Hugo Monteiro
Email: [EMAIL PROTECTED]
Telefone : +351 212948300 Ext.15307

Centro de Informática
Faculdade de Ciências e Tecnologia da
   Universidade Nova de Lisboa
Quinta da Torre   2829-516 Caparica   Portugal
Telefone: +351 212948596   Fax: +351 212948548
www.ci.fct.unl.pt [EMAIL PROTECTED]

ci.fct.unl.pt:~# _



[Dovecot] Cannot use userdb to update Maildir

2008-10-28 Thread Albert E. Whale
I cannot get to the Maildir info for a user.  The user's user_db is set
up in /home/dovecot.passwd.

Here is the transcript of the pop3 connection:

Oct 28 14:56:04 ns6 dovecot: auth(default): client in:
AUTH^I1^IPLAIN^Iservice=pop3^Ilip=66.207.133.228^Irip=71.162.15.2^Ilport=110^Irport=1874^Iresp=hidden
Oct 28 14:56:04 ns6 dovecot: auth(default): client out: CONT^I1^I
Oct 28 14:56:04 ns6 dovecot: auth(default): client in: CONThidden
Oct 28 14:56:04 ns6 dovecot: auth(default):
passwd-file(health,71.162.15.2): lookup: user=health
file=/home/dovecot.passwd
Oct 28 14:56:04 ns6 dovecot: auth(default): client out: OK^I1^Iuser=health
Oct 28 14:56:04 ns6 dovecot: auth(default): master in: REQUEST^I354^I7953^I1
Oct 28 14:56:04 ns6 dovecot: auth(default):
passwd-file(health,71.162.15.2): lookup: user=health
file=/home/dovecot.passwd
Oct 28 14:56:04 ns6 dovecot: auth(default): master out:
USER^I354^Ihealth^Iuid=1152^Igid=1152^Ihome=userdb_mail=maildir
Oct 28 14:56:04 ns6 dovecot: pop3-login: Login: user=health,
method=PLAIN, rip=71.162.15.2, lip=66.207.133.228
Oct 28 14:56:04 ns6 dovecot: POP3(health): Effective uid=1152, gid=1152
Oct 28 14:56:04 ns6 dovecot: POP3(health): mbox:
data=~/mail:INBOX=/var/spool/mail/health
Oct 28 14:56:04 ns6 dovecot: POP3(health): fs:
root=userdb_mail=maildir/mail, index=, control=,
inbox=/var/spool/mail/health
Oct 28 14:56:05 ns6 dovecot: auth(default): new auth connection: pid=8987
Oct 28 14:56:06 ns6 dovecot: POP3(health): Disconnected: Logged out
top=0/0, retr=0/0, del=0/0, size=0


The /home/dovecot.passwd has the following.

 more /home/dovecot.passwd
health:$1$MCtvt/Tz$FmKqU/cbWlBhKnhc5W.Ko.:1152:1152:/home/health:userdb_mail=mai
ldir:~/Maildir


WHY can I get the emails from ~health/Maildir/new ???


-- 
Albert E. Whale, CHS CISA CISSP
Sr. Security, Network, Risk Assessment and Systems Consultant

ABS Computer Technology, Inc. http://www.ABS-CompTech.com - Email,
Internet and Security Consultants
SPAMZapper http://www.Spam-Zapper.com - No-JunkMail.com
http://www.No-JunkMail.com - *True Spam Elimination*.

ns6.ABS-CompTech.com root
[/root] dovecot -n
# 1.1.4: /etc/dovecot.conf
base_dir: /var/run/dovecot/
protocols: imap pop3
ssl_disable: yes
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
login_greeting: SpamZapper Email ready.
mail_max_userip_connections(default): 10
mail_max_userip_connections(imap): 10
mail_max_userip_connections(pop3): 3
verbose_proctitle: yes
mail_privileged_group: mail
mail_location: mbox:~/mail:INBOX=/var/spool/mail/%u
mail_debug: yes
mmap_disable: yes
mail_nfs_storage: yes
mail_nfs_index: yes
lock_method: dotlock
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
pop3_uidl_format(default): %08Xu%08Xv
pop3_uidl_format(imap): %08Xu%08Xv
pop3_uidl_format(pop3): %08Xv%08Xu
auth default:
  username_format: %Lu
  verbose: yes
  debug: yes
  passdb:
driver: passwd-file
args: /home/dovecot.passwd
  passdb:
driver: pam
  userdb:
driver: passwd-file
args: /home/dovecot.passwd
  userdb:
driver: passwd




Re: [Dovecot] Cannot use userdb to update Maildir

2008-10-28 Thread e-frog



 more /home/dovecot.passwd
health:$1$MCtvt/Tz$FmKqU/cbWlBhKnhc5W.Ko.:1152:1152:/home/health:userdb_mail=mai
ldir:~/Maildir


I guess you need two ':' between 1152 and /home/health and 
userdb_mail=maildir:~/Maildir

So the line should look like this:

health:$1$MCtvt/Tz$FmKqU/cbWlBhKnhc5W.Ko.:1152:1152::/home/health::userdb_mail=maildir:~/Maildir


[Dovecot] patch: list shared namespace

2008-10-28 Thread Bernhard Herzog
Hi,

I've been working on a patch for dovecot 1.2 from the Kolab branch
(http://hg.intevation.org/kolab/dovecot-1.2_kolab-branch/) that
implements listing of shared namespaces.  I've got something that works
in some basic way but is still missing some pieces.  See the attached
patch, which also contains some installation and configuration notes.


Implementation notes: 

One of the main problems the patch addresses is getting a list of all
users that have mailboxes the logged in user can see.  The patch uses a
dict to cache information about which users have at least one mailbox
that is visible to other users.  The dict doesn't cache which other
users, though.  The cache entry for a given user is updated whenever the
dovecot-acl-list file in the maildir root directory is updated.  This
ties the implementation to a specific acl backend to an extent, but that
shouldn't be a problem at the moment.

Another problem is that namespaces for all those users have to be
created.  The patch does that in shared-storage.c when the shared
storage is created.  At this stage of development of the patch that
works well enough, I think, but it might be better to update the
namespaces whenever a list iterator is created.

To avoid unnecessary coupling between the shared namespace code and the
ACL plugin, the shared namespace code has a hook that it calls when it
needs a list of all the users who may have mailboxes visible to the
current user.  The ACL plugin sets that hook and uses the dict to
produce that list.  This way, the ACL plugin depends on the shared
namespace code but not the other way round and all the dict handling is
in the ACL plugin.

I'm not sure the new hook is really needed.  The patch could perhaps
just as well extend the acl_next_hook_mail_storage_created and
acl_next_hook_mailbox_list_created functions to do the namespace
creation when they're called for a shared storage or mailbox list.


Problems:

All of my tests so far involved a shared namespace of the form

namespace shared {
  separator = /
  prefix = users/%%u/
  location = maildir:.../var/mail/%%u:...
  subscriptions = no
  list = yes
  hidden = no
}

Also, let's assume two users, ford and arthur with ford's INBOX/hhgttg
available to arthur as users/ford/INBOX/hhgttg.  Arthur may not list
ford's INBOX, though.  In the following the current user is always
arthur.

I found the following problems:

 - LIST response includes namespaces the user doesn't really have access
   to.  E.g. if there's another user, zaphod who's made some mailbox
   available to somebody else, but not arthur, arthur still sees

   * LIST (\Noselect \HasChildren) / users/zaphod

   Not sure it's worth fixing this, though.

 - List with % doesn't list all intermediate mailboxes.

   On the one hand arthur sees this:

 x LIST  *
 ...
 * LIST (\Noselect \HasChildren) / users/ford
 * LIST (\HasNoChildren) / users/ford/INBOX/hhgttg
 x OK List completed.

   OTOH, with % only this:

 x LIST  users/ford/%
 x OK List completed.

   cyrus shows

 x LIST  users/ford/%
 * LIST (\Noselect \HasChildren) / users/ford/INBOX
 x OK List completed.

   At least Kontact resp. KMail rely on this.

 - The dovecot-acl-list is not always rebuilt, even when it should have
   been, AFAICT.  In particular, if the file exists but is empty, it's
   never updated, even when ACL later change.  Maybe this is a bug in
   the Kolab branch.


Cheers,

   Bernhard

-- 
Bernhard Herzog  |  ++49-541-335 08 30  |  http://www.intevation.de/
Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 18998
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
Patch to add listing of shared namespaces to dovecot 1.2.
The patch was produced for dovecot revision 97ed7b408525.

To install, apply the patch, and regenerate the Makefile.in files with
autogen.sh and rerun configure and make.

To configure, create an entry for dict section of dovecot.conf like this:

   acl_shared_dict = sqlite:$PREFIX/etc/acl-shared-dict.conf

with the acl-shared-dict.conf containing this:

   connect = $PREFIX/var/lib/dovecot/acl-shared-ns.sqlite

   map {
 table = acl_shared_ns
 pattern = shared/acl_shared_ns/$owner
 value_field = has_visible_folders
 fields {
   owner = $owner
 }
   }


The corresponding table in the sqlite database can be created with

   CREATE TABLE acl_shared_ns (
owner,
has_visible_folders,
PRIMARY KEY (owner) ON CONFLICT REPLACE
   );


In the imap section of dovecot.conf, add 

   acl_shared_dict = proxy::acl_shared_dict



diff -r 97ed7b408525 src/lib-storage/index/shared/shared-storage.c
--- a/src/lib-storage/index/shared/shared-storage.c	Tue Oct 28 10:08:33 2008 +0100
+++ b/src/lib-storage/index/shared/shared-storage.c	Tue Oct 28 16:44:46 2008 +0100
@@ -15,6 +15,10 @@ static MODULE_CONTEXT_DEFINE_INIT(shared
 static MODULE_CONTEXT_DEFINE_INIT(shared_mailbox_list_module,
   

Re: [Dovecot] Cannot use userdb to update Maildir

2008-10-28 Thread Albert E. Whale
e-frog wrote:

  more /home/dovecot.passwd
 health:$1$MCtvt/Tz$FmKqU/cbWlBhKnhc5W.Ko.:1152:1152:/home/health:userdb_mail=mai

 ldir:~/Maildir

 I guess you need two ':' between 1152 and /home/health and
 userdb_mail=maildir:~/Maildir

 So the line should look like this:

 health:$1$MCtvt/Tz$FmKqU/cbWlBhKnhc5W.Ko.:1152:1152::/home/health::userdb_mail=maildir:~/Maildir


Great,  I thank you, however that has not changed the communications at all.

Oct 28 16:42:17 ns6 dovecot: auth(default): client in:
AUTH^I1^IPLAIN^Iservice=pop3^Ilip=66.207.133.228^Irip=71.162.15.2^Ilport=110^Irport=2635^Iresp=hidden
Oct 28 16:42:17 ns6 dovecot: auth(default): client out: CONT^I1^I
Oct 28 16:42:17 ns6 dovecot: auth(default): client in: CONThidden
Oct 28 16:42:17 ns6 dovecot: auth(default): passwd-file
/home/dovecot.passwd: Read 1 users
Oct 28 16:42:17 ns6 dovecot: auth(default):
passwd-file(health,71.162.15.2): lookup: user=health
file=/home/dovecot.passwd
Oct 28 16:42:17 ns6 dovecot: auth(default): client out:
OK^I1^Iuser=health^I~/Maildir=
Oct 28 16:42:17 ns6 dovecot: auth(default): master in:
REQUEST^I365^I27263^I1
Oct 28 16:42:17 ns6 dovecot: auth(default):
passwd-file(health,71.162.15.2): lookup: user=health
file=/home/dovecot.passwd
Oct 28 16:42:17 ns6 dovecot: auth(default): master out:
USER^I365^Ihealth^Iuid=1152^Igid=1152^Ihome=/home/health
Oct 28 16:42:17 ns6 dovecot: pop3-login: Login: user=health,
method=PLAIN, rip=71.162.15.2, lip=66.207.133.228
Oct 28 16:42:17 ns6 dovecot: POP3(health): Effective uid=1152, gid=1152
Oct 28 16:42:17 ns6 dovecot: POP3(health): mbox:
data=~/mail:INBOX=/var/spool/mail/health
Oct 28 16:42:17 ns6 dovecot: POP3(health): fs: root=/home/health/mail,
index=, control=, inbox=/var/spool/mail/health
Oct 28 16:42:17 ns6 dovecot: POP3(health): Disconnected: Logged out
top=0/0, retr=0/0, del=0/0, size=0
Oct 28 16:42:17 ns6 dovecot: auth(default): new auth connection: pid=31252



-- 
Albert E. Whale, CHS CISA CISSP
Sr. Security, Network, Risk Assessment and Systems Consultant

ABS Computer Technology, Inc. http://www.ABS-CompTech.com - Email,
Internet and Security Consultants
SPAMZapper http://www.Spam-Zapper.com - No-JunkMail.com
http://www.No-JunkMail.com - *True Spam Elimination*.


Re: [Dovecot] Dovecot and quota enforcement - only reporting?

2008-10-28 Thread dovecot


Wow, that clearly shows I'm not really sure what 
I'm doing, as I don't really understand the question.


I'm running Postfix, with Dovecot on top. Uses 
check mail via Outlook/IMAP, or Web/Squirrelmail.


Rick


At 04:29 AM 10/28/2008, Joseba Torre wrote:

How are you delivering your mails to mailboxes? If you don't use dovecot's
deliver quota won't get updated (unless you use filesystem quota)

HTH


El Lunes, 27 de Octubre de 2008 a las 17:53, [EMAIL PROTECTED] escribió:
 At 10:48 PM 10/21/2008, Rick Steeves wrote:
 When I delete mail and expunge it, the quota updates.  However,
 inbound email doesn't appear to update the quota.
 
 Two questions, probably related:
 What causes the quota (which I presume is the maildirsize file) to update?
 Is there any actual quota enforcement, or just reporting? Because if
 I send mail to an account, even if it currently reporting (via
 maildirsize or . getquotaroot) that the user is over quota, they
 still can send and receive email.

 Just checking to see if there are any insights here.

 Rick



--
Joseba Torre. CIDIR Bizkaia.







Re: [Dovecot] read only FS access

2008-10-28 Thread Asheesh Laroia

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] First release (v0.1.0) of the new Sieve implementation for Dovecot v1.2

2008-10-28 Thread seriv
Hi Stephan,

I had a problem while compiling 0.1.0 libsieve with gcc3.4.
---
/usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared 
with attribute error: open with O_CREAT in second argument needs 3 arguments
---
I propose a patch:

$ cat dovecot-1.2-libsieve-gcc34.patch
diff -ur dovecot1.2-libsieve-v1.2.orig/src/sieve-bin/bin-common.c 
dovecot1.2-libsieve-v1.2/src/sieve-bin/bin-common.c
--- dovecot1.2-libsieve-v1.2.orig/src/sieve-bin/bin-common.c2008-10-28 
21:37:16 +
+++ dovecot1.2-libsieve-v1.2/src/sieve-bin/bin-common.c 2008-10-28 21:24:57 
+
@@ -116,7 +116,7 @@
if ( strcmp(filename, -) == 0 )
dumpstream = o_stream_create_fd(1, 0, FALSE);
else {
-   if ( (dfd = open(filename, O_WRONLY | O_CREAT))  0 ) {
+   if ( (dfd = open(filename, O_WRONLY | O_CREAT, 0660))  0 ) {
i_fatal(Failed to open dump-file for writing: %m);
exit(1);
}
diff -ur dovecot1.2-libsieve-v1.2.orig/src/testsuite/testsuite.c 
dovecot1.2-libsieve-v1.2/src/testsuite/testsuite.c
--- dovecot1.2-libsieve-v1.2.orig/src/testsuite/testsuite.c 2008-10-28 
21:37:16 +
+++ dovecot1.2-libsieve-v1.2/src/testsuite/testsuite.c  2008-10-28 21:35:18 
+
@@ -119,7 +119,7 @@
if ( strcmp(filename, -) == 0 )
dumpstream = o_stream_create_fd(1, 0, FALSE);
else {
-   if ( (dfd = open(filename, O_WRONLY | O_CREAT))  0 ) {
+   if ( (dfd = open(filename, O_WRONLY | O_CREAT, 0660))  0 ) {
i_fatal(Failed to open dump-file for writing: %m);
exit(1);
}

-- 
   Sergey Ivanov.

- Stephan Bosch [EMAIL PROTECTED] wrote:

 Hello Dovecot users,
 
 Finally, after little more than a year, I finished the first release
 of 
 the new Sieve implementation for Dovecot.
[skip]
 Have fun testing the new Sieve plugin. Don't hesitate to notify me
 when 
 there are problems.
 
 Regards,
 
 -- 
 Stephan Bosch
 [EMAIL PROTECTED]
 IRC: Freenode, #dovecot, S[r]us


Re: [Dovecot] First release (v0.1.0) of the new Sieve implementation for Dovecot v1.2

2008-10-28 Thread Stephan Bosch

[EMAIL PROTECTED] schreef:

Hi Stephan,

I had a problem while compiling 0.1.0 libsieve with gcc3.4.
---
/usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared 
with attribute error: open with O_CREAT in second argument needs 3 arguments
---
I propose a patch:
Hmm, you are right. Not sure why Gcc 4.3 does not complain about this. I 
also forgot O_TRUNC over there.


FIXED: http://hg.rename-it.nl/dovecot-libsieve/rev/8dcba4f38a67

Thnx,

--
Stephan Bosch
[EMAIL PROTECTED]