On Thu, 11 Jan 101, Mark wrote:

> > My hosting service turned the power off on my server and ever since my
> > pop server has been acting weird. I know vcheckpw is working since it's
> > rejecting bad passwords just fine, but when it authenticates, it sends:
> 
> Does this happen for all accounts?Just some?

all accounts.

> One possibility is database corruption.vchkpw could be segfaulting; that
> would produce the above error message.

in such a case, it would also segfault on the commandline, but it
doesn't.

root@stimpy# printf "user\0pass\0123456\0" | /var/qmail/vpopmail/bin/vchkpw `which id` 
3<&0 ; echo $?

runlevel is reported to be 4 if sorrect, 3 if not authentication. no
segfaut reported.

> 
> Run your POP server with strace for debugging:

doesn't work, qmail-popup's commandline breaks it down, doesn't even
create the /tmp/ logfile.

I know that vchkpw is working because it reports failures and successes
in the syslog, successful authentication complains:

Jan 11 16:35:33 stimpy vpopmail[10998]: vchkpw: setgid() failed

> You didn't say which OS (or whether vchkpw is using MySQL, CDB, etc.), but
> if its Linux, you need to mount the partition with noasync (hmm, or is it
> sync?) to guarantee integrity (for cdb databases).

using CDB on linux with ReiserFS. it's supposed to save the data with
journaling features, I doubt that's the problem.

> 
> A search through the archives for that error message might produce other
> ideas.

I must have missed the archive's link the first time around, searched
now, nothing appropriate I can see. more ideas?

when I try to strace my commandline test, this is the tail:

open("/var/qmail/vpopmail/etc/open-smtp.lock", O_RDWR|O_CREAT|O_TRUNC,0666) = 5
fcntl(5, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
open("/var/qmail/vpopmail/etc/open-smtp", O_RDWR) = 6
open("/var/qmail/vpopmail/etc/open-smtp.tmp", O_RDWR|O_CREAT|O_TRUNC,0666) = 7
fcntl(5, F_SETLK, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
close(5)                                = 0
brk(0x805c000)                          = 0x805c000
time([979224471])                       = 979224471
getpid()                                = 11036
rt_sigaction(SIGPIPE, {0x400f2eec, [], 0x4000000}, {SIG_DFL}, 8) = 0
send(3, "<21>Jan 11 16:47:51 vpopmail[110"..., 61, 0) = 61
rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
_exit(4)                                = ?

I'm not sure I'm reading it right, but does that mean vchkpw has trouble
opening the open-smtp files? I'm sorry, I'm not that much of a
programmer (yet), but non-zero return codes from open() look fishy to
me... although the files' timestamp does change on the disk, so it's
really confusing.

-- 
Ira Abramov    \ "We must be willing to get rid of the life we've planned, 
website:        \ so as to have the life that is waiting for us." 
ira.abramov.org  \                                        -Joseph Campbell




Reply via email to