LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Dovecot problem (https://www.linuxquestions.org/questions/linux-newbie-8/dovecot-problem-692542/)

linuxexpress 12-23-2008 01:48 PM

Dovecot problem
 
I have install postfix and dovecot in Fedora 9 and moved all the accounts and their mails from the old
Mandrake server (the mails are under /var/spool/mail/<user> in the old Mandrake server) to this new Fedora 9 server.

When the userxx tries to download mail from the Fedora 9, it failed and the following
message receives from /var/log/maillog:

dovecot: POP3(userxx): mbox: Can't create root mail directory /home/userxx/mail: Permission denied
dovecot: POP3(userxx): MAIL environment missing and autodetection failed (home /home/userxx)

Some users like userxx do not have a home directory. I only use pop3 and all the mailboxes are under /var/spool/mail/<user> in the new server.

I don't want to create a home directory for all the mail users as there are a lot of users do not have home directory. These
users are email users only.

Any help will be appreciated.

rayfordj 12-23-2008 03:17 PM

you may want to look into the mail_location in dovecot.conf to see if defining this does not help you. You should have documentation regarding this (and others) under /usr/share/doc/dovecot-*/. I recommend starting with /usr/share/doc/dovecot-*/wiki/MailLocation.txt (or similar).

billymayday 12-23-2008 03:31 PM

First thing to do is work out if it's SELinux causing the problem

Temporarily turn it off (setenforce 0) then try to read mail. Turn it back on with setenforce 1

If that's the issue, it will be simple enough to fix.

linuxexpress 12-23-2008 04:20 PM

It was not the selinux that caused the problem as the selinux was already disabled.

All users with home directory at the Fedora box can download mail from mail server. All accounts without home directory fail to download mail from it. These accounts are pop mail accounts only.

Setting of postfix, /etc/postfix/mail.cf :

# home_mailbox (commented)
mail_spool_directory = /var/spool/mail


Setting of /etc/dovecot.conf:

protocols imap pop3

#mail_location (mail_location parameter is commented)

linuxexpress 01-05-2009 02:06 PM

How to download the mails of the pop user accounts which do not have a home directory. All the pops user accounts are moved from the old machine to the new machine.

Is it a must to recreate the home directory for these pop mail accounts to the new machine ?

billymayday 01-05-2009 03:13 PM

Dovecot doesn't need genuine users - read the section on authentication in dovecot.conf or search dovecot virtual users or similar.

Haven't done it myself, but it's pretty common.

linuxexpress 01-14-2009 09:21 AM

It works now by setting the mail_location at dovecot.conf as following:

mail_location = mbox:/var/empty:INBOX=/var/spool/mail/%u:INDEX=MEMORY


All times are GMT -5. The time now is 03:05 PM.