archive mail by year

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
papuz
New user
New user
Posts: 14
Joined: 2011-08-01 15:15

archive mail by year

Post by papuz » 2014-10-16 08:37

Hi Everybody,

I'm using hmserver since 5 years, without troubles. HMserver is installed in a Win 2008 server, and I'm using IMAP for check the mail with thunderbird in the client (Win 7)

Until now, I normally delete the old mail, but from this year, I would like to do an archive, and keep in local only the last year:

working in 2014, I need mail 2014/2013
working in 2015, I need mail 2015/2014 and archive 2013.

Is that any system that allow to do that automatically?
In case, how can I check old mail in case I needed?

Thanks in advance for you help.

lusus
New user
New user
Posts: 1
Joined: 2014-10-16 10:36

Re: archive mail by year

Post by lusus » 2014-10-16 12:43

Hi!!

this is a great question i hope a great answer to :) :D , i am in the same situation. This idea can be very useful. i will be especting :wink:

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: archive mail by year

Post by percepts » 2014-10-16 15:20

there is nothing that comes with hmail that does this.

if you google for "email archive software" you will find many solutions for this. I don't have any personal experience of any of them so can't recommened a specific one.

But consider that you may need/want to be able to search the archived email and possibly restore some emails at will.
That means the archive will need to be in its own software server and be searchable.

You could code your own but it would be a significant piece of work to do.

I think a purchased solution which copies all mail as it arrives at hmail to archive DB would be best. This can also be used as backup. Then from archive software it would control of deletes of anything older than a set period on hmail.

You'll just have to search the web for something which will work with hmail the way you want it.

Note: just helped a user resolve a problem with a VBScript which read through every mail DB row. It ran at approx 5000 emails an hour and that didn't include any db updates. So if you have a lot of email and try to write something in VBScript then don't expect high performance from it. It could take hours or days depending on how much mail you have.
Something which access DB directly and doesn't use com api would be much faster. BUT we don't support direct DB updates. So in reality a third party solution which works using IMAP protocol as as each mail arrives at hmail would probably be the preffered solution IMO.

papuz
New user
New user
Posts: 14
Joined: 2011-08-01 15:15

Re: archive mail by year

Post by papuz » 2014-10-16 17:49

Hi percepts,

thanks for your answer, and for your suggestion.

Your idea is good, but I need to backup and restore also the outgoing mail, not only the incoming.

I thought that there can be a way to split the database of HmServer by year, and in case of needed to use old database.
Is it possible to split database, or use two database with same HmServer?

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: archive mail by year

Post by percepts » 2014-10-16 18:02

Not possible unless you rewite hmailserver yourself and somehow I don't think that will happen.

A mail archive program will archive both incoming and outgoing mail. You must search for one that has the functionality you want.

hmail is designed purely to deliver email and store both incoming and outgoing mail if you are using IMAP.

you could add a request into Martins roadmap request for suggestions something along the lines of a domain and account view date where hmail would only return mails post that date. That way mail is all kept in hmail but effectively does what you want without any third party software. Not sure how easy or if its possible with IMAP protocol or not.
Then if you need to look back further you can change date on a single account or domain.
It may even speed up imap performance by stopping users sorting massive accounts by date/subject etc.

viewtopic.php?f=10&t=27191

I don't know when it would get done (if at all) but it seems like a fair idea though. Post the suggestion and see what Martin and others think. Since mail create date is in DB it may be quite easy but again I'm guessing about that.
And post link back to this topic with it.

User avatar
mattg
Moderator
Moderator
Posts: 20781
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: archive mail by year

Post by mattg » 2014-10-17 00:02

I'm pretty sure that Bill's archive feature (viewtopic.php?f=10&t=21420) is in the main build, and is accessed via the ini settings

I'm not sure that these are are likely to stay, as Martin has expressed preference for GUI settings
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

LesD
Senior user
Senior user
Posts: 343
Joined: 2009-01-15 20:22
Location: London, UK.

Re: archive mail by year

Post by LesD » 2014-10-17 14:48

I tend to keep away from automating this sort of thing. I can see lots of potential for disasters.

My personal solution is to do this manually, once or twice a year using Thunderbird as my mail client.

Just create an appropriately named folder, sort your mail by date and just move whatever you want. This obviously will not be practical if you have loads of sub-folders.

If you want to keep your main hMS data folder and the associated database small and fast then create the Archive folders in the 'Local Folders" section which will move the emails from the central hMS system to an external location.

User avatar
jimimaseye
Moderator
Moderator
Posts: 8514
Joined: 2011-09-08 17:48

Re: archive mail by year

Post by jimimaseye » 2014-10-19 13:33

Yeah thats what I do Les. Create a 2011 folder and copy the 2011 emails into it. If you use Thunjderbiurd, for example, create the folder in the LOCAL FOLDERS account rather than the IMAP account. This moves the emails from the hmail data into [wherever youve pointed thunderbird to put its local data]. Its quite easy really and takes away the risk of 'automation' going wrong. (And as it only has to be done once a year, its not too much of a ball-ache). Ofcourse if you ARE using thunderbird its even easier just to use its ARCHIVE feature. :-) (Hint: Install thunderbird on your server just to do this job.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: archive mail by year

Post by percepts » 2014-10-19 17:16

and what if you have hundreds or thousands of users ? Are you going to sit there logging in and moving all of them manually ? Of course you're not. The only way to handle that is with an automated system.

AND

if you leave it to users to do themself then you really don't have a true archive system. You can force them to archive stuff onto their local pc but they can then delete the data and/or it is most likely NOT backed up in a reliable and retrievable way. PC dies so how do you get the data back.

you are talking about a personal system which simply is applicable to many setups.

User avatar
jimimaseye
Moderator
Moderator
Posts: 8514
Joined: 2011-09-08 17:48

Re: archive mail by year

Post by jimimaseye » 2014-10-19 19:12

There you go then Papuz. You have a method already used and given by Les and myself, and an alternative suggestion (and reason why our method cant be any good) by Percepts.

1, Do it manually (with the aid of your Thunderbird if you wish) if your email/user count allows OR
2, Google for a solution.

We would be interested to see what solution or method you take or find.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

LesD
Senior user
Senior user
Posts: 343
Joined: 2009-01-15 20:22
Location: London, UK.

Re: archive mail by year

Post by LesD » 2014-10-19 19:53

Percepts: The question here is what is the 'market' at which hMS is targeted.

In an 'Enterprise' there are likely to be corporate rules as to retention, archiving, security, backup and so on. And it is most likely that some heavy package other than hMS will be the mail server of choice.

I guess (and I can only guess as probably there are no statistics available) that the typical hMS installation is at the smaller end of the scale - from a handful of users up to several hundred.

Such users will typically be doing their own thing and having their own views as to what is current and what is to be archived and how. I agree it is not practical to manage the mail boxes centrally, but would argue that there is no need for that and there would most likely be strong resistance if it were attempted.

Lurking in this forum I get the very strong feeling that the typical hMS administrator is an individual rather than an IT department. As such users are unlikely to be centrally controlled.

The suggestion for archiving into the 'local' folder need not be to the personal PC. It could just as easily be directed to a central location.

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: archive mail by year

Post by percepts » 2014-10-19 20:10

I'm just pointing out that what might work for a single person is not necessarily good for a business with even 10 employees.
Yes I rekon most users are one man bands but there are some large companies who use it as well. Reports of 20,000 users and probably quite a lot between 10 and 100 users.

The point here is that IF an archive facility were to be built into hmail, then it should be a good solution for everyone and not just a good solution for a one man band. And since it is being suggested the one man band doesn't need it, then I guess it follows it should primarily suit the larger setups if it were implemented since the one man band wouldn't be using it anyway. :wink:

LesD
Senior user
Senior user
Posts: 343
Joined: 2009-01-15 20:22
Location: London, UK.

Re: archive mail by year

Post by LesD » 2014-10-19 20:24

I agree in principle but my head was still with the thread about voting for what we want.

I just see writing an automated archiving feature as being rather complex, requiring lots of parametrisation to cater for different requirements and tastes. Not something that I feel to be a high priority.

User avatar
mattg
Moderator
Moderator
Posts: 20781
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: archive mail by year

Post by mattg » 2014-10-20 00:53

percepts wrote:The point here is that IF an archive facility were to be built into hmail
mattg wrote:I'm pretty sure that Bill's archive feature (viewtopic.php?f=10&t=21420) is in the main build, and is accessed via the ini settings
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Post Reply