Re: Re: Re: [Dovecot] virtual domain
On Tue, 2005-09-27 at 13:29 +0800, Barry Kwok wrote:
userdb static { args = uid=503 gid=503 mail=mbox:/var/spool/virtual/%d/%n }
Drop the "mail" part from here. You already have it in default_mail_env, and it's correct there. Here you're saying that the .../%d/%n is the mail directory, not file. If it refuses to start up without the mail= part, replace it with home=/tmp instead.
Why I need a IMAP folder in a POP3 only server
Dovecot is mostly an IMAP server, POP3 was just an afterthought.
and can I change that folder to /tmp directory.
Yes, as long as nothing actually gets written there (and with INDEX=MEMORY and POP3 nothing should get written there).
Thank you Timo, I have just tried. But I found that I must add the mail=mbox:/var/spool/virtual/%d/%n part. Without this part, the dovecot seems not checking the right location of mail spool and simply say that "no new email". Now I added this part together with "home=/tmp" part into userdb config and It works now with IMAP folder in /tmp directory. But I want to ask if there is any file locking problem as I am running virtual email with vmail as owner for all mbox accounts. And it seems that they are all share the same IMAP folder located in /tmp directory.
On Tue, 2005-09-27 at 17:42 +0800, Barry Kwok wrote:
On Tue, 2005-09-27 at 13:29 +0800, Barry Kwok wrote:
userdb static { args = uid=503 gid=503 mail=mbox:/var/spool/virtual/%d/%n }
Drop the "mail" part from here. You already have it in default_mail_env, and it's correct there. Here you're saying that the .../%d/%n is the mail directory, not file. If it refuses to start up without the mail= part, replace it with home=/tmp instead.
Why I need a IMAP folder in a POP3 only server
Dovecot is mostly an IMAP server, POP3 was just an afterthought.
and can I change that folder to /tmp directory.
Yes, as long as nothing actually gets written there (and with INDEX=MEMORY and POP3 nothing should get written there).
Thank you Timo, I have just tried. But I found that I must add the mail=mbox:/var/spool/virtual/%d/%n part. Without this part, the dovecot seems not checking the right location of mail spool and simply say that "no new email". Now I added this part together with "home=/tmp" part into userdb config and It works now with IMAP folder in /tmp directory.
default_mail_env should have been enough, since it's used instead of the mail= part if it doesn't exist.
Also that setting above breaks if the user's mbox file doesn't exist. Using mail=mbox:/tmp:INBOX=/var/spool/virtual/%d/%n should fix that.
Also since you're overriding default_mail_env, the indexes are now written to home directory, ie. /tmp directory. For everyone. And they'll conflict with each others and probably create problems. So you'll need to add :INDEX=MEMORY to the mail= there as well.
But I want to ask if there is any file locking problem as I am running virtual email with vmail as owner for all mbox accounts.
As long as all programs accessing the mbox files are using compatible locking, there are no problems. Dovecot specifies that in mbox_read_locks and mbox_write_locks. You should check that whatever is writing the mails to the mbox files uses the same locks.
And it seems that they are all share the same IMAP folder located in /tmp directory.
With your settings, yes. You should fix that or it'll cause problems..
participants (2)
-
Barry Kwok
-
Timo Sirainen