Koozali.org: home of the SME Server

Changing server from Suse to SME - migrating mail

Offline julianop

  • *
  • 61
  • +0/-0
Changing server from Suse to SME - migrating mail
« on: April 29, 2010, 07:23:37 PM »
I've just discovered SME Server, have seen the light, and will be swapping a small business type installation at a local arts organization to it.
The first comment out of my mouth was "SME - where have you been all my life?" but you all know that emotion by now.
My biggest challenge will be migrating mail.
I've been using Postfix, and have megs of accumulated MailDir mail for my users.
What is the best way to bring that over to SME ?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Changing server from Suse to SME - migrating mail
« Reply #1 on: April 29, 2010, 07:34:34 PM »
My biggest challenge will be migrating mail.
I've been using Postfix, and have megs of accumulated MailDir mail for my users.
What is the best way to bring that over to SME ?
If it is setup as imap server I suggest you have a search for imapsync.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline julianop

  • *
  • 61
  • +0/-0
Re: Changing server from Suse to SME - migrating mail
« Reply #2 on: April 29, 2010, 08:42:25 PM »
Thanks, that looks like it'll do the  job for me.

I'm also in the market for a group calendaring system, so if anyone has any recommendations/suggestions I'd be grateful.

Finally, I'm not new to Linux, but I am new to SME Server, so any words from the wise old warriors would be welcome.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Changing server from Suse to SME - migrating mail
« Reply #3 on: April 30, 2010, 01:19:47 AM »
julianop

Quote
I'm also in the market for a group calendaring system

Look at groupware, egroupware  or the horde add on's, take your pick.
Using the external google calendar offerings is also a viable online option & does not need to be supported on sme.

Quote
any words from the wise old warriors would be welcome.

Do not change config files directly.
Learn about the templating system, and how it creates the config files.
Do not change template fragment files directly, always create custom template fragments.
Learn about the db commands as many (not all) settings can be configured with a db command.
Realize that the server manager is the GUI control panel for sme and that all changes made there interact with many different functional systems within sme eg on a gateway server, enabling a secure mail server component will also open the appropriate port in the firewall.
If you cannot do something in server manager, look to see if there is a db command available. If not then you need to create custom templates.

Read the manuals two or three times
Read the Developers Guide (manual)
Read the FAQ
Read the Howto pages as there are many useful tutorials and additional information articles that are not in the manual eg db commands, db command tutorial and so on.
Read the Contrib pages as there are many useful add on applications.
Even read Howtos and Contribs wiki articles that you are not interested in, as they give wonderful clues as to approaches to take when making customisations to your server.

Try to keep your sme server as "bog standard" as possible, as you will have less hassles when upgrading. Preferably use only customisations that are well proven and available on the contribs.org site. Install less add on's rather than more, only install add on's that you absolutely need to have.

Make sure you have a functional backup system in place eg attached USB drive (formatted to ext3), and check your backup actually works, and ideally do a test restore to prove the whole backup/restore system works as expected, so it will do the job on that day somewhere in the future when you are really really dependant on getting you server up and running from a backup.
There is a default backup to workstation option based on dar, that will backup to a USB. Other backup options exist.

Donate something to contribs.org running cost.
Verify a bug or two for the next release ie sme8.
Have a reasonable & respectful attitude when using the forums.
Post bugs or potential bugs to bugzilla first (rather than the forums).

Have fun using sme !

PS  Use sme8beta5 if your hardware is the latest and greatest
« Last Edit: April 30, 2010, 03:10:11 AM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline julianop

  • *
  • 61
  • +0/-0
Re: Changing server from Suse to SME - migrating mail
« Reply #4 on: April 30, 2010, 03:03:55 AM »
Mary - EXCELLENT recommendations - EXACTLY what I was looking for  :-D

I will indeed use SME8b5 - that was to be my next question...

and I will indeed contribute $ and bug-chasing effort.

One question .. "bog standard" ... I haven't heard that for a long time - since I left England some 27 years ago; are you English too?


Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Changing server from Suse to SME - migrating mail
« Reply #5 on: April 30, 2010, 03:07:08 AM »
julianop

Quote
..one question .. "bog standard" ... I haven't heard that for a long time - since I left England some 27 years ago; are you English too?

Aussie.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Changing server from Suse to SME - migrating mail
« Reply #6 on: April 30, 2010, 03:30:31 AM »
I've been using Postfix, and have megs of accumulated MailDir mail for my users.
What is the best way to bring that over to SME ?

SME server uses maildir format folders, so you may be able to just copy them. You might need to rename them. The INBOX folder is ~/Maildir, and the IMAP folder called X is a maildir at ~/Maildir/.X.

Or you could just use imapsync, or use a mail client such as Thunderbird to copy messages and folders.

It all depends on what your experience, skill level and the size of the problem.

Offline julianop

  • *
  • 61
  • +0/-0
Re: Changing server from Suse to SME - migrating mail
« Reply #7 on: May 04, 2010, 05:37:16 AM »
Thanks CharlieBrady. The client copy method (e.g. Thunderbird) doesn't retain proper dates if I remember - or didn't, last time I used that method. I'll create a dummy account on the existing system and try the copy (cp -a) method and the imapsync method. I'll post results, if anybody is interested.

Offline julianop

  • *
  • 61
  • +0/-0
Re: Changing server from Suse to SME - migrating mail
« Reply #8 on: May 04, 2010, 05:40:50 AM »
julianop

Look at groupware, egroupware  or the horde add on's, take your pick.
Using the external google calendar offerings is also a viable online option & does not need to be supported on sme.

Do not change config files directly.
Learn about the templating system, and how it creates the config files.
Do not change template fragment files directly, always create custom template fragments.
Learn about the db commands as many (not all) settings can be configured with a db command.
Realize that the server manager is the GUI control panel for sme and that all changes made there interact with many different functional systems within sme eg on a gateway server, enabling a secure mail server component will also open the appropriate port in the firewall.
If you cannot do something in server manager, look to see if there is a db command available. If not then you need to create custom templates.

Read the manuals two or three times
Read the Developers Guide (manual)
Read the FAQ
Read the Howto pages as there are many useful tutorials and additional information articles that are not in the manual eg db commands, db command tutorial and so on.
Read the Contrib pages as there are many useful add on applications.
Even read Howtos and Contribs wiki articles that you are not interested in, as they give wonderful clues as to approaches to take when making customisations to your server.

Try to keep your sme server as "bog standard" as possible, as you will have less hassles when upgrading. Preferably use only customisations that are well proven and available on the contribs.org site. Install less add on's rather than more, only install add on's that you absolutely need to have.

Make sure you have a functional backup system in place eg attached USB drive (formatted to ext3), and check your backup actually works, and ideally do a test restore to prove the whole backup/restore system works as expected, so it will do the job on that day somewhere in the future when you are really really dependant on getting you server up and running from a backup.
There is a default backup to workstation option based on dar, that will backup to a USB. Other backup options exist.

Donate something to contribs.org running cost.
Verify a bug or two for the next release ie sme8.
Have a reasonable & respectful attitude when using the forums.
Post bugs or potential bugs to bugzilla first (rather than the forums).

Have fun using sme !

PS  Use sme8beta5 if your hardware is the latest and greatest

I was thinking that this is such excellent and concise advice, would it be worth making it a sticky, or an FAQ, or something like that ??
« Last Edit: May 04, 2010, 05:44:06 AM by julianop »

Offline timn

  • *
  • 62
  • +0/-0
    • Nash CDL
Re: Changing server from Suse to SME - migrating mail
« Reply #9 on: May 04, 2010, 12:09:07 PM »

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Changing server from Suse to SME - migrating mail
« Reply #10 on: May 04, 2010, 02:26:11 PM »
Thanks CharlieBrady. The client copy method (e.g. Thunderbird) doesn't retain proper dates if I remember - or didn't, last time I used that method.

Message arrival date might change, but message arrival order should stay the same. Message send date should be stable.

Offline julianop

  • *
  • 61
  • +0/-0
Re: Changing server from Suse to SME - migrating mail
« Reply #11 on: May 04, 2010, 02:32:43 PM »
yes, indeed. As I remember now, at that particular time I was converting between mailbox and maildir. I'll try it this weekend when I swap the servers, and report. A "migration howto" might be a fun thing to put together; I'm sure I'm not the only one making this transition.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Changing server from Suse to SME - migrating mail
« Reply #12 on: May 04, 2010, 02:40:46 PM »
yes, indeed. As I remember now, at that particular time I was converting between mailbox and maildir. I'll try it this weekend when I swap the servers, and report. A "migration howto" might be a fun thing to put together; I'm sure I'm not the only one making this transition.
Be our guest and do a write up in the wiki.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline mmccarn

  • *
  • 2,656
  • +10/-0
Re: Changing server from Suse to SME - migrating mail
« Reply #13 on: May 05, 2010, 01:39:37 PM »
Sonoracomm has a howto for setting up "imapcopy", another imap copy utility: http://www.sonoracomm.com/support/19-inet-support/60-imapcopy

I've used imapcopy a couple times (probably circa 2002 & 2006).  It's easier to set up and use than imapsync.

The author's page seems to have trouble whenever I want to use it, and the program itself is a binary that comes pre-compiled, but the download "wget..." from the howto above does work.


Offline julianop

  • *
  • 61
  • +0/-0
Re: Changing server from Suse to SME - migrating mail
« Reply #14 on: May 05, 2010, 02:34:46 PM »
Be our guest and do a write up in the wiki.

Will do!

Offline julianop

  • *
  • 61
  • +0/-0
Re: Changing server from Suse to SME - migrating mail
« Reply #15 on: May 05, 2010, 02:36:40 PM »
Sonoracomm has a howto for setting up "imapcopy", another imap copy utility: http://www.sonoracomm.com/support/19-inet-support/60-imapcopy

I've used imapcopy a couple times (probably circa 2002 & 2006).  It's easier to set up and use than imapsync.

The author's page seems to have trouble whenever I want to use it, and the program itself is a binary that comes pre-compiled, but the download "wget..." from the howto above does work.

OK, I'll give it a run and see how much trouble I can get myself into! And I will write up the experience.

Offline pfloor

  • *****
  • 889
  • +1/-0
Re: Changing server from Suse to SME - migrating mail
« Reply #16 on: May 21, 2010, 07:10:39 AM »
Be careful with imapsync if you end up using it on large folders, I have had it stall with over 3000 messages.  There are commandline switches to limit the number of emails to process.  I would keep the number to 500 or 1000 at a time. You can use the split1 and split2 commands, I have used it several times and it works flawlessly.  Here is a sample...

imapsync --noauthmd5 --host1 <source.server> --port1 143 --split1 500 --user1 <username> --password1 <password> --sep2 / --prefix2 "" --host2 <destination.server> --port2 143 --split2 500 --user2 <username> --password2 <password>

NOTE: The above command is all on one line or break it up like this...

imapsync --noauthmd5 --host1 <source.server> --port1 143 --split1 500 --user1 <username> --password1 <password> \
--sep2 / --prefix2 "" --host2 <destination.server> --port2 143 --split2 500 --user2 <username> --password2 <password>
« Last Edit: May 21, 2010, 07:14:02 AM by pfloor »
In life, you must either "Push, Pull or Get out of the way!"