[Dovecot] default_mail_env problems
I am having problems setting the default mail environment.#
I am using Fedora Core 2 with version dovecot-0.99.10.5-0.FC2
My users all have an NFS mounted home directory, and all mail is delivered to ~Mail/.mailbox it is all mbox format.
I would like to put the indexes on the local system in /var/indexes/{username}.
So I set these parameters for default_mail_env :
mbox:~/Mail/:INBOX=~/Mail/.mailbox
Which produced the error :
imap(test): stat() failed with mbox file ~/Mail/.mailbox: No such file or directory
I set the mail environment back to default, linked inbox to .mailbox in the ~/Mail directory and all worked fine.
Is there a better way to do this ?
I would like to put the indexes on the local system in /var/indexes/{username}, so I decided to set:
default_mail_env = INDEX=/var/indexes/%d/%n
and got this error:
imap(test): Failed to create storage with data: INDEX=/var/indexes//test dovecot: child 9142 (imap) returned error 89
I also tried :
default_mail_env = INDEX=/var/indexes/%u
And got the same error.
I guessed at permissions, so I tried changing the ownership to dovecot and then test and then root and then 777, but I still get this error.
Can anyone tell me where I am going wrong?
Many thanks,
Neil.
-- Neil Marjoram. Systems Manager University College London Adastral Park Campus Martlesham Heath Ipswich Suffolk IP5 3RL
Is it a good idea to have the mbox file in user home directories rather then /var/mail/ ?
On Fri, 2004-10-22 at 02:37, Faisal wrote:
Is it a good idea to have the mbox file in user home directories rather then /var/mail/ ?
Administratively speaking, I think this is a big win, because then their homedir's quotas pertain to their mail as well, and you don't need (you can avoid it, but many sites don't) a mode 1777 /var/mail - which can be a bit of a free-for-all.
We have many users who like to leave all their mail in /var/mail for ages. It's a problem, because some software understandably hates large mbox files. If they have the same quota for their maildrop and their homedir, that opens the door to pure Maildir, as well as incentivising refiling mail messages into appropriate folders (since leaving things in one big folder is no longer a quota advantage).
On the other hand, technically speaking, if /var/mail is local, and ~user is NFS mounted or something, you may encounter NFS-related problems.
-- Dan Stromberg DCS/NACS/UCI strombrg@dcs.nac.uci.edu
On Fri, Oct 22, 2004 at 09:24:16AM -0700, Dan Stromberg wrote:
On Fri, 2004-10-22 at 02:37, Faisal wrote:
Is it a good idea to have the mbox file in user home directories rather then /var/mail/ ?
We have many users who like to leave all their mail in /var/mail for ages. It's a problem, because some software understandably hates large mbox files.
[Having already responded, this lets me make take both sides...]
I can recall one positive thing about having inbox in /var/mail in the past. In cases where the inbox is unrestrained by filesystem quotas (e.g. if there are no filesystem quotas or if the local delivery agent runs setuid root), you can do some special things. One thing we did here was to have the LDA look up the user's inbox quota, and if the new message would be the one to put the mailbox over the limit, the LDA would first insert a special notice that said something like "the next message puts you over quota; all further messages will be [bounced/deferred] until you get back under quota." If the mailbox was already over quota, it would (bounce/defer) the new message.
You can't really do that if the LDA runs as the end user and is constrained by quotas. You also can't do it if the LDA is responsible for autofiling incoming messages into different folders. Since we do the latter here, the most consistent thing is to have the inbox in the home directory.
mm
Thanks for the reply .. after reading all the replies i have decided that it is best to have mbox in the home directories .. but it seems that i the default configuration of my mail server is the later on i.e in the /var/mail .. now i want to move it to home directories .. is there any weblink providing me help in this .. i want to first test it on my test box .. but how is the bigquestion
thanks ----- Original Message ----- From: "Mark E. Mallett" mem@mv.mv.com To: dovecot@dovecot.org Sent: Friday, October 22, 2004 9:49 PM Subject: Re: [Dovecot] mbox file location
On Fri, Oct 22, 2004 at 09:24:16AM -0700, Dan Stromberg wrote:
On Fri, 2004-10-22 at 02:37, Faisal wrote:
Is it a good idea to have the mbox file in user home directories rather then /var/mail/ ?
We have many users who like to leave all their mail in /var/mail for ages. It's a problem, because some software understandably hates large mbox files.
[Having already responded, this lets me make take both sides...]
I can recall one positive thing about having inbox in /var/mail in the past. In cases where the inbox is unrestrained by filesystem quotas (e.g. if there are no filesystem quotas or if the local delivery agent runs setuid root), you can do some special things. One thing we did here was to have the LDA look up the user's inbox quota, and if the new message would be the one to put the mailbox over the limit, the LDA would first insert a special notice that said something like "the next message puts you over quota; all further messages will be [bounced/deferred] until you get back under quota." If the mailbox was already over quota, it would (bounce/defer) the new message.
You can't really do that if the LDA runs as the end user and is constrained by quotas. You also can't do it if the LDA is responsible for autofiling incoming messages into different folders. Since we do the latter here, the most consistent thing is to have the inbox in the home directory.
mm
On Fri, Oct 22, 2004 at 02:37:11PM +0500, Faisal wrote:
Is it a good idea to have the mbox file in user home directories rather then /var/mail/ ?
Depends on who you ask :-)
If you ask me, having the inbox in a directory owned by the user (not necessarily the home directory, but that's usually a fine place) is a good idea. It lets you manage storage and filesystem layout a little easier; doesn't require some special access into centralized directories; more easily define mailbox quotas on a per-user basis.
mm
On Fri, 22 Oct 2004, Faisal wrote:
Is it a good idea to have the mbox file in user home directories rather then /var/mail/ ?
Yes, if you configure all programs you use that touch mail, so they know where they can find the mailboxes.
If your users don't need system access, it's probably easier to just store everything in one big tree, so you don't end up with hundreds of system accounts that are not.
Is it safe with NFS home directory? kenji
--- Faisal faisal@clickonlinenetworks.com wrote:
Is it a good idea to have the mbox file in user home directories rather then /var/mail/ ?
for your loved one http://pr.mail.yahoo.co.jp/pinkribbon/
On 20.10.2004, at 13:46, Neil Marjoram wrote:
So I set these parameters for default_mail_env :
mbox:~/Mail/:INBOX=~/Mail/.mailbox
~/ actually doesn't work after INBOX=. I guess I should finally fix that. Use %h instead, ie:
mbox:~/Mail/:INBOX=%h/Mail/.mailbox
I would like to put the indexes on the local system in /var/indexes/{username}, so I decided to set:
default_mail_env = INDEX=/var/indexes/%d/%n
You're giving only INDEX there, but without any information where mails are located. So you'd need:
mbox:~/Mail/:INBOX=%h/Mail/.mailbox:INDEX=/var/indexes/%d/%n
or something.
participants (7)
-
Dan Stromberg
-
Faisal
-
Kenji
-
Mark E. Mallett
-
Neil Marjoram
-
Timo Sirainen
-
Wouter Van Hemel