Hi. I'm trying to get qpopup and qpop3d to work with Maildir style
directories under Solaris and am running into some baffling problems. I
already have it working fine under Linux but our production servers run
Solaris.
Here's the problem. I can get authorized fine, but qpop3d seems to not
be reading the new mail properly and also is then getting confused about
things and deleting the whole new directory. Here's a sample login
session followed by a truss output.
Connected to xxxx.worldway.net.
Escape character is '^]'.
+OK <[EMAIL PROTECTED]>
user test
+OK
pass ****
+OK
list
+OK
1 512
2 512
3 512
.
The result of the list command seems to be the 3 directories in the
Maildir directory. Here's what truss shows when I have it hooked up to
run qmail-pop3d.
[snipped all the library loading stuff]
chdir("Maildir") = 0
time() = 936305064
open("tmp", O_RDONLY|O_NDELAY) = 3
fcntl(3, F_SETFD, 0x00000001) = 0
fstat(3, 0xEFFFF558) = 0
brk(0x00026F88) = 0
brk(0x00028F88) = 0
getdents(3, 0x00026FA0, 1048) = 28
stat("tmp/", 0xEFFFF640) = 0
stat("tmp/", 0xEFFFF640) = 0
getdents(3, 0x00026FA0, 1048) = 0
close(3) = 0
time() = 936305064
open("new", O_RDONLY|O_NDELAY) = 3
fcntl(3, F_SETFD, 0x00000001) = 0
fstat(3, 0xEFFFF4E8) = 0
getdents(3, 0x00026FA0, 1048) = 148
stat("new/", 0xEFFFF5D8) = 0
stat("new/", 0xEFFFF5D8) = 0
stat("new/6220688.19039.worldway.net", 0xEFFFF5D8) Err#2 ENOENT
stat("new/6221131.20124.worldway.net", 0xEFFFF5D8) Err#2 ENOENT
stat("new/6221131.20129.worldway.net", 0xEFFFF5D8) Err#2 ENOENT
getdents(3, 0x00026FA0, 1048) = 0
close(3) = 0
open("cur", O_RDONLY|O_NDELAY) = 3
fcntl(3, F_SETFD, 0x00000001) = 0
fstat(3, 0xEFFFF4E8) = 0
getdents(3, 0x00026FA0, 1048) = 44
stat("cur/6221131.20129.worldway.net", 0xEFFFF5D8) Err#2 ENOENT
stat("cur/", 0xEFFFF5D8) = 0
stat("cur/,", 0xEFFFF5D8) Err#2 ENOENT
getdents(3, 0x00026FA0, 1048) = 0
close(3) = 0
stat("cur/", 0xEFFFF728) = 0
stat("new/", 0xEFFFF728) = 0
stat("new/", 0xEFFFF728) = 0
poll(0xEFFFD610, 1, 1200000) = 1
+OK
write(1, " + O K \r\n", 6) = 6
poll(0xEFFFD4F0, 1, 1200000) (sleeping...)
poll(0xEFFFD4F0, 1, 1200000) = 0
_exit(0)
Here's a listing of the directories for this test user's Maildir
total 3
drwxrwxrwx 2 testuser 512 Sep 2 22:26 cur
drwxr-xr-x 2 testuser 512 Sep 2 22:24 new
drwxrwxrwx 2 testuser 512 Sep 1 22:25 tmp
cur:
total 0
new:
total 5
-rw-rwxrwx 1 testuser 1003 Sep 1 22:18 936220688.19039.worldway.net
-rw-rwxrwx 1 testuser 1177 Sep 1 22:25 936221131.20124.worldway.net
-rw-rwxrwx 1 testuser 1095 Sep 1 22:25 936221131.20129.worldway.net
tmp:
total 0
Now if you look where it is stat'ing the files in new and cur, you will
see that they have actually been truncated, as the 93 has been chopped
off the filename. All this appears to be taking place inside the
readdir in maildir.c as none of the qmail files call getdents or stat
directly. Also, the message move of the file to cur fails and I get a
bogus :2, directory created inside the cur directory then all the
messages from new get moved there and the new directory gets deleted.
Has anyone seen such bizarre behaviour before? I am completely baffled.
The exact same code run the exact same way works fine under Linux. I've
compiled this using both gcc and Sun's compiler on the Solaris machine
and the results are the same.
--
Artificial Intelligence stands no chance against Natural Stupidity.
GAT d- -p+(--) c++++ l++ u++ t- m--- W--- !v
b+++ e* s-/+ n-(?) h++ f+g+ w+++ y*