Solved

Qmail-ldap not working: cannot start qmail-lspawn or it had an error.

Posted on 2008-10-16
8
772 Views
Last Modified: 2013-12-19
I installed qmail-ldap and had it running.  I then needed to move the chroot of bind from /var/named/chroot to /usr/named/chroot.  I copied the directory tree from var to usr, then changed the owner of the /usr/named directory tree to named (chown -R named:named /usr/named/).  After this, there were random files and folders that had had their ownership changed to named:named.  It was very strange!!!  Anyway, I changed most of the permissions back to either original or to root (which may have been the original).  I got most everything started again, except for qmail.  When I start it and check the status, I get the following:

/service/qmail-send: up (pid 26562) 1 seconds
/service/qmail-send/log: up (pid 26563) 1 seconds
/service/qmail-smtpd: up (pid 26536) 3 seconds
/service/qmail-smtpd/log: up (pid 26564) 1 seconds
/service/qmail-pop3d: up (pid 26548) 3 seconds
/service/qmail-pop3d/log: up (pid 26569) 1 seconds

I know this is permissions related, but I don't know what the permissions/owners should be.  Also, when I check maillog, I see many messages that say the following:

Oct 16 14:42:44 jlserver qmail: 1224186164.950482 alert: cannot start qmail-lspawn or it had an error! Check if ~control/ldapserver exists.

control/ldapserver does exist, and I think I have the right owner:
-rw-r--r--  1 root qmail   10 May  6 22:49 ldapserver

I'm pretty sure that I have the shared libraries in place and working, so I have no idea as to what's going on here!!  By the way, I can no longer log on as root, even though I changed the password via sudo passwd root, and it said it worked, but that's another question.  This is crazy and I would say it were a virus, if this was on Windows.  Any help would be appreciated.

John
0
Comment
Question by:jabeavers
  • 5
  • 3
8 Comments
 
LVL 17

Expert Comment

by:owensleftfoot
ID: 22738834
control/ldapserver should be owned by qmail
0
 

Author Comment

by:jabeavers
ID: 22740385
There is no qmail user, there is a qmail group.  There are several users involved with qmail:

qmaild:x:11185:2111::/usr/qmail:/bin/bash
qmaill:x:11186:2111::/usr/qmail:/bin/bash
qmailp:x:11187:2111::/usr/qmail:/bin/bash
qmailq:x:11188:2112::/usr/qmail:/bin/bash
qmailr:x:11189:2112::/usr/qmail:/bin/bash
qmails:x:11190:2112::/usr/qmail:/bin/bash

Besides, the program does not need write permissions on that file, does it?  It just needs to read the ldap server information from it.  Right???

John
0
 

Author Comment

by:jabeavers
ID: 22740563
Well I got all but qmail-send to work:

$ sudo /sbin/service qmail status
/service/qmail-send: up (pid 18832) 1 seconds
/service/qmail-send/log: up (pid 18425) 76 seconds
/service/qmail-smtpd: up (pid 18427) 76 seconds
/service/qmail-smtpd/log: up (pid 18429) 76 seconds
/service/qmail-pop3d: up (pid 18430) 76 seconds
/service/qmail-pop3d/log: up (pid 18431) 76 seconds
messages in queue: 128
messages in queue but not yet preprocessed: 127

I changed the owners of the log files/folders and the log processes started working.  I'm sure that the  qmail-send is a similar problem, but I do not know which user from the above should be used, nor do I know which files said user should own.

Thanks,

John
0
 
LVL 17

Expert Comment

by:owensleftfoot
ID: 22740730
Have you tried looking at the log files?
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:jabeavers
ID: 22740809
$ sudo tail /var/log/maillog
Oct 17 07:52:11 jlserver qmail: 1224247931.516817 alert: cannot start qmail-lspawn or it had an error! Check if ~control/ldapserver exists.

I'm currently searching for qmail-send specific logs.  However, as  I stated in my first post, the libraries seem fine, but I will run whatever command you want me to, to check them.

John
0
 
LVL 17

Expert Comment

by:owensleftfoot
ID: 22741885
Have a look here to find your log files
http://qmail.jms1.net/logfiles.shtml
0
 

Author Comment

by:jabeavers
ID: 22742054
Well, it seems that maillog is my only log.  All it says is "alert: cannot start qmail-lspawn or it had an error! Check if ~control/ldapserver exists."  I've checked and it does exist.  I've checked the libs per http://www.lifewithqmail.org/ldap/#typical%20problems but that seems good.  Please, I'm desperate, and want this working for my customer as soon as possible.

John
0
 

Accepted Solution

by:
jabeavers earned 0 total points
ID: 22743165
Ha ha ha!!!  Jesus is so good to us!!!  I got it working.  Turns out that the mess directory in the queue directory was owned by the root group instead of the qmail group.  After I changed it to be owned by the qmail group, it started working.  I was so desperate that I asked God for an answer.  An idea came to me to move the qmail directory to a temp directory, rerun make setup check, then compare the permissions of both sets of directories.  I systematically went through the permissions of the files and folders and found that one messed up (no pun intended).  I also found that qmail-queue did not have the setuid bit set in its permissions, which I'm sure had something to do with it.  Anyway, I praise God for His help, and thank you all for your willingness to help.

John

PS, I guess I need this question cancelled and points refunded.
0

Featured Post

Free book by J.Peter Bruzzese, Microsoft MVP

Are you using Office 365? Trying to set up email signatures but you’re struggling with transport rules and connectors? Let renowned Microsoft MVP J.Peter Bruzzese show you how in this exclusive e-book on Office 365 email signatures. Better yet, it’s free!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
What does "flush tables;" do exactly? 7 65
Working with SharePoint Data 8 46
dbcc checkdb datawarehouse 2 40
How to remove numeric and alpha from an alphanumeric field? 5 70
CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
In this video we show how to create an Accepted Domain in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Ac…

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now