Rumor has it that Peter Stuge may have mentioned these words:

I don't know perl and do not want to learn it and hence don't fully
understand everything that the script does, but this strace line
explains the problem;

8910  execve("/var/qmail/bincimap/bin/bincimapd",
["/var/qmail/bincimap/bin/bincimap"...], [/* 4 vars */]) = 0

This is where the checkpassword Perl script executes bincimapd. We
see the path from your run file, and that there are some number of
arguments, and that there are four (4) environment variables being
in the environment being passed to bincimapd, namely the four set by
the script; USER, UID, HOME and SHELL. This isn't enough however, any
existing environment as exported by bincimap-up must be kept and
forwarded to bincimapd, since configuration information is stored
there in encoded form.

Ah, I see. So I just have to have my checkpassword program grab the existing environment and keep them set when it spawns the subprogram (bincimapd). That should be easy enough...


... and it was. I'd originally 'borrowed' a skeleton Perl checkpassword program (found on the qmail.org site) and modified it to suit my needs, and there was one line:

%ENV=();   # which basically wipes out any remaining environment.

All I had to do was comment out that line, and everything works like a champ! Thanks all!

This is the exact same error that showed up a while ago for Jos, who
also used a custom checkpassword program, even if his implementation
was in C.

Ah, then it didn't pop up during my searches of the archives. I'll have to try to do better next time. 'Course, I'd centered my searches around ' error 111 ', so if I gratuitously embed it here subliminally, someone else searching for it may find it... ;-)


On another note, I would suggest that you rewrite the checkpassword
program in C, so that Perl doesn't talk directly to the network.

This may sound funny to most, but I _started_ learning C on my old Tandy Color Computer 2, with a whopping 64K memory and 1 floppy drive. Swapping floppies to compile a program was "less than fun" to end up with a 4K executable I could easily stuff into 100 bytes of assembly.


;^>

Every couple of years I try to allocate enough time to learn it well enough, but then I get sidetracked/busy... so I still don't know it very well. I never seem to have enough 'round tuits' in my toolbox, you know... ;-)

Does vcheckpw (?) from vmailmgr support PGSQL?

When I wrote my program, PGSQL support was minimal, and it didn't support using a hashed directory structure. (My Maildirs look like: /home/vv30/34/userhome/Maildir -- hashed across 67 directories for faster access on e2fs (Reiser wasn't considered 'production' at the time). So at the time vcheckpw didn't work for me; and compared to SpamAssassin, the overhead of a perl checkpassword program is nothing. ;-)


Well, thanks to your help, I now have it working! Thanks a lot, and y'all have a good day, eh?

Laterz,
Roger "Merch" Merchberger

--
Roger "Merch" Merchberger  --  SysAdmin, Iceberg Computers
 _��_                          [EMAIL PROTECTED]
(�||�)  If at first you don't succeed, nuclear warhead
 _)(_   disarmament should *not* be your first career choice.



Reply via email to