POP3 Server error


-ERR Can't get lock. Mailbox in use


The error can be recreated by the following dialog.

+OK POP3 thalia v2003.83 server ready
user joe
+OK User name accepted, password please
pass TEST123
-ERR Can't get lock. Mailbox in use

Next, we are going to use truss to provide a system trace.

#truss /usr/local/sbin/ipop3d
execve("/usr/local/sbin/ipop3d", 0xFFBFFDF4, 0xFFBFFDFC)  argc = 1
... snipped

umask(0)                                        = 022
lstat("/tmp/.1d80004.1407", 0xFFBFDDF0)         Err#2 ENOENT
open("/tmp/.1d80004.1407", O_RDWR|O_CREAT|O_EXCL, 0666) Err#13 EACCES
fstat(-1, 0xFFBFCC50)                           Err#9 EBADF

The previous lines tells us that the pop3 daemon can't create a temporary file under the directory /tmp.
... snipped
-ERR Can't get lock.  Mailbox in use
write(1, " - E R R   C a n ' t   g".., 38)      = 38

When I checked the permission of the /tmp directory, I got this:

#ls -ld /tmp
drwxr-xr-x 15 root root 683 Dec 29 13:44 /tmp

A fix to this problem, is to allow world write with the sticky bit on the /tmp directory.

#chmod 1777 /tmp
#ls -ld /tmp
drwxrwxrwt 15 root root 683 Dec 29 13:56 /tmp