mail box already look

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
cominor
New user
New user
Posts: 24
Joined: 2004-07-12 23:30

mail box already look

Post by cominor » 2004-07-21 18:44

hi, i had a problem with one account wich says it was blocked,
the error in the client says something about "mail box already lock"

i dont know wath happend there, i have to restart the server to unlock that, but i didnt know what happend there. the cuestion is if there is a better option to unlock the account and why is this happend?

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

Post by martin » 2004-07-21 18:47

Which version are you using?

cominor
New user
New user
Posts: 24
Joined: 2004-07-12 23:30

my version

Post by cominor » 2004-07-21 19:27

my version is 3.2.0

cominor
New user
New user
Posts: 24
Joined: 2004-07-12 23:30

version

Post by cominor » 2004-07-21 19:42

3.2.1 build 29 sorry,
in the about of hmailserver says 3.2.0

but the version that i downloaded and installed is 3.2.1 build 29.

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

Post by martin » 2004-07-21 19:52

When you got the message, how long did you wait before you restarted the server?

cominor
New user
New user
Posts: 24
Joined: 2004-07-12 23:30

time

Post by cominor » 2004-07-21 20:08

i have a user in the other side of the line, and she told me, she has that problem. in the client appears the window asking for he user and password, the same happend here in my pc, i configure all the parameters with the usser account, and when i try to send mails, it says the mail box is already lock, and, i confirm with the user that she was not in the outlook in that moment, and to be more sure, i change the user password, and try to check this again and the error was the same.
even now, while im writing this other user reportme the same behavior.

i think i have to restart the server again.
i dont see a option to restart only the hmail server.

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

Post by martin » 2004-07-21 20:12

If a POP3 client disconnects improperly (not executing a QUIT when disconnecting), the mailbox will remain locked. It should however unlock automatically after a 2 minutes timeout when the TCP/IP connection is dropped.

cominor
New user
New user
Posts: 24
Joined: 2004-07-12 23:30

time.!

Post by cominor » 2004-07-21 20:34

ok, is a good answer, i supose it was the problem. thanks

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

Post by martin » 2004-07-21 20:39

OK. So it may be so that you waited less than 2 minutes before restarting the server?

(According to the POP3 standard, only one client can access a mail box at one time. If a POP3 client disconnects from hMailServer, without saying to hMailServer "I'm disconnecting now", hMailServer can't know for sure wether the client is disconnected. And if hMailServer doesn't know for sure that the client has disconnected it can't unlock the mailbox. But if hMailServer hasn't received any data for 2 minutes, it closes the connection. And if hMailServer closes the connection, the server knows that the client has disconnected and can then unlock the mailbox.)

theTerran
Senior user
Senior user
Posts: 287
Joined: 2004-06-22 18:07
Location: Florida

Post by theTerran » 2004-07-24 00:49

i think i have to restart the server again.
i dont see a option to restart only the hmail server.
Hopefully you're not rebooting the machine to stop and start hMailServer! But that's what it sounds like... If so, you can do this instead. Much friendlier. :lol:

Open hMailServer Administrator. On the left, click "Services". You will see the service name (hMailServer), its current status (Running or Stopped), and an action button that says either "Start" or "Stop". Use it when needed.

Image

If you knew that already, sorry for the "hMailServer for Dummies" mini-HOWTO...

cominor
New user
New user
Posts: 24
Joined: 2004-07-12 23:30

i still with the problem

Post by cominor » 2004-07-26 19:24

i still receiving reports where the users tell me that, when they want to send or receive mails they are asked for their user and password, and even when the put the right user and password they can send or receive emails.

i still restarting the hmailserver but i dont think this is the apropiate solution to unlock their mail box.

this happend to me since i decide to put the option to require authentication for the smpt.

my users can send and receive mails with no problems, but eventualy they are asked for their user and password.

maybe the option to unlock automaticaly after 2 minutes is not working fine, because even when i wait for 5 minutes it still asking for the user and password, or maybe my problem is other.

in my local users i receive no one report about this problem, they use the local adress for the server 192.168.0.250. but for my external users i have that problem, i dont know if this is relevant or is just a coincidence but i only just want to report this behavior.

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

Post by martin » 2004-07-26 23:17

because even when i wait for 5 minutes it still asking for the user and password
Well, if the dialog pops up after say 30 seconds, it doesn't just disappear after 2 minutes. The user has to press cancel in the dialog and try again two minutes later. Otherwise the dialog will remain on screen forever. So are you sure that the user pressed Cancel in the dialog? Did the user restart the entire mail application?

gglaze
Normal user
Normal user
Posts: 51
Joined: 2004-04-20 15:02

Post by gglaze » 2004-07-28 12:14

According to the POP3 standard, only one client can access a mail box at one time. If a POP3 client disconnects from hMailServer, without saying to hMailServer "I'm disconnecting now", hMailServer can't know for sure wether the client is disconnected. And if hMailServer doesn't know for sure that the client has disconnected it can't unlock the mailbox. But if hMailServer hasn't received any data for 2 minutes, it closes the connection. And if hMailServer closes the connection, the server knows that the client has disconnected and can then unlock the mailbox.

I know the first objective is always to conform to the standards here, but would it be possible to implement a few advanced configuration options to override this behavior? Personally, I wouldn't mind allowing multiple clients to access a mailbox simultaneously.

Also, any possibility ot make this session timeout period configurable? I.e. I might prefer to make my session timeout 5 minutes...

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

Post by martin » 2004-07-28 19:18

Personally, I wouldn't mind allowing multiple clients to access a mailbox simultaneously.
That's only because you don't know what would happen if they do. :-)
The reason POP3 mailboxes are locked is because there's no features in the protocol to support simultaneous access to mailboxes. If two email clients accesses the same POP3 account at the same time, they will behave weirdly. For example, there's a big risk that email will be deleted even though none of the clients has downloaded it.
Example:
- User A connects to mailbox and retrieves a list of 13 messages.
- User B connects to same mailbox and retrieves the list of 13 mesages.
- User A downloads message 1-5
- User B downloads message 1 and delete it.
- User A deletes message 1-5
Now message 1-6 will actually bee deleted even though UserA thinks it has deleted message 1 and UserB thinks it has deleted message 1-5.

There's no way to get around this by changing the server. This is simply how the protocol works so if you introduce simultaenous connections to mailboxes, messages _will_ disappear.
I.e. I might prefer to make my session timeout 5 minutes
Why would you want to change this value?

gglaze
Normal user
Normal user
Posts: 51
Joined: 2004-04-20 15:02

Post by gglaze » 2004-07-28 19:40

Ok, for the simultaneous multiple clients thing, here's my scenario - which happens to actually be a very common scenario for me personally...

I have a machine at work that is constantly getting "read-only" access to my mail as it comes in, mainly for the purpose of keeping me relatively updated on my personal mail while I'm at work. While this client is constantly checking my mail throughout the day, sometimes I access my mail through terminal services to a client I have running at home. This is my permanent "repository" and so this is the client that actually downloads mail. However, I never have this on auto-check, and instead I always control when it is going to download (and delete) mail. Thus, I basically have one or more read-only clients, and then one read/write client. The read/write client always has highest priority, so it doesn't really matter if it disrupts the other (less important) readonly clients, or prevents them from seeing a few messages. I do this sort of download every 2 or 3 days, as my mailbox starts to fill up.

Currently, to avoid problems with this kind of setup, I have to temporarily disable checking from my read-only clients while my read/write client is downloading. It would be nice to not have to disable my readonly clients while I'm waiting for this big download. In fact, it would be *really* nice if the pop server somehow could track the state of the individual clients, to know that the downloading client should get messages N through N', while any messages after N' should be immediately delivered to the readonly clients if they ask for them, even before the read/write client's download is complete. Sometimes I wait so long to download my mail that I have to wait a good half-hour before I can check mail again.

Ok, so probably not the normal situation for most people, and obviously not something the protocol is meant to support, but just to show you that there may actually be valid scenarios for multiple-client access. Just like any resource locking scenario, it should be possible to have a safe locking mechanism for one writer and multiple readers (i.e. a "reader/writer lock").

On the timeout configuration idea - no idea right now, perhaps I might want to experiment with some kind of special custom client that starts up a session and leaves it open for extended periods without communicating.

My approach is to never hardcode anything that could be made configurable.

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

Post by martin » 2004-07-28 20:22

I know that there's several scenarios for multiple client access to the same mailbox. One other more common is that you have a support team that is responsible for reading mail in a mailbox. All members of the team should be able to access the mailbox at the same time all the time. All clients should be notified when new mail appears. That's one of the reasons people created the IMAP protocol.

Have you considered using this instead of POP3?
My approach is to never hardcode anything that could be made configurable.
The more options, the more confusion. Why should a behaviour be configurable if theres never any reason to change it?

User avatar
Bram
Senior user
Senior user
Posts: 417
Joined: 2004-05-24 22:57
Location: The Netherlands
Contact:

Post by Bram » 2004-07-29 07:25

I think the development team should stick on the pop3-protocol specifications. Why make it other then other mailserver just to make it work for one person.

Maybe there is a bug in de lock section, but i never experienced any probems with it. Some times got the 'lock error' but after a retry it always works fine for me!!

gglaze
Normal user
Normal user
Posts: 51
Joined: 2004-04-20 15:02

Post by gglaze » 2004-07-30 11:54

That's one of the reasons people created the IMAP protocol.
Have you considered using this instead of POP3?


will give it a try - been meaning to do that for some time now.

ScottyWH
New user
New user
Posts: 16
Joined: 2004-07-13 17:07

Post by ScottyWH » 2004-08-23 19:35

we have this problem with one external pop3 user also... he even has the problem once he returns to the office... I suspect it is related to the fact that he also has a blackberry wireless device that checks email on this account regularly and it may not be disconnecting properly... imap continues to work, but once the user has a problem asking for his username and password it pretty much does not stop asking for it or allow him to retrieve any mail via pop3 until I restart the hmail services...

hmail 3.2.2 (b30)
win2k
mySQL

ScottyWH
New user
New user
Posts: 16
Joined: 2004-07-13 17:07

Post by ScottyWH » 2004-08-25 15:41

I think that we have figured it out... it seems that when the blackberry device tries to receive a large attachment (one that takes longer than 3 minutes for it to get) it drops the connection to the mail server without sending the "QUIT" signal and therefore leaves the mailbox locked. We need a feature to force POP3 disconnect after 2 minutes or something...

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

Post by martin » 2004-08-25 15:54

It does. hMailServer automatically unlocks mailboxes 2 minutes after the last issued command if a QUIT isn't sent. Have you tried waiting two minutes...?

ScottyWH
New user
New user
Posts: 16
Joined: 2004-07-13 17:07

Post by ScottyWH » 2004-08-27 21:01

I can't say 100% for certain that the blackberry device isn't trying to continually recheck the mailbox in less than every 2 minutes, but I know that the user's PC mail client is not checking it that often and it never unlocks unless I restart the services. Maybe what we need is an option to unlock the mailbox after *ANY* disconnect regardless of whether the quit signal is received or not (without having to wait any length of time... even two minutes)...


Thanks for the help guys. I REALLY like hmailserver... very great software and once we get this issue resolved I imagine it will be perfect for us...

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

Post by martin » 2004-08-28 11:34

hMailServer should _always_ unlock. If a QUIT message is sent, it should unlock immediately. If a quit message is not sent, it should unlock after 2 minutes. Are you sure that the client computer has really disconnected? Some buggy POP3 clients sometimes open 2 connections to the POP3 server even though they should never do so according to the RFC.

I suggest the following:
Next time the message is shown, exit the email client. Than wait 5 minutes and try again. Do not restart the server in this 5 minute interval.

ScottyWH
New user
New user
Posts: 16
Joined: 2004-07-13 17:07

Post by ScottyWH » 2004-08-31 15:31

evidently you are right... it appears now that I have combed through the logs a bit more that the problem was that this user's two client devices were connecting within two minutes of each other occasionally and one of the devices I have no control over how often it checks for new messages (the blackberry device)... however, the difficult part here is that until switching to hmail, this same configuration always worked...

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

Post by martin » 2004-08-31 16:20

According to the POP3 rfc, only one client is allowed to access an mailbox at one time. The protocol dosn't support it, and more than one POP3 client at an given time can give weird behaviours. A lot of POP3 clients screw up if this happen.

What POP3 server were you using before?

ScottyWH
New user
New user
Posts: 16
Joined: 2004-07-13 17:07

Post by ScottyWH » 2004-09-01 17:05

martin wrote:According to the POP3 rfc, only one client is allowed to access an mailbox at one time. The protocol dosn't support it, and more than one POP3 client at an given time can give weird behaviours. A lot of POP3 clients screw up if this happen.

What POP3 server were you using before?

we are not trying to allow both access at the same time, but I would like to force an unlock of the box immediately after an incorrect disconnect... previously the mail was on a hosted linux box... no idea what mail software was in use, but it worked fine :(

Post Reply