5.4 as stable

Use this forum if you want to discuss a problem or ask a question related to a hMailServer beta release.
Post Reply
User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

5.4 as stable

Post by martin » 2013-01-20 14:23

Anyone thinks that a bad idea? :)

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

Re: 5.4 as stable

Post by mattg » 2013-01-20 15:53

definitely a great idea.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

huntor
New user
New user
Posts: 12
Joined: 2008-09-09 21:25

Re: 5.4 as stable

Post by huntor » 2013-01-20 16:39

I can't say that I have ran into any issues. Sounds like a great idea to me.

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: 5.4 as stable

Post by ^DooM^ » 2013-01-20 17:25

Been saying it's stable for nearly 2 years, go for it.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

random
Normal user
Normal user
Posts: 108
Joined: 2006-07-16 09:51
Location: Germany

Re: 5.4 as stable

Post by random » 2013-01-20 19:17

I'm using 5.4 build 1944 for some time now and I think it is very stable.

But no clear "yes" for stable from me because of the issue posted in http://www.hmailserver.com/forum/viewto ... 79&start=0
Not a big thing, but in a production environment I wouldn't expect a service first not to shut down and after timeout to terminate quietly.
I suggest that this behavior should be documented or logged or something.

Just my 2 cent. :)

lg
random

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: 5.4 as stable

Post by Bill48105 » 2013-01-21 03:19

Been stable since 2nd alpha as far as I'm concerned :D

Btw there are a few changes/fixes in my experimental releases & local copy that probably should be committed to SVN before you post a 5.4 as stable but that's up to you if you want them included or just in my builds I post.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

mns17
Normal user
Normal user
Posts: 124
Joined: 2008-06-18 11:13

Re: 5.4 as stable

Post by mns17 » 2013-01-21 11:47

Hi, Martin!

Please, look at this post:
http://www.hmailserver.com/forum/viewto ... 10&t=23887

magickboy
New user
New user
Posts: 29
Joined: 2011-09-09 05:22

Re: 5.4 as stable

Post by magickboy » 2013-01-25 04:48

It's great, I'm using 5.3 over 2 years. It's time for me to update both hardware and software of my email server.

simonjshaw
New user
New user
Posts: 12
Joined: 2013-02-06 13:09

Re: 5.4 as stable

Post by simonjshaw » 2013-02-06 13:19

Please, please, make a new stable official release available soon.
It has been a long, long time since 5.3, and there are 5.4 features I would like to use live.
But I don't want to use RC software on a live server.

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: 5.4 as stable

Post by ^DooM^ » 2013-02-06 13:57

simonjshaw wrote:Please, please, make a new stable official release available soon.
It has been a long, long time since 5.3, and there are 5.4 features I would like to use live.
But I don't want to use RC software on a live server.
The RC software would be the exact same software that would be put up as stable. I really don't see why people have such a huge problem with using software if it has a beta label on it in a live environment especially one that has been throughly tested and used by hundreds of people and reported to be better than the stable version. All the Beta tag stands for is new and untested, it doesn't mean it's broken and is going to trash your system. Gmail was tagged as beta for years and yet people had no problems using that.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

simonjshaw
New user
New user
Posts: 12
Joined: 2013-02-06 13:09

Re: 5.4 as stable

Post by simonjshaw » 2013-02-06 15:44

No point in calling it RC if it is definitely not going to be modified.
But I take the point that if this RC has been out there for a long time, subject to nothing on the snagging list it is likely to be quite stable.
In which case why isn't it now released as such? Which is what I asked...

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: 5.4 as stable

Post by ^DooM^ » 2013-02-06 15:59

Your guess is as good as mine in that regard. Speak to martin, he's the only one that can release official builds and we have been asking for a stable build release of 5.4 for nearly 2 years.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

prisma
Senior user
Senior user
Posts: 310
Joined: 2010-07-09 13:16

Re: 5.4 as stable

Post by prisma » 2013-02-08 18:23

I'd really appreciate 5.4 becoming stable. And don't understand me wrong, I'm really thankful for everybody's work within this project. And yes, I know it is freeware.

But there are some really critical or high rated problems reported, that I would expect fixed in a stable version. Particularly if nearly nothing has changed within 2 years. If you'd ask me for my fair-minded opinion.

Just 2 examples:
http://www.hmailserver.com/devnet/?page ... ssueid=397
http://www.hmailserver.com/devnet/?page ... ssueid=326

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: 5.4 as stable

Post by martin » 2013-02-08 18:34

prisma,

I've not been able to reproduce either of the two issues you linked to (which you may have read in the threads). If you have info on how to reproduce the issue, it will be fixed in a few days. For example, hMailServer has built-in protection which prevents it from connecting to itself. When that issue was reported, I confirmed that this protection still appeared to work properly. Not saying that the problem isn't there, just that it's hard to resolve if no-one knows how to reproduce it. I doubt any of those two issues are "new" in the sense that they does not exist in previous versions.

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: 5.4 as stable

Post by Bill48105 » 2013-02-09 00:52

It's impossible to please everyone and impossible to fix bugs that can't be reproduced or if the reporter can't help track them down. Such bugs (if they truly are bugs) must be as rare as getting hit by an asteroid or we'd hear more complaints & spend more time fixing otherwise it's a waste of time. That being said I'd like to work towards a release even if it's not perfect at least it's the best we have at the moment. ;) I need to get some of the fixes I got local committed to SVN then as far as I'm concerned release it already. I'm prepared to continue releasing experimentals as needed as I've been doing for the past 2 years to address things that might crop up but we certainly shouldn't let obscure issues 1 or 2 people are having stop us from getting a release out already.
Thx
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

prisma
Senior user
Senior user
Posts: 310
Joined: 2010-07-09 13:16

Re: 5.4 as stable

Post by prisma » 2013-02-11 16:22

Bill,

the high or critical bug reports concerned more than 2 people. And I'm sure a solution (how to reproduce it) could be found. Worst case is debugging remotely. But anyway, I'm working in development as a professional. Therefore I know not every bug can be fixed. In that case, we set the priority down or close the bug report completely marked as 'unrepeatable'. So, go for it!! Do the release.

thx
Gregor

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: 5.4 as stable

Post by Bill48105 » 2013-02-11 18:05

prisma wrote:Bill,

the high or critical bug reports concerned more than 2 people. And I'm sure a solution (how to reproduce it) could be found. Worst case is debugging remotely. But anyway, I'm working in development as a professional. Therefore I know not every bug can be fixed. In that case, we set the priority down or close the bug report completely marked as 'unrepeatable'. So, go for it!! Do the release.

thx
Gregor
I've seen the posts on both the 127.0.0.1 thing & the message UID thing (you can see my replies trying to help & find the cause) but I've not read the issue reports until now. (I do not get alerts when people post UNLESS THEY REPLY TO THE THREAD which no one ever does.) I've spent umpteen hours tracking both down & it's a big waste of time. No one who has run into either follows thru with helping & as I said it's been very few people who have run into them. The loop thing is due to rare unique configuration. No one with 1 LAN IP & default 0.0.0.0 for all hmail services will ever see that which is 99.99999999% of the people out there. I was able to reproduce that one but it requires such an obscure setup that no one should be using that it's more about educating people on how not to run a mail server than fixing a bug. As far as the UID thing, i've been able to reproduce that one as well but it's quite rare to see it in wild. I believe to fix it we'd need to implement mailbox locking for IMAP & SMTP too which obviously would need to be non-blocking to work & be RFC compliant. In my testing (which again was ridiculous amount of hours to even get it to happen once) it happens when the mailbox is changed mid-IMAP session. In the case of when it happened to me ONCE during a test. an email arrived via SMTP while Outlook was checking email. The new email delivered during Outlook update caused message ID list to change so Outlook bitched that it was different than at beginning of session. The real question is why is it only Outlook that has issues with it? I've yet to see any reports from other email clients so it's Outlook specific. Given the fact it's only outlook & quite rare to happen it's not only tough to track down but far from critical. Speaking of the issue trackers & forum posts, if you look at both you'll see they are all left with requests from martin or myself for more info & help but NONE HAVE BEEN REPLIED TO by the OP or anyone else having the issue for over a month.. That speaks volumes not only in how non-critical these issues are but also supports what I said about these issues not being very common to warrant spending too much time on them especially if people who are having them can't be bothered to help out. I for one don't believe 5.4 release should be postponed for those particular issues for sure.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

prisma
Senior user
Senior user
Posts: 310
Joined: 2010-07-09 13:16

Re: 5.4 as stable

Post by prisma » 2013-02-12 15:25

Calm down man. But thanks for your analysis. It's also my experience that everybody wants to be helped but noone has time to get help. But with one thing your wrong:
Bill48105 wrote:Given the fact it's only outlook & quite rare to happen it's not only tough to track down but far from critical.l
100.00% outlook compliance is the highest criterion for every enterprise mailserver. This bug was the reason for migration of several clients to thunderbird. Because I wanted hMailserver, because I think it's a good product. And I had luck to be in the position to decide about a migration. Others do not have that luck.

If you want, I try to reproduce the outlook bug. No problem.

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: 5.4 as stable

Post by Bill48105 » 2013-02-12 18:07

prisma wrote:Calm down man. But thanks for your analysis. It's also my experience that everybody wants to be helped but noone has time to get help. But with one thing your wrong:
Bill48105 wrote:Given the fact it's only outlook & quite rare to happen it's not only tough to track down but far from critical.l
100.00% outlook compliance is the highest criterion for every enterprise mailserver. This bug was the reason for migration of several clients to thunderbird. Because I wanted hMailserver, because I think it's a good product. And I had luck to be in the position to decide about a migration. Others do not have that luck.

If you want, I try to reproduce the outlook bug. No problem.
I am calm but thanks for the concern.

RFC compliance is #1 concern NOT appeasing Microsoft & their idea of "standards". Why does it have to be an hmail bug if it's only Outlook that has the problem? Why do you not pester MS about fixing Outlook? Surely you understand the point..

Sure if you want to spend the time on it that'd be helpful. Ideally we'd get a way to reproduce it reliably (as in every time we try & not random during normal use over weeks or months) but seeing log snippets around the time it happens would be helpful too. Based on the ONE TIME I've been able to get it to happen in testing it was when a message was delivered to the box mid IMAP session. But even knowing that I have been unable to reproduce even if I TRY to make it happen deliverying messages during sessions so it's not just that there's more missing. Maybe if we see enough sessions where it happens we can see a pattern.
Thx
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

User avatar
A1200
New user
New user
Posts: 9
Joined: 2010-06-08 00:51
Location: Lowestoft, UK
Contact:

Re: 5.4 as stable

Post by A1200 » 2013-02-21 13:50

I have been running the bleeding edge version of 5.4 for quite some time on a production server with zero issues. I would stand behind calling 5.4 stable and not beta.

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: 5.4 as stable

Post by Bill48105 » 2013-02-21 19:11

BTW I think the voting says a lot regarding 5.4 stability especially considering I posted than back when 5.4 was still alpha (thus so many people voting for the last one):
http://www.hmailserver.com/forum/viewto ... 10&t=20581
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

prisma
Senior user
Senior user
Posts: 310
Joined: 2010-07-09 13:16

Re: 5.4 as stable

Post by prisma » 2013-02-26 22:00

I have to upgrade to 5.4 and run the data synchronizer this week, because we'll change some infrastructural things, including the file positions. Will there be any changes within the next 2 days to wait for? Or is it OK to upgrade tomorrow? Any recommendations for the synchronization?

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: 5.4 as stable

Post by Bill48105 » 2013-02-27 07:30

prisma wrote:I have to upgrade to 5.4 and run the data synchronizer this week, because we'll change some infrastructural things, including the file positions. Will there be any changes within the next 2 days to wait for? Or is it OK to upgrade tomorrow? Any recommendations for the synchronization?
hardly the place to ask this prisma as the thread is about feedback regarding 5.4 going stable release.. I highly doubt anything will happen with 5.4 in next few days but even if it did I doubt there'd be much changed to worry about as about everything has already been released in official betas or my experimentals. We're trying to minimize changes to reduce risk of introducing any show stopper bugs before release then we'll be looking at more extensive updates as time permits.

Btw the only real reason to run data sync tool is if you think the database & data tree are out of sync. Sure it's been recommended to run it for the full path errors some people get after upgrading to 5.4 but fixing the paths with sql update query has been more effective. But generally most people just upgrade & 5.4 fixing the paths & there is no need to do anything. The people who have run into issues with paths have either monkeyed with the paths manually or with scripts/tools or somehow full long paths ended up short full paths & the auto conversion during upgrade doesn't work right. But for most people you backup & upgrade & you're done.
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

prisma
Senior user
Senior user
Posts: 310
Joined: 2010-07-09 13:16

Re: 5.4 as stable

Post by prisma » 2013-03-01 14:48

Bill48105 wrote:hardly the place to ask this prisma as the thread is about feedback regarding 5.4 going stable release...
I thought to ask whether something will happen (further fixes, going stable...) until today had to do with "5.4 as stable". But my question within the secondary part was misplaced, I'm sorry.

BUT: regarding your answer to this secondary part: THANK YOU VERY MUCH, you saved me hours. I performed an update with "SQL Server Management Studio" within seconds. So I was able to move the files instantly. Data synchronizer would have been totally oversized.

5.4 works like a charm, thumbs up for going stable!!

Thierry
New user
New user
Posts: 4
Joined: 2010-01-15 21:06

Re: 5.4 as stable

Post by Thierry » 2013-03-05 15:43

If only to prove it's still alive. Go for it !

User avatar
brother.gabriel
Normal user
Normal user
Posts: 139
Joined: 2012-03-29 17:25
Location: Kansas City
Contact:

Re: 5.4 as stable

Post by brother.gabriel » 2013-03-05 18:52

Is this really still in the works? Who out there that uses hMailServer doesn't use version 5.x, anyway? I can't believe its still considered beta after all these years.

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: 5.4 as stable

Post by Bill48105 » 2013-03-05 18:57

brother.gabriel wrote:Is this really still in the works? Who out there that uses hMailServer doesn't use version 5.x, anyway? I can't believe its still considered beta after all these years.
The post is about 5.4. There are many people on older versions. We still hear of people on 4.x but mainly 5.3.x
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

User avatar
bagu
Normal user
Normal user
Posts: 211
Joined: 2005-06-17 03:08
Location: France
Contact:

Re: 5.4 as stable

Post by bagu » 2013-03-26 22:22

So, when do you think to set the latest 5.4 as stable ?
hMailServer 5.6.8 With SpamAssassin 3.4.2

Matthew Bonner
New user
New user
Posts: 8
Joined: 2013-04-05 19:40
Location: Suffolk, England

Re: 5.4 as stable

Post by Matthew Bonner » 2013-04-05 20:12

I've had an issue where the UID corrupts, I'm not sure what the point of it really is but I've fixed the issue by writing a script in PHP that recreates all of the UID's.

I know this isn't the place to discuss bugs but if the UID breaks it would be nice if a script could be ran to reset them all before marking the 5.4 as a stable version as I don't think people want to fix this themselves. I have a script I can modify for general purpose use as currently the script has to be ran from a terminal in Linux which has network access to the windows server.

I've also had an issue with 5.3 where upon heavy usage (GB's of data being transferring e-mails from a local mailbox (which used POP3) to a mailbox on the server (using IMAP)) something happens to the database and all data is lost. I'm not sure if this is a MySQL database issue or a hMailServer issue but to fix the issue I've had to write a script in the past to rebuild the full database based on the e-mails stored on the file system. The downside to this is I couldn't rebuild the folder structure from the e-mails so they all ended up in the inbox.

So once an e-mail is moved to a folder, as a feature request before making 5.4 stable, it would be good if you could provide some sort of facility so that the folders can be restored if in the event a full rebuild of the database is in order based on what is on the file system. There are two ways I can think of in order to provide a solution, the first is for the file system folder structure to match the IMAP folder structure (my preference) and the second is to add a header to the incoming e-mails to mark which folder the e-mail is stored in which I'm not a fan of.

That way, if you have a backup which has failed to restore (like in my case), because the system had ran out of disk space so the backup failed due to the amount of e-mails being transferred, then you can still restore the full e-mail system.

I know having to do such a thing will be a rare case scenario, but 5.3 is stable and I've had these issues, so there is no way of knowing really if 5.4 will have the same issues even after years of testing, and I know this applies to any version, but people seem generally happy with 5.3 at the moment, so making 5.4 fully stable in terms of being able to recover from a disaster, (ie true high availability) would be welcomed.

Either that or risk 5.4 as stable version, and look at making 5.5 true high availability.

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: 5.4 as stable

Post by Bill48105 » 2013-04-05 22:29

Matthew Bonner wrote:I've had an issue where the UID corrupts, I'm not sure what the point of it really is but I've fixed the issue by writing a script in PHP that recreates all of the UID's.

I know this isn't the place to discuss bugs but if the UID breaks it would be nice if a script could be ran to reset them all before marking the 5.4 as a stable version as I don't think people want to fix this themselves. I have a script I can modify for general purpose use as currently the script has to be ran from a terminal in Linux which has network access to the windows server.

I've also had an issue with 5.3 where upon heavy usage (GB's of data being transferring e-mails from a local mailbox (which used POP3) to a mailbox on the server (using IMAP)) something happens to the database and all data is lost. I'm not sure if this is a MySQL database issue or a hMailServer issue but to fix the issue I've had to write a script in the past to rebuild the full database based on the e-mails stored on the file system. The downside to this is I couldn't rebuild the folder structure from the e-mails so they all ended up in the inbox.

So once an e-mail is moved to a folder, as a feature request before making 5.4 stable, it would be good if you could provide some sort of facility so that the folders can be restored if in the event a full rebuild of the database is in order based on what is on the file system. There are two ways I can think of in order to provide a solution, the first is for the file system folder structure to match the IMAP folder structure (my preference) and the second is to add a header to the incoming e-mails to mark which folder the e-mail is stored in which I'm not a fan of.

That way, if you have a backup which has failed to restore (like in my case), because the system had ran out of disk space so the backup failed due to the amount of e-mails being transferred, then you can still restore the full e-mail system.

I know having to do such a thing will be a rare case scenario, but 5.3 is stable and I've had these issues, so there is no way of knowing really if 5.4 will have the same issues even after years of testing, and I know this applies to any version, but people seem generally happy with 5.3 at the moment, so making 5.4 fully stable in terms of being able to recover from a disaster, (ie true high availability) would be welcomed.

Either that or risk 5.4 as stable version, and look at making 5.5 true high availability.
I'd be interested in seeing the script & understand how came about making the script in the 1st place, as in why you did what you did to think it'd fix the UID problem. Perhaps it can shed some light on why the problem exists for some people & not others & a true fix.

Regarding your crash, did you not have a backup of the database? Obviously backing up the database is as important as backing up the EML files & better yet entire hmail tree because hmailserver.ini & events are important too. That's why someone who had at least a daily backup/dump of the database could restore the most recent then run datadirsync & worst case only messages not in inbox since last backup get restored to inbox.. You can't really fault hmail entirely if you ran out of disk space, about any program can have issues or data loss if you run the well dry. ;) That being said I have talked about hmail checking free space but consensus was that should be a Windows or general practice task not specific to hmail. IOW you should monitor free space on your server in general & not each program.

Regarding your suggestion, I hear you in that I made a similar suggestion when I 1st started using hmail. The problem is the amount of work it'd take to implement and/or the amount of overheard it'd add. For example, adding the folder name in a header was one of my suggestions as it seemed it'd be easy to do & low risk of problems. Then when I looked at the source I realized to add the header requires a copy of the email file which is a lot of load especially if a user moved 1000 message from Inbox to another folder. It'd cripple the server. I thought of the sub folder thing and for pre 5.4 it would have been a very simple thing to do but as of 5.4 full paths are no longer stored in the database since they are rebuilt on-the-fly. So putting in sub folders now would require putting paths back in the database which while not a huge deal feels like a step backward. Granted entire path wouldn't be needed but still a path and a lot of changes were made to not have full paths anymore. Then we'd also have to worry about local languages & charsets to match the IMAP folder names or ensure encoded safely. I had suggested possibly making a 2nd file such as .HDR or such named along with .EML where headers could be saved vs making copies of the entire email which the folder could then be stored in there. The problem is then you risk having 2x as many files and Windows doesn't like as many files as there can be now let alone potentially doubling them. I had also thought about keeping a data or log file with folder names to match filenames but then I realized it was essentially the same as a sqldump so was back at the start where the mail admin needs to be doing proper backups/dumps of the database & then it wouldn't be needed. ;) The best potential method I came up with was pre-pending or appending the folder name as part of the filename for anything except inbox. I sort of do that now with how hmail archiving was coded. {E0702896-EBDB-4696-9CDA-6E471879F976}.eml means delivered (so inbox) & Sent-{073CF79D-7C0B-473B-8DAF-5F75F6EBE1B3}.eml means the user sent the email so it was outgoing. In doing that it adds trivial amount of server work load, no extra files or file space etc so it was the best I came up with. The catch is still risk of encoding issues with non-Latin languages and fact that hmail currently relies on all filenames starting with { as of 5.4. Granted we could name them like {073CF79D-7C0B-473B-8DAF-5F75F6EBE1B3}-Sent.eml but that'd be more complicated. I also considered doing like {Sent}{073CF79D-7C0B-473B-8DAF-5F75F6EBE1B3}.eml which solves the starting with { problem but complicates renaming during folder moves. So maybe {Sent-073CF79D-7C0B-473B-8DAF-5F75F6EBE1B3}.eml or even {Sent}073CF79D-7C0B-473B-8DAF-5F75F6EBE1B3.eml or such. Key is to not break anything and also make for an efficient means to rename as needed.

But in the end, long story short, setup monitoring on your server and do proper backups/dumps solves both. :D

But yeah the UID thing has been a thorn for awhile but tough to fix something we can duplicate here. You're right this thread probably isn't the best place to go over this so if you would create a new thread where we can discuss it or PM me or stop into IRC that'd be greatly appreciated.
Thx
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Matthew Bonner
New user
New user
Posts: 8
Joined: 2013-04-05 19:40
Location: Suffolk, England

Re: 5.4 as stable

Post by Matthew Bonner » 2013-04-07 16:09

The script (attached) came about when I tried to rebuild the database from the filesystem. As I was working on a live system I wanted to get it back as quick as possible so I didn't spend time setting up a new database, adding e-mails, and working out what each field was supposed to be, as I had already got the e-mail server back online so we could receive e-mails (which was considered the most important factor). I'll come back to the script in a moment but first a short story of how I came about having to write it...

Before I joined the company which is around a year ago now, an e-mail server was set up and had no IMAP support. To provide IMAP support I set up a new hMailServer instance on a different server, ready to move everyone across. I thought I was in luck when I noticed that the very next day everyone would be at work and contactable which is rare (as we often have people out to see clients or on holiday) so I decided to fast track moving mail servers. I changed the DNS that night and in the morning sent out instructions on how to change to the new server.

I hadn't got around to setting up the backups yet as I was going to set up a MySQL replication backup system and a partial file system backup rather than using the hMailServer backup system which I hadn't done yet as the server was new and I had fast tracked the move.

As we use cloud instances, and we normally go with the lowest spec we can and then increase the capacity, the disk space was very low, something like 80GB and Windows had already used around 50GB. I didn't anticipate that one of the users would have such a large amount of mail, and I had no real way of working out just how much mail there was to be moved as we didn't use IMAP before so all mailbox sizes were around 0mb.

When everybody started dragging their e-mails to the new mail account which connected to the new server (using Outlook), the disk soon ran out of space. I'm not sure if you know but low/no disk space is always a problem with MySQL, the data starts to corrupt which is why I guess the database file was deleted from the disk. As people had moved their e-mails to the IMAP server, the only backup we had was the e-mails stored on the file system thanks to the way hMailServer works which was a life saver to me. This meant I had no choice other than to write a script that rebuilt the database based on what was on the file system.

I've updated the script so it can be ran on a Windows system and can connect to a MySQL database on any server where an outside connection is permitted.

I agree with you that disk space should be monitored, and that this isn't a job for hMailServer. I normally set up the Windows System Resource Manager to do this for me which again hadn't been set up. I also agree in some sense that hMailServer should only really track folders in the database, and based on your comments you've already put some thought into it and again I agree with your outcomes, but I imagine there are other avenues to explore.

The company I work for works with various banks amongst other companies, in particular the biggest bank in the world, and as I'm the person who sits in the meetings, speaks to the various teams, and leads the development of the software we build for the banks, I know this particular bank always talks about true high availability, which they consider different to high availability in the respect that even if it doesn't make sense to do so, they expect as many backup systems as possible, even if it means writing the same data twice to two different databases in two different countries when database replication is already set up, with incremental backups being written with every change made to the databases.

So when it comes to enterprise software, to reach the bigger audience and put Exchange in it's place, you could really compete if you could figure out a way to ensure true high availability, and maybe if a version 6 comes out you could have a free version and a paid enterprise version which has true high availability (which would then only be used on more powerful systems) as I think there is a market for this and it could help fund future versions of hMailServer.

Moving on to the UID, firstly I'd like to say that I am aware of some of the factors that make up the UID as you can tell by looking at the attached script. The problem with the UID's isn't specifically caused by hMailServer, the problem is more so related to MySQL only. I guess you will find those who use MS SQL don't have issues with the UID and the reason why is because some versions of MySQL cause an integrity constraint violation due to a bug with row level locking. This bug has been fixed in more recent versions but was present in a large number of versions including those within the last 6 months. In human terms, this means it is possible to write the same UID to two rows at the same time, and because Outlook is multi-threading it can perform more than one task at the same time which is why you generally see a problem with Outlook opposed to other mail clients which are single-threaded as they are unable to make multiple requests at the same time. If I'm not mistaken hMailServer keeps track of UID's in memory (based on testing, not looked at the source code much as it is for an older version), so in theory the UID should only be used once and then incremented, but if multiple operations are taking place at the same time the same UID could be used more than once (feel free to correct me if mistaken) so maybe a system is required to reserve UID's, UID locking or something, so they aren't used more than once if multiple operations are taking place at the same time.

So in a nutshell, what you end up with is hMailServer complaining that multiple rows have the same UID, and in some cases hMailServer complaining that one of the UID's in memory has already been used. Another thing I've observed, which is obvious, is that only the account with the UID corruption is affected when UID duplication corruption occurs. I've worked around this issue by writing a script that updates the UID's for the broken account, and then we perform a manual restart on the service once the script has ran. We can't tell people to not use Outlook, and I wouldn't want to anyway, and blaming Outlook isn't going to solve anything. You might find it helpful to get those with small databases, who have this issue to send you their databases when this problem occurs if they are willing to so that you can take a look at the data. To those who have had the issue may also find a simple restart of the service fixes the issue to as the UID's in memory will then update.

I'd also ask the question of whether any scripts run when events occur as they could cause an issue, and whether any bespoke scripts are connecting directly to the database and making changes, as I'm fairly certain hMailServer isn't the root cause of the problem here in pretty much all cases.

When I'm in the office tomorrow I'll dig out the script that resets all of the UID's and attach it to a post.
Attachments
msf.zip
Script to rebuild database based on filesystem when database corrupts
(3.16 KiB) Downloaded 243 times

Matthew Bonner
New user
New user
Posts: 8
Joined: 2013-04-05 19:40
Location: Suffolk, England

Re: 5.4 as stable

Post by Matthew Bonner » 2013-04-07 18:04

I would like to add that I've just looked back at the script and spotted a few issues already, so use with caution, the script was intended as a quick fix and I can imagine at some point if you come to use it don't just run it, take a look at it first and spend some time understanding what it does and modify it accordingly.

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: 5.4 as stable

Post by Bill48105 » 2013-04-07 18:07

Matthew Bonner wrote:I would like to add that I've just looked back at the script and spotted a few issues already, so use with caution, the script was intended as a quick fix and I can imagine at some point if you come to use it don't just run it, take a look at it first and spend some time understanding what it does and modify it accordingly.
Thx for posting the script. A quick glance makes it appear the 'fix' is face that the entire hm_messages database is re-written which makes me wonder if a user doing a backup then restore would have the same result. We might need to post a rebuild tool if we can confirm it fixes the problem. Obviously it'd be nice to stop the problem from happening in 1st place but at least have a fix ready.
Thx
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Matthew Bonner
New user
New user
Posts: 8
Joined: 2013-04-05 19:40
Location: Suffolk, England

Re: 5.4 as stable

Post by Matthew Bonner » 2013-04-07 18:19

Sorry my previous comment is a quite a mammoth to read, but in there I mentioned about posting a second script tomorrow when I'm in the office. The second script is a lot simpler and just fixes the UID's, the script that you have looked at is the one I used when the database corrupt and I didn't have a backup. Sorry if I didn't make myself clear.

Adding a rebuild tool would be a good option in my opinion, or even a rebuild script so people can modify it if need be.

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: 5.4 as stable

Post by Bill48105 » 2013-04-07 19:34

Matthew Bonner wrote:Sorry my previous comment is a quite a mammoth to read, but in there I mentioned about posting a second script tomorrow when I'm in the office. The second script is a lot simpler and just fixes the UID's, the script that you have looked at is the one I used when the database corrupt and I didn't have a backup. Sorry if I didn't make myself clear.

Adding a rebuild tool would be a good option in my opinion, or even a rebuild script so people can modify it if need be.
Yeah honestly I skimmed your post & jumped right into looking at the script. :D Cool thx yeah I'd be interested to see the simpler script. The old one might still be useful for somebody though.
Thx
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

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

Re: 5.4 as stable

Post by mattg » 2013-04-08 01:01

I read it all, and this is the bit that caught my eye
Matthew Bonner wrote:Moving on to the UID, firstly I'd like to say that I am aware of some of the factors that make up the UID as you can tell by looking at the attached script. The problem with the UID's isn't specifically caused by hMailServer, the problem is more so related to MySQL only. I guess you will find those who use MS SQL don't have issues with the UID and the reason why is because some versions of MySQL cause an integrity constraint violation due to a bug with row level locking.
That is an interesting theory. I use MySQL almost exclusively.
http://www.hmailserver.com/devnet/?page ... ssueid=326
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: 5.4 as stable

Post by Bill48105 » 2013-04-08 04:52

mattg wrote:I read it all, and this is the bit that caught my eye
Matthew Bonner wrote:Moving on to the UID, firstly I'd like to say that I am aware of some of the factors that make up the UID as you can tell by looking at the attached script. The problem with the UID's isn't specifically caused by hMailServer, the problem is more so related to MySQL only. I guess you will find those who use MS SQL don't have issues with the UID and the reason why is because some versions of MySQL cause an integrity constraint violation due to a bug with row level locking.
That is an interesting theory. I use MySQL almost exclusively.
http://www.hmailserver.com/devnet/?page ... ssueid=326
Interesting but we'd need to find a way to test & confirm to know how to move forward. In meantime having a utility to fix it, even temporarily, is good to have.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: 5.4 as stable

Post by Bill48105 » 2013-04-13 07:21

Matthew Bonner wrote:Sorry my previous comment is a quite a mammoth to read, but in there I mentioned about posting a second script tomorrow when I'm in the office. The second script is a lot simpler and just fixes the UID's, the script that you have looked at is the one I used when the database corrupt and I didn't have a backup. Sorry if I didn't make myself clear.

Adding a rebuild tool would be a good option in my opinion, or even a rebuild script so people can modify it if need be.
Hey Mattew, did you get a chance to get the script or tell us what process is used to fix the UID's?
Thx
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Post Reply