Re: [Dovecot] Disable IMAP for certain users, but not Webmailer

2007-08-05 Thread Don Russell

FORMER 03 | Baltasar Cevc wrote:

Hi Russel,

On Sun, 05 Aug 2007 08:28:12 -0700
Don Russell <[EMAIL PROTECTED]> wrote:

  

1 - storage is cheap - Costco sells a 1 TByte external drive for
approx $US 300. That holds a LOT of e-mail. The 500 GByte is less
than half that price.


The problem is not storage as such. It's reliability of storage. For
a good server, you need a hardware raid + backup, the latter being
the real problem (mostly the time to make the backup, 1 TB would need
quite some hours ;-)
  


Presumably you would not accumulate 1 TByte of data before your first 
backup using incremental back up would alleviate the time problem.


So what I'm hearing is you will back up the mail on the server, but the 
mail retrieved by POP3 is the user's responsibility... i.e. it won't get 
backed up.


So you want to restrict IMAP use to only those users who need their mail 
backed up.  ;-)


Not sure what your situation is, but in the USA laws are underway for 
requiring corporations to keep ALL e-mail ... not sure what the state of 
those laws are maybe they won't materialize but obviously people 
are thinking along those lines...


Based on your e-mail address, I assume you are not subject to US laws 
etc... but I think it's a "sign" of things to come in the corporate world.


Anyway, I've taken this a bit off track... I do not know exactly how to 
implement what you asked for POP3 for some, IMAP for others. :-(


Off the top of my head since both of those protocols need 
authentication it ought to be possible to define credentials on a 
per-user basis so IMAP is successful only for some users. I would 
research IMAP authentication methods... you want the password file 
(database, whatever) to contain only a subset of the system users 
shouldn't be too difficult, just a bit of "double entry" when adding new 
users to te system.


Re: [Dovecot] Subfolders

2007-08-05 Thread Don Russell

Scott Silva wrote:

Azher Amin spake the following on 8/5/2007 3:59 AM:
  

Hi,

Does dovecot supports sub folders ?? I tried creating a subfolder for a
folder under the main tree  Thunderbird allows you creating but
doesn't show up ...

Plz suggest how it can be enabled.

Regards
-Azher



Dovecot with thunderbird only seems to support sub folders if you are using
maildir type mailstores. I don't think it will work if using mbox.
  


Not true. I use Thunderbird as my mail client, and create subfolders... 
I use mbox. (Though I intend to convert to maildir eventually)
When you create a folder, you have to decide whether the folder will 
contain messages only, or other folders. Folders and mesages can not be 
contained in the same folder.


Re: [Dovecot] Disable IMAP for certain users, but not Webmailer

2007-08-05 Thread Don Russell

FORMER 03 | Baltasar Cevc wrote:

Hi everybody,

I'm planning to set up our new mail system using the Dovecot mailbox
server. It mostly works fine yet (it's quite straigt forward to set up,
I'd say), but there's a thing I haven't been able to find out yet. We
provide POP3 access for all users, but want to restrict IMAP access to
some of them (because IMAP users tend to leave more messages on the
server, thus increasing storage needs).

  

[snip]

1 - storage is cheap - Costco sells a 1 TByte external drive for approx 
$US 300. That holds a LOT of e-mail. The 500 GByte is less than half 
that price.

2 - why not enforce quotas? I assume you could set quotas by user.

POP users could opt to keep a copy on the server, so that doesn't 
guarantee anything.


I prefer IMAP because then I can access the same mail from different 
clients computers...





Re: [Dovecot] deleting maildir files

2007-07-17 Thread Don Russell

Kirill Miazine wrote:

* Don Russell [2007-07-16 10:23]:

Can we delete maildir files directly from the file system?

[...]

And if we cannot delete files with the 'rm' command, whats the
best/proper way to delete these older files.


My opinion has always been that the data structure should not be 
replied upon if you want to do things with your mail items, then 
use the APIs/imap commands to do it. That protects you from any 
internal stuff you didn't know about, or changed from one server to 
another, or one version to another.


Maildir is a sort of a standard with some sort of an API, isn't it? The
"standard" (<http://cr.yp.to/proto/maildir.html>) says following:

An MUA can read and delete messages while new mail is being
delivered: each message is stored in a separate file with a
unique name, so it isn't affected by operations on other messages.


True, but why tie my script to one format, when it can work equally well 
with *any* format supported by the IMAP server? :-) If new and improved 
formats develop, I don't have to rewrite my scripts. :-)




For example, I have the beginnings of a script to handle my "mail 
retention policies". It connects to Dovecot/imap to get the list of 
mail for specific folders, then uses the imap delete (or copy) API to 
delete mail older than n days, or to keep only the most recent n 
messages. That sort of thing.


With Maildir it's trivial to do this sort of things with a shell script.


Yes, I suppose it is. :-) However, in my case (and I wrote the script 
for my own use) my mail is in mbox format. Eventually I want to convert 
it to maildir or something else (dbox?) and since my script uses the 
IMAP interface, I won't have to change anything, the IMAP server does 
all the heavy lifting. :-)




The benefit is my script then doesn't care how Dovecot (or whichever 
server) stores things and if a mailbox changes from mbox to 
maildir format, or similar change.. no worries... my script just 
doesn't care... it always uses the APIs to manipulate mail.


Safe, but admittedly not as fast. I favor reliability over speed in 
these sorts of cases.  :-)


That's a valid point. It's much easier to shoot one's own leg pretty
ugly, when deleting/renaming/whatevert the files in the Maildir
directly. IMAP SEARCH is IMHO a bit easier to understand than find(1).

Best wishes,
Kirill



Cheers :-)


Re: [Dovecot] deleting maildir files

2007-07-16 Thread Don Russell

Tom Bombadil wrote:

Greetings all...

Can we delete maildir files directly from the file system?

Basically, we use dovecot to train spam, and we want to delete messages
that are older than 30 days, using a simple "find /maildirs -cname +30
-name *imap-server* -exec rm {} \;"

I have seen a post a while ago saying that dovecot can rebuild the
indexes, but I don't remember if it's when the index is deleted or when
the maildir files are deleted.

And if we cannot delete files with the 'rm' command, whats the
best/proper way to delete these older files.

Thanks
  


My opinion has always been that the data structure should not be replied 
upon if you want to do things with your mail items, then use the 
APIs/imap commands to do it. That protects you from any internal stuff 
you didn't know about, or changed from one server to another, or one 
version to another.


For example, I have the beginnings of a script to handle my "mail 
retention policies". It connects to Dovecot/imap to get the list of mail 
for specific folders, then uses the imap delete (or copy) API to delete 
mail older than n days, or to keep only the most recent n messages. That 
sort of thing.


The benefit is my script then doesn't care how Dovecot (or whichever 
server) stores things and if a mailbox changes from mbox to maildir 
format, or similar change.. no worries... my script just doesn't care... 
it always uses the APIs to manipulate mail.


Safe, but admittedly not as fast. I favor reliability over speed in 
these sorts of cases.  :-)


Re: [Dovecot] Connecting to dovecot/imap without a password

2007-07-11 Thread Don Russell

Timo Sirainen wrote:

On 11.7.2007, at 0.07, Don Russell wrote:

I have written a script that connects (localhost) to the dovecot/imap 
server and performs various maintenance on my mail, by folder. 
deleting old stuff, keeping the n most recent, that sort of crap, er 
good stuff. :-)


My script is written in php (I use the various imap_* functions), and 
it connects to the imap server running on the same machine... is 
there a way to connect to the server without having to specify my 
user name and password?


I was thinking there may be some form of "implied" logon if a request 
from user "don" requests to log on to user "don", then there's no 
need for a password check, when the connection is via localhost.


How about using master users? 
http://wiki.dovecot.org/Authentication/MasterUsers


The master user password can be empty of course also.. You can limit 
the allowed IPs with 
http://wiki.dovecot.org/PasswordDatabase/ExtraFields/AllowNets


Thank you. I think this will work well for me.


[Dovecot] Connecting to dovecot/imap without a password

2007-07-10 Thread Don Russell
I have written a script that connects (localhost) to the dovecot/imap 
server and performs various maintenance on my mail, by folder. 
deleting old stuff, keeping the n most recent, that sort of crap, er 
good stuff. :-)


My script is written in php (I use the various imap_* functions), and it 
connects to the imap server running on the same machine... is there a 
way to connect to the server without having to specify my user name and 
password?


I was thinking there may be some form of "implied" logon if a request 
from user "don" requests to log on to user "don", then there's no need 
for a password check, when the connection is via localhost.


That way I don't have to deal with userid/password related issues. :-)

Thanks


Re: [Dovecot] dovecot lda with fetchmail

2007-07-08 Thread Don Russell

JC JĂșnior wrote:

hi all,

I'm new in dovecot, and i need to setup a machine that download emails 
from an external pop3 server, and delivers to my internal network via 
imap, for this , i want ( if possible ) to use fetchmail with the 
option mda to dovecot's deliver, because all user must be virtual 
users stored in a sqlite database, and my question is:


1- it is possible??
2- theres a better way to do this??
3- someone knows some howto about this configuration???


I do this... sort of

fetchmail --> sendmail --> procmail --> mbox/maildir storage <--> imap 
<--> pc client





Re: [Dovecot] mbox vs maildir

2007-07-03 Thread Don Russell

Don Russell wrote:

I'm using Dovecot 1.0.1-12 on Linux/Fedora 7
along with sendmail and procmail all running on the same box
mail is stored in mbox format


[snip]

Thanks to all who replied. This seems to have sparked quite a 
discussion, and given me quite a bit to read/look into.


Sounds like dbox is worth waiting for. I'd I'm going to convert from 
mbox, I'd rather convert once. :-)


[Dovecot] mbox vs maildir

2007-06-29 Thread Don Russell

I'm using Dovecot 1.0.1-12 on Linux/Fedora 7
along with sendmail and procmail all running on the same box
mail is stored in mbox format

It's a small system with a half dozen or so e-mail "accounts". Each with 
40-60MB of messages in various folders.


I keep seeing messages about how mbox is antiquated and anybody with 
more than 100 messages etc should not use mbox, but use maildir instead.


I'm not entirely convinced there seem to be pros and cons for each. 
Is there a discussion somewhere that really highlights why one format is 
so much better than the other?


The last time I tried to convert from mbox to maildir, things got pretty 
botched up, no data loss, but it wasn't pretty. :-)


Can Dovecot handle mbox for some users and maildir for others? I'd like 
to try a conversion for one user... I'll probably create a new user, 
then have procmail copy (via ! action code) all mail for one user to 
that new user.


Thank you


Re: [Dovecot] Setting retention policies

2007-06-25 Thread Don Russell

Timo Sirainen wrote:

On Mon, 2007-06-25 at 07:24 -0700, Don Russell wrote:
  
I access e-mail from different PCs, typically using Thunderbird e-mail 
client.


Thunderbird has a a "retention policy" it can set on a folder by folder 
basis. Policies such as how long to keep messages for, or how many 
messages to keep.


Is there a way to set those policies on the server itself?



http://wiki.dovecot.org/Plugins/Expire

But unfortunately you'd have to wait for v1.1 to use it.
  


Good to know and you just added another project to my to-do list: 
learn how to write a plugin :-)


But, I have some other ideas of my own I think I'll pursue if I like 
how it turns out I'll put it "out there" as FOSS. :-)


Chers,
Don




Re: [Dovecot] Setting retention policies

2007-06-25 Thread Don Russell

Bill Cole wrote:
At 7:24 AM -0700 6/25/07, Don Russell  imposed structure on a stream 
of electrons, yielding:
I access e-mail from different PCs, typically using Thunderbird 
e-mail client.


Thunderbird has a a "retention policy" it can set on a folder by 
folder basis. Policies such as how long to keep messages for, or how 
many messages to keep.


Is there a way to set those policies on the server itself?


Dovecot itself does not have such a facility, but if you use Maildir 
it is a fairly straightforward bit of scripting to whack message files 
greater than a particular age because they are in predictable places 
and have names starting with their delivery time as a Unix epoch time.


Thanks Bill,

Right now I use mbox format, my last conversion effort to maildir didn't 
go very well to say the least.


Since scripting will be required anyway, I think I'll work on a tool 
that uses the IMAP protocol to accomplish what I want.


Then such a script could be useful regardless of mbox/maildir storage 
methods.


Cheers,
Don




[Dovecot] Setting retention policies

2007-06-25 Thread Don Russell
I access e-mail from different PCs, typically using Thunderbird e-mail 
client.


Thunderbird has a a "retention policy" it can set on a folder by folder 
basis. Policies such as how long to keep messages for, or how many 
messages to keep.


Is there a way to set those policies on the server itself?

Thank you