LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-19-2012, 04:32 AM   #1
PosiRob
LQ Newbie
 
Registered: Jun 2011
Location: Netherlands
Distribution: Ubuntu
Posts: 13

Rep: Reputation: Disabled
Postfix email account can't be accessed


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.

Thanks in advance,
Rob
 
Old 05-19-2012, 06:53 AM   #2
JSkywalker
Member
 
Registered: Aug 2007
Distribution: openSUSE
Posts: 102

Rep: Reputation: 24
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)

Are there any errors in /var/log/mail.err ??
 
Old 05-19-2012, 08:49 AM   #3
PosiRob
LQ Newbie
 
Registered: Jun 2011
Location: Netherlands
Distribution: Ubuntu
Posts: 13

Original Poster
Rep: Reputation: Disabled
No maildir

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).

Thanks for taking the time to investigate.
 
Old 05-19-2012, 09:06 AM   #4
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
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.
 
Old 05-19-2012, 12:29 PM   #5
PosiRob
LQ Newbie
 
Registered: Jun 2011
Location: Netherlands
Distribution: Ubuntu
Posts: 13

Original Poster
Rep: Reputation: Disabled
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.
 
Old 05-19-2012, 12:38 PM   #6
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Quote:
Originally Posted by PosiRob View Post
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.
 
Old 05-21-2012, 04:15 AM   #7
PosiRob
LQ Newbie
 
Registered: Jun 2011
Location: Netherlands
Distribution: Ubuntu
Posts: 13

Original Poster
Rep: Reputation: Disabled
Patience

Thanks for your patience.

Thanks for learning me the tail command, this will be usefull in the future!

But I didn't have much luck, the error files are not being written, and the log doesn't give any usefull information:


Login: user=<myuserid>, method=PLAIN, rip=99.99.999.999, lip=99.999.99.999
May 21 11:00:59 Ubuntu-64-min dovecot: POP3(myuserid): Connection closed top=0/0, retr=0/0, del=0/0, size=0

-----------------------------------------------------------------------------
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.

Thanks again for the patience.

Rob
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix: forward all account email within domain to another email account? 18Googol2 Linux - Software 3 03-04-2011 01:10 PM
[SOLVED] How to limit who can send to an email account (postfix, amavis, OS X 10.6)… andrewggrant *BSD 5 02-17-2011 02:23 AM
Postfix one account can't send/receive email, one works fine scarleo Linux - Server 4 12-07-2010 04:03 PM
how to add new email account to sendmail/postfix masenko703 Linux - Newbie 7 06-02-2009 07:24 AM
Why is PostFix sending mail using the email address of the smtp account? taigon Linux - Server 34 02-09-2007 01:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration