POP locks occur normally because there has been a timeout while a user was trying to receive mail.

When a user clicks Send and Receive, the linux server will first make a copy of their mailbox, and then the user will start downloading the mail from that copy. So if there is an interruption during this copy process, you will be left with 2 portions of a mailbox. This is called a POP lock.

The main cause for this, is if the user has been away and their mailbox has become very large. See  Answer 4.2  for how to delete mail.

A pop lock will look like this.

[root@server mail]# ls -la
total 3732
drwxrwxr-x   2 root      mail    4096 Jan  8 13:46 .
drwxr-xr-x  18 root      root    4096 Sep  7 16:04 ..
-rw-rw----   1 accounts  mail       299388478 Sep  7 17:02 accounts
-rw-rw----   1 accounts  mail       993847 Sep  7 17:02 .accounts.pop

Firstly, we can see from the above example that the mailbox is very big, 299MB. This is not ideal for POP3.  You can use MUTT to edit the file and delete any large or unwanted emails.
Then we have to get rid of the   .pop file, to allow us to collect the rest of our mail. Remember that there file   .accounts.pop   has some emails in it, so you cannot just delete it. You have to rename it.

mv  .accounts.pop   accounts.bck

This renames the file to  accounts.bck. You can then try receive the mail again by clicking send and receive.  If it works fine, then the mailbox should be cleared.

[root@server mail]# ls -la
total 3732
drwxrwxr-x   2 root      mail    4096 Jan  8 13:46 .
drwxr-xr-x  18 root      root    4096 Sep  7 16:04 ..
-rw-rw----   1 accounts  mail       0 Sep  7 17:02 accounts
-rw-rw----   1 accounts  mail       993847 Sep  7 17:02 accounts.bck

So you have now collected the mail which was in  the     accounts    file. We now need to get the mail from the  accounts.bck  file.


cat   accounts.bck  >> accounts

This will append the contents of the  accounts.bck file, to the end of the accounts mailbox. You will then need to click send and receive, and collect the rest of the mail.



























Copyright, eNet Solutions 2006