Re: [Dovecot] Weird Problem with subscriptions

2010-08-19 Thread Harry Lachanas

Timo Sirainen wrote:

On Thu, 2010-08-19 at 13:19 +0300, Harry Lachanas wrote:

  

namespace public {
prefix=Public/
separator = /
location = 
maildir:/home/Public-Folders-Mail/Public-RO:INDEX=~/Maildir/p1-idx:CONTROL=~/Maildir/p1-ctrl

hidden = no
subscriptions = no
inbox = no
}



Looks correct..

  

The problem occurs after a user has subscribed to The Folder

dovecot complaints about ...

dovecot: IMAP(grharry): 
open(/home/grharry/Maildir/p1-idx/.production/dovecot.index.log) failed: 
Permission denied (euid=1004(grharry) egid=1000(vmail) missing +x perm: 
/home/grharry/Maildir/p1-idx/.production)


After changing manually the perm in the above dir +x all works fine.



What were the permissions before? What are the permissions
of /home/Public-Folders-Mail/Public-RO/.production?

Kitos timo,

drw-r-xr--


Harry



[Dovecot] Weird Problem with subscriptions

2010-08-19 Thread Harry Lachanas


Dovecot Version 1.2.11


Created Public Namespaces and folders

idx and control are created in each users Maildir/
aka

namespace public {
   prefix=Public/
   separator = /
   location = 
maildir:/home/Public-Folders-Mail/Public-RO:INDEX=~/Maildir/p1-idx:CONTROL=~/Maildir/p1-ctrl

   hidden = no
   subscriptions = no
   inbox = no
}

The problem occurs after a user has subscribed to The Folder

dovecot complaints about ...

dovecot: IMAP(grharry): 
open(/home/grharry/Maildir/p1-idx/.production/dovecot.index.log) failed: 
Permission denied (euid=1004(grharry) egid=1000(vmail) missing +x perm: 
/home/grharry/Maildir/p1-idx/.production)


After changing manually the perm in the above dir +x all works fine.

I've tried unsubscribing and deleting the p1-ctl p1-idx dir structures

The same problem occured ( This hapens in the users own Maildir  )

Your help  will be appreciated

Regards

Harry



[Dovecot] postfix+lda+ virtual users, confusion

2010-05-19 Thread Harry Lachanas

I thought it would be nice to have vboxes insead of user logins ...

Now I am confuesed and in trouble ..

My server serves  2 domains
so
us...@domain1.com
is  the same as
us...@domain2.org


I've created the mail_location string with %n
and static userdb with %n

dovecot creates 2 mail user  directories 
us...@domain1.com

us...@domain2.org

What the heck am I missing ..  ??

Your help is appreciated
Regards
Harry

Here is my config
---
base_dir = /var/run/dovecot/
protocols = imap imaps
log_timestamp = "%Y-%m-%d %H:%M:%S "
ssl_cert_file = /etc/postfix/sasl/cacert.org/mail.pem
ssl_key_file = /etc/postfix/sasl/cacert.org/mail.pem
ssl_ca_file = /etc/postfix/sasl/cacert.org/cacert.org-root.crt
login_greeting = Hi buddy, have an account ??
mail_location = maildir:/home/vmail/%n/Maildir/
namespace private {
  separator = /
  prefix =
 
  location = maildir:~/Maildir/

  inbox = yes
}
namespace public {
   prefix = Public/
   separator = /
   location = 
maildir:/home/Public-Folders-Mail/Public-RO:INDEX=~/Maildir/p1-idx:CONTROL=~/Maildir/p1-ctrl

   hidden=no
   subscriptions=no
   inbox = no
   list=no
}
namespace public {
   prefix = Public-Shared/
   separator = /
   location = 
maildir:/home/Public-Folders-Mail/Public-RW:INDEX=~/Maildir/p2-idx

   hidden = no
   subscriptions = no
   inbox = no
   list = no
}
mail_privileged_group = mail
mail_debug = yes
verbose_proctitle = yes
valid_chroot_dirs = /var/mail:/home/Public-Folders-Mail
dbox_rotate_size = 2048
dbox_rotate_min_size = 16
dbox_rotate_days = 0
protocol imap {
 mail_plugins = zlib autocreate expire
 imap_client_workarounds = outlook-idle

}

protocol pop3 {
 pop3_uidl_format = %08Xu%08Xv
 mail_plugins = expire
}
protocol lda {
 postmaster_address = ha...@domainxxx.com
 hostname = mail.domain1.com
 sendmail_path = /usr/sbin/sendmail
 auth_socket_path = /var/run/dovecot/auth-master
 mail_plugins =  expire
}
auth default {
 mechanisms = plain
 passdb passwd-file {
 args = scheme=plain-md5 username_format=%n 
/usr/local/dovecot/etc/imap.pass3

 }
 userdb static {
  args = uid=1001 gid=1001 home=/home/vmail/%n
 }
 userdb passwd {
 }
 user = root
 socket listen {
   master {
 path = /var/run/dovecot/auth-master
 mode = 0600
 user = vmail
 group= vmail
   }
   client {
 path = /var/spool/postfix/private/auth
 mode = 0660
 user = postfix
 group = postfix
   }
 }
}
dict {
 expire = db:/var/lib/dovecot/expire.db
}
plugin {
 autocreate = Spam
 autosubscribe = Spam
 autocreate1= Public-Shared/Info
 autosubscribe1= Public-Shared/Info
 autocreate2= Undetected-Spam
 autosubscribe2= Undetected-Spam
 expire = Trash 2 Trash/* 2 Spam 4
 expire_dict = proxy::expire
 auth_socket_path = /var/run/dovecot/auth-master
}
-





[Dovecot] Maildir and mail files question

2009-03-20 Thread Harry Lachanas


If an incoming mail is saved in 2 mail locations via dovecot deliver,
and its wished that if deleted from box "a" should also be deleted from 
box "b" ...


wil it be safe to delete based upon the W=x part of the file name 

So far my tests indicate that It could be true ...

Thanks
Harry




[Dovecot] expire tool in 1.1.11

2009-03-15 Thread Harry Lachanas

Hi,

I am on dovecot 1.1.11 trying to figure out the expire tool 

The thing is that when I had confed the exp tool there where a bunch of 
mails inside the mail boxes.

Thus it seems as if the database is not updated about them.
Is there a way to update it from command line to include the old mails ???

Thanks
Harry



Re: [Dovecot] Quick question...

2009-02-25 Thread Harry Lachanas

dove...@segel.com wrote:

Hi,

Here's the scenario.

I want to set up a mailbox so that when mail sent to the address is piped to
a processing application, instead of going to a mailbox.

One way I can do this is to set up a mailbox and then have an application
that checks to see if there's mail and then processes it.
(Old school Unix script)

Is there a way to set it up with dovecot? 
(Cleaner solution)


Thx

-Mike

  

I am sure this can be done with sieve but I am starting to learn it now 

With procmail it's just trivial 
After making sure it is a mail destined to your application, you just 
pipe it there


# Last delivering recepie after spam cheks etc 
:0
| /path/to/my/processing/application 

You might also have a look at ripmime ( rips mime attachements from a 
mail ) ...

so you can combine all 

Cheers
Harry.







[Dovecot] Calling dovecot deliver from procmail

2009-02-24 Thread Harry Lachanas

I came up with this trick
That is
Since my previous mail server had a bunch of complex  procmail recipies
and I am not sure  that I can turn them into sieve scripts
I am calling dovecot deliver to drop mail in it's final $DEFAULT 
destination.


:0
| /some/path/dovecot/deliver


in order to update the index, control files etc upon delivery time.

So far in my "tests" it works.

But I wonder if this is wise or not.

Regards,

Harry.



Re: [Dovecot] Autocreate plugin

2009-02-20 Thread Harry Lachanas

Harry Lachanas wrote:
I've tried to use the autocreate plugin in order to autosubscribe 
users  to public namespaces.


namespace public {
   prefix = Public2/
   separator = /
   location = 
maildir:/var/Public2:INDEX=~/Maildir/p-idx:CONTROL=~/Maildir/p-crtl

   hidden=no
   subscriptions=no
   inbox = no
   list=no
}

with

plugin {
 autocreate = Spam
 autosubscribe = Spam
 autosubscribe1 = Public2/News
 autosubscribe2 = Public2/Shorewall
}


the plugin works alright  with the  Spam  maildir,
but not with the namespaces.
Is this possible ???

Thanks
Harry.




Problem solved 

Thanks for no replying 

I makes me think of it a bit more 

Harry



[Dovecot] Autocreate plugin

2009-02-19 Thread Harry Lachanas
I've tried to use the autocreate plugin in order to autosubscribe users  
to public namespaces.


namespace public {
   prefix = Public2/
   separator = /
   location = 
maildir:/var/Public2:INDEX=~/Maildir/p-idx:CONTROL=~/Maildir/p-crtl

   hidden=no
   subscriptions=no
   inbox = no
   list=no
}

with

plugin {
 autocreate = Spam
 autosubscribe = Spam
 autosubscribe1 = Public2/News
 autosubscribe2 = Public2/Shorewall
}


the plugin works alright  with the  Spam  maildir,
but not with the namespaces.
Is this possible ???

Thanks
Harry.




Re: [Dovecot] Time moved backwards ....

2009-02-18 Thread Harry Lachanas

to...@tuxteam.de wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, Feb 18, 2009 at 05:17:18PM +0200, Harry Lachanas wrote:
  

OK..
So I synced  the clock
and got 

dovecot: Time just moved backwards by 1 seconds. I'll sleep now until we're 
back in present. http://wiki.dovecot.org/TimeMovedBackwards


( The first time I did this the clock moved backwards 2 hours after a 
timezone change and dovecot suicided )

I think I understand the concept ...
However a mail server should probably be synchronized to the local time 



You don't really mean what you are saying, I think. Anyway: what do you
  

of course I do .
The server I was talking about was a test server, fresh install, and I 
corrected the time zone 

So If U are offended, I am sorry 
On the other hand if U have NOT something real to share  please do 
not answer  at least with an empty answer 
You will probably  make  other  people  tired + disappointed  too,  
searching  the list  trying to locate the answer to this question 



do with all those little file timestamps coming from the future?
  
I haven't reached the point where a summer or winter time change 
happened ... :-) , yet .
I would hate the moment that I would have to explain to my users that 
they have to wait  for a couple of hours 

until the server wakes up again ...
Also add that I tend not to explain in techno-mambo-jumbo-geek ( 
metaphorically  ;-) )  terminology what is going on  


Having said all of the above ...

My apologies to the list for the extra paragraphs and being of-topic ...

Cheers,
Harry.


Many servers dislike time jumping backwards. I've seen even cron killing
itself. Above reaction of dovecot is indeed quite friendly.

FWIW -- if I have to turn back the clock of a server I don't want to
reboot, I just slow down the clock and wait...

Regards
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFJnCoIBcgs9XrR2kYRAvaTAJwMsK2IcRN6WDJcnaVrvuALzrmQmACfVC9O
HJzrzZZl3FLDq90AhgTimUk=
=4PDz
-END PGP SIGNATURE-

  




[Dovecot] Time moved backwards ....

2009-02-18 Thread Harry Lachanas

OK..
So I synced  the clock
and got 

dovecot: Time just moved backwards by 1 seconds. I'll sleep now until 
we're back in present. http://wiki.dovecot.org/TimeMovedBackwards


( The first time I did this the clock moved backwards 2 hours after a 
timezone change and dovecot suicided )

I think I understand the concept ...
However a mail server should probably be synchronized to the local time 
.


Suggestions ...???

Harry.



Re: [Dovecot] Dovecot 1.1.11 imap namespaces .... access rights

2009-02-11 Thread Harry Lachanas

Kiitos Timo ,,,


On Wed, 2009-02-11 at 19:22 +0200, Harry Lachanas wrote:
  
Is there a way to prohibit users of creating  subfolder(s) under a 
Public Namespace ???


..
  

namespace:
  type: public
  separator: /
  prefix: Public/
  location: 
maildir:/home/Public:INBOX=~/Maildir:INDEX=~/Maildir/p-idx:CONTROL=~/Maildir/p-ctrl



You don't need to specify INBOX here, since this namespace has no INBOX.

  

  passdb:
driver: pam
  userdb:
driver: passwd



So you're using multiple UIDs? How about just removing filesystem write
permissions from /home/Public?

  
But this would disable users from dumping mails into the folders right 
 ???


Thanks
Harry.





Re: [Dovecot] Dovecot 1.1.11 imap namespaces .... access rights

2009-02-11 Thread Harry Lachanas

Thomas Hummel wrote:

On Wed, Feb 11, 2009 at 07:22:50PM +0200, Harry Lachanas wrote:

  
Is there a way to prohibit users of creating  subfolder(s) under a 
Public Namespace ???



Isn't that (for users (as opposed to admins) to create subfolders in a public
namespacejust impossible with 1.1.x) ? 

  

You got me ! :-(    puzzled ?   er.!
Now I am not so sure what I really meant when I asked the question! :-) :-)
Not to mention yours !!!

Cheers
Harry


[Dovecot] Dovecot 1.1.11 imap namespaces .... access rights

2009-02-11 Thread Harry Lachanas

Hi all,

Is there a way to prohibit users of creating  subfolder(s) under a 
Public Namespace ???


Here is my conf
#--
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imaps
ssl_ca_file: /etc/postfix/sasl/cacert.pem
ssl_cert_file: /etc/postfix/sasl/cert.pem
ssl_key_file: /etc/postfix/sasl/key.pem
login_dir: /var/run/dovecot//login
login_executable: /usr/local/dovecot-1.1.11/libexec/dovecot/imap-login
valid_chroot_dirs: /var/mail
mail_privileged_group: mail
mail_location: maildir:~/Maildir
mail_debug: yes
imap_client_workarounds: outlook-idle
namespace:
 type: private
 separator: /
 location: maildir:~/Maildir
 inbox: yes
 list: yes
 subscriptions: yes
namespace:
 type: public
 separator: /
 prefix: Public/
 location: 
maildir:/home/Public:INBOX=~/Maildir:INDEX=~/Maildir/p-idx:CONTROL=~/Maildir/p-ctrl

 list: yes
auth default:
 mechanisms: plain login
 passdb:
   driver: pam
 userdb:
   driver: passwd
 socket:
   type: listen
   client:
 path: /var/spool/postfix/private/auth
 mode: 432
 user: postfix
 group: postfix
#

Cheers
Harry.



Re: [Dovecot] Smooth mailbox to maildir migration

2009-02-10 Thread Harry Lachanas

Luciano Mannucci wrote:

Hi all,

I have a postfix+procmail+dovecot installation, now running basicaly
on pop3 hence mailbox format, with few thousand users and less than
twenty gigabytes mail.
I need to move all of them to maildir, to take advantage of IMAP
subfolders that do not work with mbox format (so I'm told :).
  
Also take into consideration that you will need much more disk space for 
this 


Harry

Of course I cannot safely stop the service for more than a bunch of
seconds...

What I'm about to do:

create a second dovecot instance to cope with imap client configured
for maildir (and possibly pop3 on another port for those using both),
which means a dovecot launched with -c /path/to/alternate.conf and a
new /etc/init.d/dovecot2-theRevenge having the proper -i option given
to startproc in order to make it ignore the other instance.

for each user:

convert the mailbox with some sort of mb2mb (which is the better one?)

create a .procmailrc with a proper DEFAULT= bearing the magic trailing
slash indicating maildir to procmail for each converted user.

And I'm done...

Have I forgotten something?
Is there a better way?
Any one else tryed such a thing?

Cheers to all,

luciano.
  




Re: [Dovecot] Smooth mailbox to maildir migration

2009-02-10 Thread Harry Lachanas

Luciano Mannucci wrote:

Hi all,

I have a postfix+procmail+dovecot installation, now running basicaly
on pop3 hence mailbox format, with few thousand users and less than
twenty gigabytes mail.
I need to move all of them to maildir, to take advantage of IMAP
subfolders that do not work with mbox format (so I'm told :).
Of course I cannot safely stop the service for more than a bunch of
seconds...

What I'm about to do:
  

I warn you that I am very new to this ...

But have a look at the Convert plugin 

I Think it can answer some of your questions .

harry


create a second dovecot instance to cope with imap client configured
for maildir (and possibly pop3 on another port for those using both),
which means a dovecot launched with -c /path/to/alternate.conf and a
new /etc/init.d/dovecot2-theRevenge having the proper -i option given
to startproc in order to make it ignore the other instance.

for each user:

convert the mailbox with some sort of mb2mb (which is the better one?)

create a .procmailrc with a proper DEFAULT= bearing the magic trailing
slash indicating maildir to procmail for each converted user.

And I'm done...

Have I forgotten something?
Is there a better way?
Any one else tryed such a thing?

Cheers to all,

luciano.
  




[Dovecot] Dovecot Newbie v1.1.10 + and shared folders.

2009-02-01 Thread Harry Lachanas

Hi all,

I finally manged to create somehow shared folders in dovecot imap ...

After a number trials I came up with this conf from my test server
#--

#dovecot --build-options
SQL drivers: mysql
Passdb: checkpassword pam passwd passwd-file shadow sql
Userdb: nss passwd passwd-file prefetch sql static
#---
protocols = imap imaps
log_timestamp = "%Y-%m-%d %H:%M:%S "
ssl_cert_file = /etc/postfix/sasl/mycert.pem
ssl_key_file = /etc/postfix/sasl/mycert.pem
mail_location = maildir:~/Maildir

namespace private {
separator = /
prefix =

location = maildir:~/Maildir
inbox = yes
}
namespace public {
prefix = Public/
separator = /
location = 
maildir:/var/Public:INBOX=~/Maildir:INDEX=~/Maildir/p-index:CONTROL=~/Maildir/p-ctrl

hidden=no
subscriptions=no
inbox = no
}
namespace public {
prefix = Public2/
separator = /
location = 
mbox:/var/Public2/mboxes:INBOX=~/Maildir:INDEX=~/Maildir/p2-index:CONTROL=~/Maildir/p2-ctrl

hidden=no
subscriptions=no
inbox = no
}
mail_privileged_group = mail
mail_debug = yes
valid_chroot_dirs = /var/mail
protocol imap {
mail_plugins = convert
imap_client_workarounds = outlook-idle
}

protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
}
auth default {
mechanisms = plain login
passdb pam {
}
userdb passwd {
}
user = root
socket listen {
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
}
dict {
}
plugin {
}
#
However I observed that
a) dovecot-shared file is not honored unless located in inside the 
maildir stucture  ( just above cur,tmp,new )
b) when mbox format is used dovecot-shared file does not get honored at 
all ... ( ie a user creates another mailbox in the directory ).
c) Is there a way to reject mbox or maildir file/dir creations by the 
users in a shared folder ??


I've used a mailbox format public namespace in order to be simple and 
have users dump undetected spam there for latter use in sa-learn --spam .


Please understand that I am quite new to this ( confused as well ), thus 
some of my questions might seem naive ( at least ) ..


Cheers
Harry.