Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have my own server in a datacenter, and I run postfix (with dovecote and mysql) on it.
I access my mail usually through Thunderbird, but since a few days one of the accounts can't be downloaded. The Thunderbird error is not very informing: "The server answered: +".
I try through squirrelmail and my other accounts work well, but this account only displays in the left column 68 unread mails, but the mails itself aren't shown.
I also suspect an Apache crash I experienced at that time was caused by this, although after restarting Apache didn't crash when I tried to access, but I also don't get the number of unread mails.
So I suspect something is wrong with one of the mails.
Can somebody point out what goes wrong?
I have root access to my server, and only a command line.
What is the output of:
opensuse:/etc/postfix # postconf | grep home_mailbox
home_mailbox = Maildir/
If this ends with a '/' than your mailservers uses maildir-format to store mail (1 message per file)
if it does not end with a '/' it uses mbox (all messages in 1 file)
The output of postconf | grep home_mailbox is:
home_mailbox =
I understand from your answer that means all mails (from one account?) are stored in one file.
I was curious to the contents of postconf so I did a "postconf | more" command. This gave a
load of information, but I couldn't find something to the solution of this problem.
There is a file mail.err but it's empty and almost a year old. There are also mail.err.1, mail.err.2, mail.err.3 files, but very small and over a year old.
The mail.log file doesn't look very inviting (it's current but 2.9 mb).
Is there an error in your maillog (or mail.error) log?
Off hand, Dovecot uses a file to index all the emails in the directory and it gets pretty cranky if the contents of the folder don't match the index. What was the nature of this Apache crash, and did you have file or database corruption?
You might want to make a backup of the maildir with the messages in it. The messages are simply text files, so as a worst case if you end up deleting and rebuilding the account you at least won't lose the information.
I set up the mail a couple of years ago with a "how to", and it functioned like I wanted it to function (different domains, different accounts etc), so I'm absolutely no expert.
Do you mean by "is there an error in your maillog (or mail.error) log" something else than I mentioned in my previous message?
After googling "rebuild dovecot index" I renamed the dovecot.index file to dovecot.index.old hoping the index would rebuild itself (as suggested in the search).
Trying to access the mail account through squirrelmail gives no luck, I now get the error:
ERROR: Connection dropped by IMAP server.
Query: SELECT "INBOX"
I haven't investigated the Apache crash, it took too long to display the email messages, I tried to access another website that's running on the server and that didn't respond as well, so I restarted Apache and it functioned again. This problem could not be duplicated.
Do you mean by "is there an error in your maillog (or mail.error) log" something else than I mentioned in my previous message?
Yes, you should have a directory /var/log and in there should be some files associated with Dovecot and Postfix. They should be something like maillog, or mail.log, as well as one for info and one for error.
Quote:
After googling "rebuild dovecot index" I renamed the dovecot.index file to dovecot.index.old hoping the index would rebuild itself (as suggested in the search).
Trying to access the mail account through squirrelmail gives no luck, I now get the error:
ERROR: Connection dropped by IMAP server.
Query: SELECT "INBOX"
Hmmm, this sounds like you may have a Dovecot maildir problem.... Once you locate the logs, I would open a terminal and use tail -f to follow the log and then try connecting to it and see what the resulting error message is. Once you have the message, a lot of times putting the error, minus any system specific information such as user and host names, gives a good list of suggestions.
-----------------------------------------------------------------------------
I read the mails are stored as text messages, so I copied the messages from the "new" directory from this user to the "new" directory of another user.
The other user gets the mails into the inbox.
I think I will just delete the problematic user account and build it again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.