Koozali.org: home of the SME Server

copied user filesystem from SME8 to SME9.2

Offline groutley

  • *****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
copied user filesystem from SME8 to SME9.2
« on: July 01, 2017, 06:44:42 AM »
Hi,
  I am seeking some help please..
I have an old SME8 system,  that has been running everything for me, and not had the chance to move to my newer hardware running sme9.2
.
I have copied the /home/e-smith/files/users  directories from the old server to the new and changed ownerships on the respective user directories.
But,  while I can see all the emails fine, using a mail client or webmail,   I am not receiving  or able to send any new emails on the new 9.2 server.

If I logon to /webmail (horde)   I get the following error when trying to send an email:
There was an error sending your message: Failed to set sender: user@email.domain.net [SMTP: Failed to write to socket: not connected (code: -1, response: )]

The message is immediate when clicking send,  I don't believe it is failing to send, but some authority ? or Service not running ?

Really appreciate some help to get my email system working on thie sme9.2 system..   I don't wwant to have to go back to sme8 if I can help it.

guest22

Re: copied user filesystem from SME8 to SME9.2
« Reply #1 on: July 01, 2017, 07:08:14 AM »
... and not had the chance to move to my newer hardware running sme9.2


I think your issue lies here. Please make sure your new server is fully functional and ready BEFORE testing migrating data.

Offline groutley

  • *****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: copied user filesystem from SME8 to SME9.2
« Reply #2 on: July 01, 2017, 09:35:31 AM »
Thank you for your reply,
 but I am not sure what you mean ?
The server is fully functional, and has been for sometime.
what exactly would make it 'ready' ?

I have reviewed the sticky 9.2 upgrade thread and don't believe I missed anything ?

FYI
Code: [Select]
[root@l1nuxsvr users]# cat /var/log/qmail/current
[root@l1nuxsvr users]# cat /var/log/imaps/current
cat: /var/log/imaps/current: No such file or directory
[root@l1nuxsvr users]# cat /var/log/imap/current
cat: /var/log/imap/current: No such file or directory
[root@l1nuxsvr users]# cat /var/log/Dovecot/current
cat: /var/log/Dovecot/current: No such file or directory
[root@l1nuxsvr users]#

Offline TerryF

  • grumpy old man
  • *
  • 1,847
  • +6/-0
Re: copied user filesystem from SME8 to SME9.2
« Reply #3 on: July 01, 2017, 10:18:59 AM »
Why not just backup the sme8 system and restore to sme9.2 system..
--
qui scribit bis legit

Offline groutley

  • *****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: copied user filesystem from SME8 to SME9.2
« Reply #4 on: July 01, 2017, 11:25:00 AM »
Long story..
  had the SME9 running for a year or 2 and it serves other purposes, but never email.
So reviewing backup / restore procedures, I am not interested in migrating / moving any additional contribs, All problems with the upgrade that I read are related to RPMs / incompatible contribs.  I just want to move  the user data / Maildir's..

So I basically used this procedure.. https://wiki.contribs.org/Backup_server_config#Copying_data_to_the_restored_server
although I only did 'user' data.

There are no custom templates and I did not want to copy the complete  configuration of the old SME8 and have configured the SME9.2 server manually.



Offline ReetP

  • *
  • 3,947
  • +6/-0
Re: copied user filesystem from SME8 to SME9.2
« Reply #5 on: July 01, 2017, 11:50:44 AM »
Sounds like you haven't got your configuration right somewhere.

I suggest you check some of your configuration dbs

db config show

Look at qpsmtpd/sqpsmtpd/qmail

Also check accounts, domains and host dbs too

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline groutley

  • *****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: copied user filesystem from SME8 to SME9.2
« Reply #6 on: July 01, 2017, 01:40:16 PM »
Thanks for the input..

Code: [Select]
[root@l1nuxsvr files]# db config show
[root@l1nuxsvr files]#

I get the same (nothing) on the old SME8 server ?

I have configured the domain via 'su admin'  and configure server.
Also set the server-manager email setup identical to the old SME8 setup.

guest22

Re: copied user filesystem from SME8 to SME9.2
« Reply #7 on: July 01, 2017, 01:42:14 PM »
Thanks for the input..

Code: [Select]
[root@l1nuxsvr files]# db config show
[root@l1nuxsvr files]#

I get the same (nothing) on the old SME8 server ?

I have configured the domain via 'su admin'  and configure server.
Also set the server-manager email setup identical to the old SME8 setup.


How about config show (for the db name is configuration, not config, config is an alias for configuration)

Offline groutley

  • *****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: copied user filesystem from SME8 to SME9.2
« Reply #8 on: July 01, 2017, 01:59:28 PM »
Code: [Select]
[root@l1nuxsvr ~]# service qmail status
down: /service/qmail: 320s; run: log: (pid 1202) 320s
[root@l1nuxsvr ~]# service qpsmtpd status
down: /service/qpsmtpd: 331s; run: log: (pid 1187) 331s
[root@l1nuxsvr ~]# service sqpsmtpd status
down: /service/sqpsmtpd: 355s; run: log: (pid 1188) 355s
[root@l1nuxsvr ~]# service sqpsmtpd start
Starting sqpsmtpd:                                         [  OFF ]
[root@l1nuxsvr ~]# service qmail start
Starting qmail:                                            [  OFF ]
[root@l1nuxsvr ~]# service qpsmtpd start
Starting qpsmtpd:                                          [  OFF ]
[root@l1nuxsvr ~]#


for db configuration show:
Code: [Select]
qmail=service
    MaxMessageSize=15000000
    status=disabled
qpsmtpd=service
    Bcc=disabled
    BccMode=cc
    BccUser=maillog
    DNSBL=disabled
    LogLevel=6
    MaxScannerSize=25000000
    RBLList=bl.spamcop.net,dnsbl-1.uceprotect.net,dnsbl-2.uceprotect.net,psbl.surriel.com,zen.spamhaus.org
    RHSBL=disabled
    RelayRequiresAuth=enabled
    SBLList=multi.surbl.org,black.uribl.com,rhsbl.sorbs.net
    TlsBeforeAuth=1
    UBLList=multi.surbl.org:8-16-64-128,black.uribl.com,rhsbl.sorbs.net
    URIBL=disabled
    access=public
    qplogsumm=disabled
    status=disabled

So both services are disabled ?

I notice
Code: [Select]
dovecot=service
    Quotas=enabled
    status=enabled

Should I use setprop to enable qmail and  qpsmtpd ?


guest22

Re: copied user filesystem from SME8 to SME9.2
« Reply #9 on: July 01, 2017, 02:03:06 PM »
Why they are disabled is beyond me, they should both be enabled. By default they should be enabled so I suspect somebody did something...


To make sure all aspects are taken care of, after enabling (the command you suggested for both services) do a:
signal-event post-upgrade; signal-even reboot

Offline ReetP

  • *
  • 3,947
  • +6/-0
Re: copied user filesystem from SME8 to SME9.2
« Reply #10 on: July 01, 2017, 02:24:50 PM »
Sorry about the config commands - my bad

Code: [Select]
config show
Code: [Select]
config show qpsmtpd
Or the full version:

Code: [Select]
db configuration show
You can use this format for various dbs in /home/e-smith/db

db (databaseName e.g. accounts|hosts|domains) show

Someone has clearly been fiddling as the email services are always enabled by default.

A a minimum I think you will need:

Code: [Select]
config setprop qmail status enabled
Code: [Select]
config setprop qpsmtpd status enabled
Code: [Select]
config setprop sqpsmtpd status enabled
Code: [Select]
signal-event email-update

You may want to check in your server-manager/Email and decide what type of SMTP retrieval system you need as well.

Check these (which are set by the Email panel):

Code: [Select]
config show smtpd
Code: [Select]
config show ssmtpd
Or to be sure:

Code: [Select]
or signal-event post-upgrade;signal-event reboot
That should get the basic mail transport going
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline groutley

  • *****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: copied user filesystem from SME8 to SME9.2
« Reply #11 on: July 01, 2017, 03:17:15 PM »
Thank you for all the help !
  I have done the setprop status enabled for those services.  and looks better..

Code: [Select]
[root@l1nuxsvr ~]# config show smtpd
smtpd=service
    Authentication=disabled
    Instances=40
    InstancesPerIP=5
    MaximumDateOffset=0
    PatternsScan=enabled
    Proxy=transparent
    TCPPort=25
    TCPProxyPort=25
    VirusScan=enabled
    access=public
    status=enabled
    tnef2mime=enabled
[root@l1nuxsvr ~]# config show ssmtpd
ssmtpd=service
    Authentication=enabled
    Instances=10
    TCPPort=465
    access=public
    status=enabled
[root@l1nuxsvr ~]#

my Admin mail has started receiving emails from June2015 onwards.. So it has fixed that at least.
I still havn't received any new external emails yet.
I'll leave it overnight and see if anything trickles thru after admin has caught up.

Offline ReetP

  • *
  • 3,947
  • +6/-0
Re: copied user filesystem from SME8 to SME9.2
« Reply #12 on: July 01, 2017, 04:55:32 PM »
my Admin mail has started receiving emails from June2015 onwards.. So it has fixed that at least.
I still havn't received any new external emails yet.
I'll leave it overnight and see if anything trickles thru after admin has caught up.

Yes, I suspect that whatever you have done has made a fairly substantial mess of things somewhere, and you haven't really told us exactly what happened to cause this, which make it quite hard to diagnose.

admin mail proves noting beyond the internal mail transport has started to function.

Have you checked all your mail domain setup ? Do your IP addresses match DNS records etc ? i.e if you server is mail.mydomain.coom can you ping it from outside your network ? Is the server in the right mode - e.g. server or server/gateway as before?

Is it the same IP as the old server, and have you configured ports or DMZ or whatever on your firewall to the new IP?

Do you fetchmail or is your server a proper SMTP server ?

Can you email outbound ?

What do your logs tell you ?

What happens if you use another account say gmail to mail to your domain ? Do you get a bounce or other error message ?

If you haven't got one or two mails you either normally receive very little regardless, or something is still broken/not working. With SMTP, mails that can't be delivered to your server are usually queued and retried (by well behaved mail servers) so I would expect you to start receiving some fairly quickly.

Note.... You would have saved yourself a lot of grief by doing the standard backup/restore. As long as you move any custom-templates out of the way you are fine.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline groutley

  • *****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: copied user filesystem from SME8 to SME9.2
« Reply #13 on: July 02, 2017, 03:05:32 AM »
Thanks ReetP,
 You are absolutely correct that I have not told you everything, as I am not sure what has been done myself over the last couple of years on this server. I understand completely that it makes it impossible to provide beyond the incredible help you have been.
This server I think I built from the sark iso @ sme9.0 a couple of years back, it got loaded up with pyTivo and music shares, and maintained with the regular yum updates. I gather I might have shutdown the mail services via the sme9admin panels at the time. As I stumbled across that panel last night after doing the setprops to enable them. ( it vaguely rings a bell).
I chose to just move the /home/e-smith/files/users/* as the ibays on the sme9.2 are already configured and purposed very differently to any on the sme8.2 server. And reading that any woes appear to be contrib / template related, I figured as I have no need to move contribs or other services, I would keep is 'simple' with just the user data..
If I had managed to remember that I had shutdown email sevices years ago, it would hve gone pretty smooth really.

That said, admin is still getting emails, this morning some 20,000 emails and a full filesystem !
Also a couple of local emails in my personal inbox, regarding disk space useage.
But no external emails at all.

The sme9.2 is in server and gateway mode with the external nic on the ISP wall socket, so no DMZ etc to configure, it does register with dyndns.org and I checked that dyndns had updated with the correct ip address my server has (from ifconfig output).

Given the full disk and admin emails still generating at 100's per minute, I have put the old sme8.2 back online and it recieved lots of external emails within seconds.
I'll wait for 9.2 admin to settle, and stay ontop of deleting the inbox to avoid the disk full again.
The try to undertsand why not getting external emails, by looking in logs etc.. ( i dont see much point currently while admin is flooding everything).

I think there was going to be pain no matter which way I went with moveing across,
In fact the 9.2 has been an affa backup server for the 8.2 server, so I had attempted to 'rise' the 9.2 however fell into a hole where it could not complete due to lack of disk space to back itself up before rising..  I manually cleaned up lots of data, but reached the poing of , why dont i just move the 'Maildir's manually, as any of the backup processes seem to do just that as well as everything else that I didnt need.

I understand I am not following a normal path, but it wasn't going to be straight forward either way.

Offline ReetP

  • *
  • 3,947
  • +6/-0
Re: copied user filesystem from SME8 to SME9.2
« Reply #14 on: July 02, 2017, 01:48:04 PM »
Thanks ReetP,
 You are absolutely correct that I have not told you everything, as I am not sure what has been done myself over the last couple of years on this server. I understand completely that it makes it impossible to provide beyond the incredible help you have been.

Yup :-)

Rule 1 in these situations - tell the whole story straight away, no matter how embarrassing it may be ;-)  We'll find out eventually.... it just saves a lot of guesswork and red herrings and wasted time along the way.

I'm afraid that, as you already have found out, your v9 box is toast really. It is probably not worth the hassle of trying to fix. I'd have a look in /var/affa and get rid of some of your old archives to free up the box a little. (Check the affa page too)


Quote
I understand I am not following a normal path, but it wasn't going to be straight forward either way.

No, it was always easy if you follow the recommended path. Unfortunately given the history of the new box you were on to a hiding to nothing and a world of pain.

You have too much stuff going on in the v9 box to reliably restore. I would suggest you back up everything you can on both boxes, clear out the v9 box (or install fresh) and start again. Note that affa rise from a v8 backup to a v9 box has some gotchas (as I discovered). See the bug tracker and the affa wiki page if you intend to try this.

Yes, I know it is a pain in the butt with the upgrade from v8 to v9, but this was a decision made by Redhat, not SME.

Let us know how you get along.

B. Rgds
John
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: copied user filesystem from SME8 to SME9.2
« Reply #15 on: July 02, 2017, 05:47:59 PM »
I'm sure it's possible to fix your install... you/we need just a couple of time.
Do you have time / patience to fix it ?
How are your linux skills ?

First of all: you'll have problems with user/groups and permissions. Files where copied with WRONG USER and GROUP IDs and are a REALLY MESSY thing.

So here is my tip:
1) let's start by one SHARE: copy each file/directory where it should be and change SOMETHING (anything even a description) on web interface and save.
It should redo all permissions.
Test if this share is ok. If not you can use a shell script to fix it. I can provide it for you later.

2) if this path works... repeat for each SHARE.

3) for user directories, it's just a matter of fix permissions using a shell script (I can provide you).
it's something like: "chown -R X:Y .*" and later change ".*" to "*""
Where X:Y are the username and account.
If you need assistance with this, post and "ls -la" of one directory of user and I'll help you.

BTW: This is the REALLY HARD way to move content between servers: Affa is the easy way! ;)

Regards,
 
Jáder
...

Offline ReetP

  • *
  • 3,947
  • +6/-0
Re: copied user filesystem from SME8 to SME9.2
« Reply #16 on: July 02, 2017, 08:13:35 PM »
Jader,

I don't think it was an issue with the files per se - it was the main server config.

He'd installed it allegedly from a Sark ISO (?)

He'd used it as for music etc etc, and subsequently as an affa backup box too

He then tried to 'rise' the affa. My guess is that was the start of the disaster.

Everything else is just a symptom.

I am sure the OP could potentially sort it out, but quite honestly it will be quicker, easier and cleaner to start again

(how many times have we though 'that'll be easy' only to discover several hours or days later that it wasn't as easy as first thought, and a backup/restore would have been cleaner and faster!)

Yes, affa is a good choice (bearing in mind the gotcha I found) but it needs to be started from a clean machine in the first place.

My 10 cents worth... !

B. Rdgs
John
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation