Re: [Dovecot] question mailbox format
ok after playing a while now it works , but i have one problem open.. a.) now he makes for pop3 index files in /var/indexes/%u/imap/index etc... you said that is correct too if i only use pop3 ?
b.) i have as INBOX file /var/spool/mail/%u set, when somebody logs in, and the mailbox exist he gets the email (from mbox file), but when the mbox does not exist he makes a directory, instead of a file like /var/spool/mail/%u. The problem is when a new mail comes and the mbox file does not exist, the mail is saved to the directory as msg and not as mbox file any ideas? Btw im using version 1.0.0 thx
On 5/26/2007 sc2@gmx.at wrote:
ok after playing a while now it works , but i have one problem open.. a.) now he makes for pop3 index files in /var/indexes/%u/imap/index etc... you said that is correct too if i only use pop3 ?
b.) i have as INBOX file /var/spool/mail/%u set, when somebody logs in, and the mailbox exist he gets the email (from mbox file), but when the mbox does not exist he makes a directory, instead of a file like /var/spool/mail/%u. The problem is when a new mail comes and the mbox file does not exist, the mail is saved to the directory as msg and not as mbox file any ideas?
Looks like you didn't set the mail_location properly:
From the wiki page:
You can use several variables in the mail_location setting. See Variables for a full list, but the most commonly used ones are:
* %u: Full username. * %n: User part in user@domain, same as %u if there's no domain. * %d: Domain part in user@domain, empty if there's no domain. * %h: Home directory. ~/ works also.
Typically with mbox it would be set to:
mail_location = mbox:~/mail:INBOX=/var/mail/%u
From your dovecot -n:
mail_location: mbox:/var/spool/mail/%u
Btw im using version 1.0.0
Better late than never... ;)
hello marcus
Typically with mbox it would be set to:
mail_location = mbox:~/mail:INBOX=/var/mail/%u i know, i try it too so but then i get a error to.
On this system (Redhat 9), the mails are only saved in /var/spool/mail/%u the problem is when i try it with :
a.) mbox:~/mail:INBOX=/var/spool/mail/%u
mkdir_parents(/home/bernhard/mail) failed: Permission denied
b.) when i try it with mbox:/var/spool/mail/%u, INBOX same, and index /var/indexes all works fine except this,when somebody logs in, and the mailbox exist he gets the email (from mbox file), but when the mbox does not exist he makes a directory, instead of a file like /var/spool/mail/%u. Example:
- mbox exist = all is ok -mbox does not exist >he creates a directory with %u but then new mails for this user not gone to %user mbox file, they are gone to %u directory (in directory) and then dovecot cant get it.
i hope i now didnt top -post, ( set the text after quote) With Version 0.99, on nother dist. all works fine with same settings thx regards ----- Original Message ----- From: "Charles Marcus" CMarcus@Media-Brokers.com To: "Dovecot Mailing List" dovecot@dovecot.org Sent: Saturday, May 26, 2007 4:27 PM Subject: Re: [Dovecot] question mailbox format
On 5/26/2007 sc2@gmx.at wrote:
ok after playing a while now it works , but i have one problem open.. a.) now he makes for pop3 index files in /var/indexes/%u/imap/index etc... you said that is correct too if i only use pop3 ?
b.) i have as INBOX file /var/spool/mail/%u set, when somebody logs in, and the mailbox exist he gets the email (from mbox file), but when the mbox does not exist he makes a directory, instead of a file like /var/spool/mail/%u. The problem is when a new mail comes and the mbox file does not exist, the mail is saved to the directory as msg and not as mbox file any ideas?
Looks like you didn't set the mail_location properly:
From the wiki page:
You can use several variables in the mail_location setting. See Variables for a full list, but the most commonly used ones are:
* %u: Full username. * %n: User part in user@domain, same as %u if there's no domain. * %d: Domain part in user@domain, empty if there's no domain. * %h: Home directory. ~/ works also. Typically with mbox it would be
set to:
mail_location = mbox:~/mail:INBOX=/var/mail/%u
From your dovecot -n:
mail_location: mbox:/var/spool/mail/%u
Btw im using version 1.0.0
Better late than never... ;)
You're making it difficult to try to help, by not answering the questions or providing requested information...
Again - was that config output you provided the FULL output of dovecot -n? It looked incomplete to me...
Also, you only provided one line from a log... and it said 'permission denied' - this should tell you something... but it is hard to tell what because you only provided one line of the log...
With Version 0.99, on nother dist. all works fine with same settings
You do realize that the config file for 1.0 is DIFFERENT than 0.99...
And you never mentioned that you had UPGRADED from an earlier version - this is helpful to know...
Did you read http://wiki.dovecot.org/UpgradingDovecot ?
Hello i will try the tips from alan too
You're making it difficult to try to help, by not answering the questions or providing requested information... I did, sorry i hope so
Again - was that config output you provided the FULL output of dovecot -n? It looked incomplete to me...
b.) the output from -n, in mails before was the complete output here again the complete output of -n protocols: pops pop3s ssl_listen: *:995 ssl_cert_file: /etc/mail/certs/wildcard/cert.pem ssl_key_file: /etc/mail/certs/wildcard/nopass.key disable_plaintext_auth: no login_dir: /usr/local/var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/pop3-login mail_location: mbox:/var/spool/mail/%u:INBOX=/var/spool/mail/%u mail_executable: /usr/local/libexec/dovecot/pop3 mail_plugin_dir: /usr/local/lib/dovecot/pop3 pop3_uidl_format: %08Xu%08Xv auth default: passdb: driver: shadow args: /etc/shadow userdb: driver: passwd
c.) the system where 0.99 was running was nother server (Cent OS), i didnt upgrade there 2 different servers. on 0.99 the env is: default_mail_env = mbox:/var/spool/mail/%u
d.) I know that: mbox:/var/spool/mail/%u:INBOX=/var/spool/mail/%u:INDEX:/var/indexes/%u dont seems correct for you, but i dont work with directorys i get the emails if the mbox files are there ! only if the file are not here he trys to make a directory instead of the file. If the file is there he gets e-mails from. Example: mails in /var/spool/mail/test (file) > works fine no /var/spool/mail/test file here, when user test logins > dovecote creaetes a directory called test in /var/spool/mail/test where new messages then arrives
At this e-mail server the mails are gone to a file (mbox file) called like the username in /var/spool/mail So all works fine if he wouldnt, make a directory instead of a "file" when file is not there
sorry i know its hard cause my english is &&&...i try to give out the information i have.
----- Original Message ----- From: "Charles Marcus" CMarcus@Media-Brokers.com To: "Dovecot Mailing List" dovecot@dovecot.org Sent: Sunday, May 27, 2007 3:58 AM Subject: Re: [Dovecot] question mailbox format
You're making it difficult to try to help, by not answering the questions or providing requested information...
Again - was that config output you provided the FULL output of dovecot -n? It looked incomplete to me...
Also, you only provided one line from a log... and it said 'permission denied' - this should tell you something... but it is hard to tell what because you only provided one line of the log...
With Version 0.99, on nother dist. all works fine with same settings
You do realize that the config file for 1.0 is DIFFERENT than 0.99...
And you never mentioned that you had UPGRADED from an earlier version - this is helpful to know...
Did you read http://wiki.dovecot.org/UpgradingDovecot ?
Am Sonntag, 27. Mai 2007 schrieb sc2@gmx.at:
You're making it difficult to try to help, by not answering the questions or providing requested information... I did, sorry i hope so
This mail is much better than your previous ones. :-)
I think we're getting closer.
d.) I know that: mbox:/var/spool/mail/%u:INBOX=/var/spool/mail/%u:INDEX:/var/indexes/%u dont seems correct for you, but i dont work with directorys
Please take a look at http://wiki.dovecot.org/MailLocation/Mbox , Section "Only /var/mail/ mboxes" (on the bottom of the page).
I think it exactly describes your setup and what you want to achieve.
According to this section, the correct mail_location line should look as follows: (Note I added the "spool/" to the example to match your directory layout.)
mbox:/var/empty:INBOX=/var/spool/mail/%u:INDEX=MEMORY
/var/empty should be replaced by an arbitrary empty directory your users have no write persission to.
HTH,
Gunter
-- *** Powered by AudioScrobbler --> http://www.last.fm/user/Interneci/ *** 10:15 | Scooter - Behind the Cow 10:12 | Scooter - Horny In Jericho 10:06 | Xandria - Salomé 10:01 | Xandria - Emotional Man *** PGP-Verschlüsselung bei eMails erwünscht :-) *** PGP: 0x1128F25F ***
Hello Gunter Thanks now it works fine ! Question for INDEX=MEMORY, is it much perfomance lost ? thank all who helped me
----- Original Message ----- From: "Gunter Ohrner" G.Ohrner@post.rwth-aachen.de To: dovecot@dovecot.org Sent: Sunday, May 27, 2007 10:23 AM Subject: Re: [Dovecot] question mailbox format
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 5/27/07 1:50 AM, sc2@gmx.at wrote:
hello marcus
Typically with mbox it would be set to:
mail_location = mbox:~/mail:INBOX=/var/mail/%u i know, i try it too so but then i get a error to.
On this system (Redhat 9), the mails are only saved in /var/spool/mail/%u the problem is when i try it with :
a.) mbox:~/mail:INBOX=/var/spool/mail/%u
mkdir_parents(/home/bernhard/mail) failed: Permission denied
Are you running the system with virtual users? I didn't notice in your pasted dovecot configuration information if you've configured dovecot to run with a single UID/GID (i.e. virtual user support).
Basically what's happening here is if the user bernhard is an actual system user and you don't have dovecot configured to run in virtual user configuration then your user permissions are really messed up.
normally dovecot should setuid to the user that is logged in so that it can write the mail (and necessary index, cache, etc) files in the user's home directory. if you specifically tell dovecot to run as a single UID/GID (for virtual user setup) then this UID/GID needs to have permission to write where the mail/index/cache/etc files need to be written.
I'd be willing to bet this is your problem.
b.) when i try it with mbox:/var/spool/mail/%u, INBOX same, and index /var/indexes all works fine except this,when somebody logs in, and the mailbox exist he gets the email (from mbox file), but when the mbox does not exist he makes a directory, instead of a file like /var/spool/mail/%u. Example:
- mbox exist = all is ok -mbox does not exist >he creates a directory with %u but then new mails for this user not gone to %user mbox file, they are gone to %u directory (in directory) and then dovecot cant get it.
the mbox: parameter is apparently expecting a directory name, not a file name. if you want to keep the index/cache/etc files in the same directory tree as the inboxes, you may want to try something like this:
mail_location = mbox:/var/spool/mail/%u:INBOX=/var/spool/mail/%u/INBOX
in the case of the example from your log file, this will cause the following to happen:
/var/spool/mail/bernhard/INBOX will store the received email in mbox format. /var/spool/mail/bernhad/.imap/ will contain the necessary index, cache and crontrol files that dovecot needs to store.
make sure the permissions are set properly for these directories so that dovecot can read and write to them as necessary (either as the user that is logged in, or the set UID/GID dovecot is configured to use)
HTH
alan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGWOs+E2gsBSKjZHQRAiPiAJ9gZ3leawpd1iIao0XiliYNamrJDACfVcqb oqwy7i0K6oqeQwq1Lz0UXAM= =kXYF -----END PGP SIGNATURE-----
participants (4)
-
alan premselaar
-
Charles Marcus
-
Gunter Ohrner
-
sc2@gmx.at