Solved

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

Posted on 2008-10-16
8
776 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 17

Expert Comment

by:owensleftfoot
ID: 22740730
Have you tried looking at the log files?
0
 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Can i Import Access Table Into Oracle Using Toad 36 166
TypeError: Users.save is not a function 3 52
free version of MSSQL for over 10GB DB 19 59
Exchange 2016 Dag Question 2 31
Email signatures have numerous marketing benefits. Here are 8 top reasons to turn your email signature into a marketing channel.
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

815 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

11 Experts available now in Live!

Get 1:1 Help Now