Koozali.org: home of the SME Server
Obsolete Releases => SME Server 9.x => Topic started by: Paperguides on August 03, 2016, 11:38:54 PM
-
I recently had a problem which resulted in my server running out of disk space. I fixed the problem but since then I've had a problem with messages in my email inbox.
I use Thunderbird with IMAP to access my email and initially, after reboot, I can see my messages both headers and message content but this soon disappears. I tried webmail and initially I could see my messages and interact I now get a blank page. Intermittently Thunderbird loses it connection to the server. I can see and read all the messages in other IMAP folders on the server. I tried ClawsMail as well and this show no messages in the inbox.
Any pointers on how I solve this problems?
T
Tony
-
Hi,
I recently had a problem which resulted in my server running out of disk space. I fixed the problem but since then I've had a problem with messages in my email inbox.
Hmmm..... you say you fixed the problem, but you still have a problem. So maybe you didn't actually fix it.
Can you please be a bit more specific about:
The system, updates, contribs installed etc etc
What caused the original problem
What you did to 'fix' it
I use Thunderbird with IMAP to access my email and initially, after reboot, I can see my messages both headers and message content but this soon disappears. I tried webmail and initially I could see my messages and interact I now get a blank page. Intermittently Thunderbird loses it connection to the server. I can see and read all the messages in other IMAP folders on the server. I tried ClawsMail as well and this show no messages in the inbox.
Any pointers on how I solve this problems?
I think the first thing is to see how you got to this point before anyone can make a stab at helping you.
One thing you could possibly try is to fire up 'mc' and have a peek in your actual mail folders as I think the mails are probably there but your client can't see them. Remember, each mail is stored as a file so we should be able to see them.
Try to navigate to something like
/home/e-smith/files/users/yourusername/Maildir/cur or ./new
Any files in there ?
They will have odd names like:
1323795907.19545.esmith:2,Sd
You can see the content with mc or on the CLI :
cat 1323795907.19545.esmith:2,Sd
If so we know that at least your mail is actually there.
Are there any errors in :
/var/log/messages
/var/log/imap/current
/var/log/imaps/current
If you come back with more details someone may be able to help further.
B. Rgds
John
-
The system, updates, contribs installed etc etc SME 9.1 set up as server only; fully updated with no contribs currently installed.
What caused the original problem
Moving data from a suspect portable HD - put simply, I didn't check carefully enough how much space I needed to complete the transfer to a new disk.
What you did to 'fix' it
Moved the data back off the server drive to a new USB drive.
Try to navigate to something like
/home/e-smith/files/users/yourusername/Maildir/cur or ./new
Any files in there ?
over 3900 files - I need to do some housekeeping on my email folder. :-(
see attached (from WinSCP)
I can see no error messages in /var/log/messages relating to IMAP or IMAPS.
/var/log/imap/current
/var/log/imaps/current
As far as I can see in WinSCP, these directories do not exist on my server.
However /var/log/dovecot/current contains lots of the following:
2016-08-03 23:46:59.294408500 imap-login: Info: Login: user=<tony>, method=PLAIN, rip=46.xx.xxx.130, lip=192.168.200.10, mpid=5129, TLS
2016-08-03 23:47:00.373743500 imap(tony): Error: open(/home/e-smith/files/users/tony/Maildir/cur/1435849344.9590.main:2,Sa) failed: Permission denied (euid=5000(office$) egid=5000(office$) missing +r perm: /home/e-smith/files/users/tony/Maildir/cur/1435849344.9590.main:2,Sa, euid is not dir owner)
2016-08-03 23:47:00.373751500 imap(tony): Info: Disconnected: Internal error occurred. Refer to server log for more information. [2016-08-03 23:47:00] bytes=647/197804
Does this mean there is a miss-match between my logon ID and the file permissions? I suspect that a change to the directory/file permission will not fix this.
Thanks,
Tony
-
The system, updates, contribs installed etc etc SME 9.1 set up as server only; fully updated with no contribs currently installed.
OK
What caused the original problem
Moving data from a suspect portable HD - put simply, I didn't check carefully enough how much space I needed to complete the transfer to a new disk.
:-) We all make mistakes. just some are worse than others !
What you did to 'fix' it
Moved the data back off the server drive to a new USB drive.
And absolutely nothing else ? Exactly what 'data' ? Just wondering why you have a server with mail, but no data. Was this an upgrade or something ? Just trying to make sure we get ALL the facts and history - the devil lies in the details usually... please spell out exactly what you were doing.
over 3900 files - I need to do some housekeeping on my email folder. :-(
Is that all ? :-)
(On a side note, it is generally reckoned Thunderbird is happier when you keep under 10,000 per folder, so you are OK for now......)
see attached (from WinSCP)
Unfortunately it isn't that clear. But it looks like they are at least owned by user 'office' and as you say, you seem to be user 'tony'
I can see no error messages in /var/log/messages relating to IMAP or IMAPS.
OK
/var/log/imap/current
/var/log/imaps/current
As far as I can see in WinSCP, these directories do not exist on my server.
Sorry - was looking at the wrong server my end !
Can you use putty to get a command line ?
However /var/log/dovecot/current contains lots of the following:
2016-08-03 23:46:59.294408500 imap-login: Info: Login: user=<tony>, method=PLAIN, rip=46.xx.xxx.130, lip=192.168.200.10, mpid=5129, TLS
2016-08-03 23:47:00.373743500 imap(tony): Error: open(/home/e-smith/files/users/tony/Maildir/cur/1435849344.9590.main:2,Sa) failed: Permission denied (euid=5000(office$) egid=5000(office$) missing +r perm: /home/e-smith/files/users/tony/Maildir/cur/1435849344.9590.main:2,Sa, euid is not dir owner)
2016-08-03 23:47:00.373751500 imap(tony): Info: Disconnected: Internal error occurred. Refer to server log for more information. [2016-08-03 23:47:00] bytes=647/197804
Does this mean there is a miss-match between my logon ID and the file permissions?
That's a good guess....
I suspect that a change to the directory/file permission will not fix this.
And that is probably a bad one :-)
Clearly something isn't right here.... you have neglected to mention something somewhere.
Here are a couple of lines from one of my servers for some mail of mine - my login is 'john':
-rw------- 1 john john 1203 Aug 3 23:00 1470258025.4751_3.esmith:2,S
-rw------- 1 john john 202612 Aug 4 00:23 1470262981.10135_3.esmith:2,Sl
-rw------- 1 john john 30326 Aug 4 01:34 1470267282.13332_3.esmith:2,Sl
So yes it look like your mail files and possibly directories have the wrong ownership.
The question is how did that happen ? Or were you a different user in another life ?
What about this showing us this from Putty (you really need to get to the command line to sort some of this):
cat /etc/passwd |grep -i tony
and
ll /home/e-smith/files/users/tony/Maildir
The situation is possibly fixable, but we really need to understand how you got there in case there are other issues.
B. Rgds
John
-
HI,
Sorry in the delay in replying. It was getting late. :-)
I recently moved to this new server as part of an exercise to upgrade to from V8 to V9. It is an HP micro server but only had a small (250G) hard disk. The 'plan' is (was?) to upgrade again to a larger drive and/or RAID. It's supports email for my business (a one man band) but as there are only 4 users there very little need to share data between users. I have tended to use it as a space to backup data from the workstations and laptops.
The data was accumulated dross; pictures, ebooks, and music. I created an ibay, shared it and started the transfer using win 10. I suspect that the system continued to receive the horrendous volume of SPAM and ran out of disk space. Admin messages are directed to my mailbox so it would have been writing there when the problem arose.
WinSCP set up to open a putty window every time so.........
[root@main ~]# cat /etc/passwd |grep -i tony
tony:x:5000:5000:Tony Smith-Crallan:/home/e-smith/files/users/tony:/usr/bin/rssh
[root@main ~]# ll /home/e-smith/files/users/tony/Maildir
total 5944
drwxr-xr-x 2 office$ office$ 258048 Aug 4 06:47 cur
-rw-r--r-- 1 office$ office$ 79044 Aug 3 22:40 dovecot.index
-rw-r--r-- 1 office$ office$ 5644288 Aug 4 06:46 dovecot.index.cache
-rw-r--r-- 1 office$ office$ 31596 Aug 4 06:47 dovecot.index.log
-rw------- 1 office$ office$ 120 Oct 8 2015 dovecot-keywords
-rw-r--r-- 1 office$ office$ 120 Aug 3 19:31 dovecot.mailbox.log
-rw-r--r-- 1 office$ office$ 160250 Aug 4 07:08 dovecot-uidlist
-rw-r--r-- 1 office$ office$ 8 Aug 2 23:39 dovecot-uidvalidity
-r--r--r-- 1 office$ office$ 0 Jul 12 15:42 dovecot-uidvalidity.578501dc
drwxr-xr-x 2 office$ office$ 4096 Aug 4 08:14 new
-rw-r--r-- 1 office$ office$ 976 Aug 3 19:31 subscriptions
drwxr-xr-x 2 office$ office$ 4096 Aug 4 08:14 tmp
[root@main ~]#
Thanks for the advice so far.
Tony
-
you messed your server..
and you missed to tell us how did you try to upgrade/move your setup
try
signal-event user-modify tony
-
HI,
Sorry in the delay in replying. It was getting late. :-)
Was for me too here in Spain :-)
I recently moved to this new server as part of an exercise to upgrade to from V8 to V9. It is an HP micro server but only had a small (250G) hard disk. The 'plan' is (was?) to upgrade again to a larger drive and/or RAID. It's supports email for my business (a one man band) but as there are only 4 users there very little need to share data between users. I have tended to use it as a space to backup data from the workstations and laptops.
Ahhh, slowly the truth will out as they say..... best laid plans of mice and men. A good reason to follow a strict plan, avoid guesswork and not take chances with production servers.
7 Ps....
Prior Preparation and Planning Prevent P*iss Poor Performance, as they say in the Army ;-)
The data was accumulated dross; pictures, ebooks, and music. I created an ibay, shared it and started the transfer using win 10. I suspect that the system continued to receive the horrendous volume of SPAM and ran out of disk space. Admin messages are directed to my mailbox so it would have been writing there when the problem arose.
Hmmmm. I am suspecting we are still missing something here. Did you follow the standard backup procedure ? i.e. disconnect server, backup to drive, stop old server, start new server, restore, check all is in place, connect new server ?
WinSCP set up to open a putty window every time so.........
OK
[root@main ~]# cat /etc/passwd |grep -i tony
tony:x:5000:5000:Tony Smith-Crallan:/home/e-smith/files/users/tony:/usr/bin/rssh
[root@main ~]# ll /home/e-smith/files/users/tony/Maildir
total 5944
drwxr-xr-x 2 office$ office$ 258048 Aug 4 06:47 cur
-rw-r--r-- 1 office$ office$ 79044 Aug 3 22:40 dovecot.index
-rw-r--r-- 1 office$ office$ 5644288 Aug 4 06:46 dovecot.index.cache
-rw-r--r-- 1 office$ office$ 31596 Aug 4 06:47 dovecot.index.log
-rw------- 1 office$ office$ 120 Oct 8 2015 dovecot-keywords
-rw-r--r-- 1 office$ office$ 120 Aug 3 19:31 dovecot.mailbox.log
-rw-r--r-- 1 office$ office$ 160250 Aug 4 07:08 dovecot-uidlist
-rw-r--r-- 1 office$ office$ 8 Aug 2 23:39 dovecot-uidvalidity
-r--r--r-- 1 office$ office$ 0 Jul 12 15:42 dovecot-uidvalidity.578501dc
drwxr-xr-x 2 office$ office$ 4096 Aug 4 08:14 new
-rw-r--r-- 1 office$ office$ 976 Aug 3 19:31 subscriptions
drwxr-xr-x 2 office$ office$ 4096 Aug 4 08:14 tmp
[root@main ~]#
Can you just show us:
cat /etc/passwd |grep -i office
What I do not understand is how you managed to transfer your mail directories. I have a feeling you have tried a manual transfer somehow and that is where it has gone wrong, but as you have still only told us part of the story it is hard to know.
B. Rgds
John
-
Did you follow the standard backup procedure ? i.e. disconnect server, backup to drive, stop old server, start new server, restore, check all is in place, connect new server ?
That was basically the sequence. Disconnect the mail server from the Internet, take workstation backup, build server from DVD, yum update, restore from workstation backup, re-make the link to the mail server. AFAICT, the server was working perfectly OK prior to the problem with running out of disk space. I am confused.
Checking the other users, all their mail directories are 'owned' by them. office$ isn't a valid user on my system.
Stefano,
What does:
signal-event user-modify tony
do?
Thanks for your interest and help.
Tony
-
Stefano,
What does:
signal-event user-modify tony
do?
Thanks for your interest and help.
Tony
I re read all the things that command do and no, it won't fix your issue
you'd try
chown -R tony:tony /home/e-smith/files/users/tony
the only file I see with a different owner (user:group) is the symbolic link to .qmail-default (which has root:admin)
-
P.S. tony, May I suggest/kindly ask you to use standard [ quote ] and [ code ] tags?
thank you for your collaboration and patience
-
chown -R tony:tony /home/e-smith/files/users/tony
That produced:
[root@main ~]# chown -R tony:tony /home/e-smith/files/users/tony
chown: invalid group: `tony:tony'
[root@main ~]#
Sorry I missed the quote flag at the top.
Tony
-
please, post the output of
grep tony /etc/group
you'd have something like (among other lines)
tony:x:5000:tony
I repeat, you messed up your server in some way
-
[root@main ~]# grep tony /etc/group
shared:x:500:admin,group_data,jenni,music,nicky,photos,public,rebekah,tony,work,www
[root@main ~]#
I suspected that running out disk space on a working mail server would cause some problems but I may well have done something else. :-(
I would really like to retain my email but if the only solution is to delete my user ID and re-create then I will. :-(((
Tony
-
no, deleting and recreating won't help you
please, check if in /etc/group you have a group with id 5000 (a line like the one I posted above).. if not:
- make a copy of /etc/group
- edit /etc/group and add a line like above
- save
try again the chown command and report back
-
I found the following lines:
.
slocate:x:21:
office$:x:5000:
nicky:x:5001:nicky
.
Do I edit the office$ line, replace it with tony:x:5000:tony or add it as additional line at the end?
Thanks
-
no, don't edit it
office$ seems a machine account.. do you have/had any windows client named office joined to your server?
-
Office if the name of my windows workstation.
-
Tony,
you still haven't told us exactly what you DID do - I know that you have only told us half the story to get in the muddle that you have.
Were you trying to manually copy stuff from a backup ? Why didn't you do a standard backup/restore ?
Leaping in to try and fix something that we do not understand the cause of will probably make matters worse rather than better.
Please go right back and describe EXACTLY what you did with the old server to backup your data, and what you then did with the installation on the new server.
B. Rgds
John
-
I am confused. The server was working perfectly correctly (as far as I could tell) until I caused it to run out of disk space. I have never tried to copy any system files 'by hand' only ever done a backup -> restore using the SME web interface.
-
Well, if so, you have a problem somewhere, because what I see here is a messer server
-
One step I forgot was resetting broken trust which maent the share was no accessible on my system.
Before I could restore from the shared on my workstation I needed to remove the system from the domain to a workgroup, reboot, rejoin the domain and reboot. The share was then accessible and the restore completed without error.
Is this relevant?
-
Did you do a full restore on a production server?
-
I am confused. The server was working perfectly correctly (as far as I could tell) until I caused it to run out of disk space. I have never tried to copy any system files 'by hand' only ever done a backup -> restore using the SME web interface.
I'll put it simple terms. It's a bit like algebra.
We currently have 5 = 3 + x
We know 5 = wrong permissions on you mail directories
We know 5 is you managed to run your sik out of space by copying some files across (but we don't know where they came from - were they part of a backup or a.n. other reason)
The issue is the missing x
We know that you would not expect permissions to change just because you ran out of space. So there must be something else in there that we do not know about.
We also have seen lots of similar instances when the user misses out some vial piece of information that they consider irrelevant, but actually explains the whole scenario.
So, can you retrace your path, and answer the question that I asked right at the start. Describe exactly the events prior to the issue. So far it looks like:
You had an old server.
You did a backup to USB
You installed a v9 on a new server
You restored from the USB including all your mail and documents
You then decided to plug in another drive with a various documents that you had stored on it from somewhere, and started to copy them on to the server. That filled the server drive. What happened on the server, and what did you do at that point ?
I'm not trying to be difficult, but the issues you have described so far are not explained by your actions, and neither would they occur if your drive fills up, so the presumption is that something else MUST have happened or action been taken that we do not know about.
B. Rgds
John
-
One step I forgot was resetting broken trust which maent the share was no accessible on my system.
And slowly but surely we move towards the root causes of the issue....
Is this relevant?
It may be, or may not, but we need to know everything to be able to tell.....
-
Thank you both for your patience I really appreciate it.
From memory, which may be incomplete :-(
1) change config on router to disconnect the mail server from Internet.
2) run SME backup to windows share on my win 10 workstation.
3) on completion, disconnect server from network. rebuild from DVD.
4) configure server as previously i.e. same name, IP address, domain.
5) run yum update from console
6) logon from web interface. set remote access, windows domain name and domain controller.
7) Configure workstation backup as before.
8) try restore - fails due to permissions.
9) move workstation of of domain to workgroup, reboot
10) login windows as local admin, rejoin domain, reboot
11) login to windows domain
12) attempt restore from web page - success.
13) reconfig router for email link.
14) check email :-(
I think that covers it............
-
Thank you both for your patience I really appreciate it
NP. Just bear with us - the questions we ask have a purpose.....
From memory, which may be incomplete :-(
Yeah, my grey cells seem to be on permanent holiday ! But something is better than nothing.
2 ) run SME backup to windows share on my win 10 workstation.
4 ) configure server as previously i.e. same name, IP address, domain.
5 ) run yum update from console
6 ) logon from web interface. set remote access, windows domain name and domain controller.
7 ) Configure workstation backup as before.
8 ) try restore - fails due to permissions.
9 ) move workstation of of domain to workgroup, reboot
10 ) login windows as local admin, rejoin domain, reboot
11 ) login to windows domain
12 ) attempt restore from web page - success.
14 ) check email :-(
I think that covers it............
And that is a lot more like it.....
I don't think you needed to do No 6 as the restore should do all the heavy lifting for you.
And No 8 sets the alarm bells ringing.
i can't do more tonight. Others may take a look - if not Stefano might drag his sorry butt out of bed in the morning and join in :-) He knows much more about Windoze nonsense than me.
At least now we have a better idea of what happened and when. If you remember anything else then please fill us in.
Do you still have your original backup ?
B. Rgds
John
-
i can't do more tonight. Others may take a look - if not Stefano might drag his sorry butt out of bed in the morning and join in :-) He knows much more about Windoze nonsense than me.
theorically speaking, Stefano is on vacations but :-)
Paperguides: first of all, SME is "just" linux and this give us many, many tools to solve problems.
in your case I see some issues that can't be easily solved from here.
IMO, since your server is for you (one man band, IIUC), you have no contribs installed and few clients in your lan, you'd start from scratch..
- how many clients do you have in your lan?
- how many users in your server?
- how much data in your server?
your mails are not lost and they can be recovered quite easily, but you must exit from the SME way of doing things..
please answer to my questions above, tomorrow, depending on your answers, I'll suggest you how to proceed (gevie you a plan, then you'll decide if follow it)
-
theorically speaking, Stefano is on vacations but :-)
Still........ ??????
:-) 8-) :pint:
Hot here !
-
Still........ ??????
no, again ;-)
-
no, again ;-)
You lucky.....
https://youtu.be/-5i1cJIwE7M
-
Hi Paperguides,
I am not a Win$ guru but I think that 6) is the problem.
6) logon from web interface. set remote access, windows domain name and domain controller.
I do not think that when you create a PDC with the same name as before that it will have the same number. The name will be the same but the internal representation will be different.
- The W10 station belong to the original domain (with the original name/number).
- You create a same "new" domain but W10 does not recognize the new server (with the original name/not orginal number).
- Human will not see the difference but computer will.
* You should give all right to everyone to the shared backup directory.
* Create the new server with same name and FQDN and IP as before. No domain. The FQDN is just to get to the sub-directory name (FQDN) in the shared directory on W10. Worse case, if you take a new name for the new server, just make sure to rename the sub-directory name with the new FQDN.
* Configure backup to point to the W10 shared directory.
* Restaure should work because everyone can get to the Shared dir.
* On reboot, everything will be as before (same name/same number)
My 2 1/2 cents
Michel-André
-
theorically speaking, Stefano is on vacations but :-)
I hope you are having a good time. My vacation isn't till late September. :-) Again my thanks for taking time to help me.
IMO, since your server is for you (one man band, IIUC), you have no contribs installed and few clients in your lan, you'd start from scratch..
- how many clients do you have in your lan?
None. I'm trying to retire so all my commercial customers have been transferred to other IT Support companies. After over 45 years of 'playing' with computers I've finally giving up the fight to keep up with technology. :-) Taken up completely different path. www.thesilversworkshop.org.uk
- how many users in your server?
Just 4 of which only three of us are active.
- how much data in your server?
85G and I don't understand how. :-) I have a separate backup of this data.
your mails are not lost and they can be recovered quite easily, but you must exit from the SME way of doing things..
please answer to my questions above, tomorrow, depending on your answers, I'll suggest you how to proceed (gevie you a plan, then you'll decide if follow it)
I am happy to start from scratch if necessary but I would like to be able to get back the mail.
Regards,
Tony
-
I am not a Win$ guru but I think that 6) is the problem.
With the speed and regularity that Microsoft change the rules, who can be?
I do not think that when you create a PDC with the same name as before that it will have the same number. The name will be the same but the internal representation will be different.
I suspected that was the case but my understanding the way M$ deals with domains was never great. :-(
* You should give all right to everyone to the shared backup directory.
* Create the new server with same name and FQDN and IP as before. No domain. The FQDN is just to get to the sub-directory name (FQDN) in the shared directory on W10. Worse case, if you take a new name for the new server, just make sure to rename the sub-directory name with the new FQDN.
* Configure backup to point to the W10 shared directory.
* Restaure should work because everyone can get to the Shared dir.
* On reboot, everything will be as before (same name/same number)
I was confused when I could not access the backup share as I deliberately gave 'everybody' full access.
My 2 1/2 cents
Michel-André
Thanks for joining in.
Regards,
Tony
-
Hi Paperguides,
Reboot the W10 station and login as \\Administrator. You will not be loged in the domain, only into the station W10.
Do the same with another station and see if it can access the backup directory of W10 with Windows Explorer.
Michel-André