Koozali.org: home of the SME Server

Archiving email

Offline stabilys

  • *
  • 76
  • +0/-0
  • Ah din't do it!!
    • Stabilys Ltd
Archiving email
« on: April 17, 2018, 05:37:09 PM »
Hi all

we have email users with very large inboxes who are not going to change their habits. We are developing various possible solutions for this.

As part of that we are considering moving mail beyond a certain date to an 'old-mail' folder as a stage before archiving off file system.

There's a tool 'archivemail'  which needs python that does this task (eg. https://linux.die.net/man/1/archivemail ) rather than us reinventing the wheel, yet again, and no doubt badly scripted :)

Is there any reason it is a bad idea to look at installing and using this on Koozali SME server?

Thanks for any clues.
This, too, will pass ;)

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Archiving email
« Reply #1 on: April 17, 2018, 05:52:03 PM »
https://linux.die.net/man/1/archivemail ?

Sounds like a good project for a contrib/panel actually :-)
...
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 ReetP

  • *
  • 3,722
  • +5/-0
Re: Archiving email
« Reply #2 on: April 17, 2018, 05:54:33 PM »
yum --enablerepo=epel install archivemail

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

  • *
  • 3,722
  • +5/-0
Re: Archiving email
« Reply #3 on: April 17, 2018, 06:10:14 PM »
Couple of notes.

This is a Python 2 script so if you have SCL pythion 3.x installed you need to specify the older python.

You may also need to specify the directories as SME is 'non standard'

This worked for the root account and put the gz file in /home/e-smith:

/usr/bin/python /usr/bin/archivemail /home/e-smith/Maildir

Here's another to just do Sent for a user:

/usr/bin/python /usr/bin/archivemail /home/e-smith/files/users/bob/Maildir/.Sent

Or all directories for the user:

/usr/bin/python /usr/bin/archivemail /home/e-smith/files/users/sue/Maildir

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