Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

qmail-send not staying up

162 views
Skip to first unread message

Joel

unread,
May 1, 2010, 11:05:25 PM5/1/10
to
As the title says it is pretty much self explanatory:

root@themis:/home/joel# qmailctl stat
/service/qmail-send: up (pid 15164) 1 seconds
/service/qmail-send/log: up (pid 2259) 396654 seconds
/service/qmail-smtpd: up (pid 14942) 174 seconds
/service/qmail-smtpd/log: up (pid 2260) 396654 seconds
messages in queue: 0
messages in queue but not yet preprocessed: 0

The qmail-send never stays up longer than 1 second. The only similar
problem I have found online is here:
http://readlist.com/lists/list.cr.yp.to/qmail/0/4428.html
The asker eventually just reran "make setup check" from the qmail src
directory and that fixed his problem but not mine...
The logs /var/log/qmail/smtpd/current and /var/log/qmail/current are empty

but this log shows (probably from me starting and stopping qmail so much)
root@themis:/var/log/qmail/smtpd# cat current
@400000004bd101d30e8eb134 tcpserver: status: 0/20
@400000004bd27b9826ba3904 tcpserver: status: 0/20
@400000004bd27dfb11c9cb7c tcpserver: status: 0/20
@400000004bd27edc0a61380c tcpserver: status: 0/20
@400000004bd28410376a9b7c tcpserver: status: 0/20
@400000004bd2842717c6f7ac tcpserver: status: 0/20
@400000004bd6c02d09b7f01c tcpserver: status: 0/20
@400000004bd767f902e3ccac tcpserver: status: 0/20
@400000004bd792632e9f8a0c tcpserver: status: 0/20
@400000004bd796ef0c5416fc tcpserver: status: 0/20
@400000004bd79ba101e02fbc tcpserver: status: 0/20
@400000004bd79d6229d86124 tcpserver: status: 0/20
@400000004bdcc51a16143ab4 tcpserver: status: 0/20
@400000004bdccced239828e4 tcpserver: status: 0/20
@400000004bdcd39b18a87a24 tcpserver: status: 0/20
@400000004bdcd6142bff4c4c tcpserver: status: 0/20
@400000004bdcd65d24123ecc tcpserver: status: 0/20

So here's the background on this. I'm running ubuntu server on the machine
Linux themis 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:48:10 UTC
2009 i686 GNU/Linux
I am following "the qmail handbook" by David Sill.
I am using: daemontools-0.70 qmail-1.03 ucspi-tcp-0.88
When compiling qmail (as well as ucspi-tcp and daemontools I think) I
remember having to add in "include <errno.h>" to the error.h file. I
have tried the /var/qmail/rc script that was in the book as well as
the one that you can download from the books website (as I noticed
they were slightly different, and no, it is not because of errata) The
only other anomaly I remember having is when I ran the following
commands:

echo '127.:allow,RELAYCLIENT=""' >/etc/tcp.smtp
qmailctl cdb

I got the following message:
/usr/local/sbin/qmailctl: line 121: /etc/tcp.pop3: No such file or directory

to fix this I just did:
touch /etc/tcp.pop3

I didn't think there needed to be anything in that file, but correct
me if I am wrong.

My log directory looks like this currently:
root@themis:/var/log/qmail# ls
current lock send smtpd state

I believe there was not a "send" directory. I had to create it, but
now there is a "current" file in it like normal although it is empty.

From looking at
http://www.eyrie.org/~eagle/notes/debian/qmail.html
I realized that my installation doesn't have a /service/qmail directory
mkdir /service/qmail
chmod 1755 /service/qmail

However it looks like those instructions are a lot different from the
ones in the book so that may not have been nessesary.

When I run (ive never been able to get this inst_check to run
correctly, and I'm not sure if it is even relevant because it is from
a "life with qmail" guide that uses a new version of qmail) but here
it is anyways because the instcheck in the qmail src directory returns
nothing:
root@themis:/home/joel# sh inst_check
! /var/qmail/rc has bad magic cookie
...try: dos2unix /var/qmail/rc
! Couldn't find 'csh -cf '/command/svscanboot &' in /etc/rc.local
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
! /usr/bin/qmailctl is missing
...try: ln -s /var/qmail/bin/qmailctl /usr/bin
! /var/qmail/supervise/qmail-send/run has bad magic cookie
...try: dos2unix /var/qmail/supervise/qmail-send/run
[: 255: /var/qmail/alias: unexpected operator
[: 255: /var/qmail/alias: unexpected operator
[: 255: /var/qmail/alias: unexpected operator
! /usr/lib/sendmail is missing
...try: ln -s /var/qmail/bin/sendmail /usr/lib/sendmail
! /usr/sbin/sendmail is missing
...try: ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail


here are the scripts:
root@themis:/home/joel# cat /var/qmail/supervise/qmail-send/run
#/bin/sh
exec /var/qmail/rc

root@themis:/home/joel# cat /var/qmail/rc
#/bin/sh

# using stdout for logging
# using control/defaultdeilivery from qmail-local to deliver messages by default

DELIVERY=`cat /var/qmail/control/defaultdelivery`
if [ -z "$DELIVERY" ] ; then
    echo "/var/qmail/control/defaultdelivery is empty or does not exist" 1>&2
    exit 1
fi
exec env - PATH="/var/qmail/bin:$PATH" qmail-start "$DELIVERY"

permissions:
root@themis:/var/log/qmail# ls -l /service/
total 4
drwxr-xr-t 3 root root 4096 2010-05-01 21:31 qmail
lrwxrwxrwx 1 root root 32 2010-04-22 22:11 qmail-send ->
/var/qmail/supervise/qmail-send/
lrwxrwxrwx 1 root root 32 2010-04-22 22:11 qmail-smtpd ->
/var/qmail/supervise/qmail-smtpd

root@themis:/var/log/qmail# ls -l /var/qmail/supervise/
total 8
drwxr-xr-t 4 root root 4096 2010-04-24 01:10 qmail-send
drwxr-xr-t 4 root root 4096 2010-04-22 22:11 qmail-smtpd

root@themis:/var/log/qmail# ls -l /var/qmail/supervise/qmail-send/
total 12
drwxr-xr-x 3 root root 4096 2010-04-22 22:11 log
-rwxr-xr-x 1 root root 28 2010-04-22 21:44 run
drwx------ 2 root root 4096 2010-05-01 22:19 supervise

root@themis:/var/log/qmail# more /var/qmail/control/defaultdelivery
./Maildir/

When I look at the qmail processes that are running:
root@themis:/var/log/qmail# qmailctl start
Starting qmail
root@themis:/var/log/qmail# ps -ef | grep qmail
root 2253 2249 0 Apr27 ? 00:00:00 supervise qmail-smtpd
qmaill 2260 2254 0 Apr27 ? 00:00:00
/usr/local/bin/multilog t /var/log/qmail/smtpd
qmaill 2266 2259 0 Apr27 ? 00:00:00
/usr/local/bin/multilog t /var/log/qmail
root 18000 2249 0 Apr27 ? 00:00:58 supervise qmail-send
root 18615 2249 0 21:31 ? 00:00:00 supervise qmail
qmaild 24892 2253 0 22:31 ? 00:00:00
/usr/local/bin/tcpserver -v -R -H -l 0 -x /etc/tcp.smtp.cdb -c 20 -u
1003 -g 1002 0 smtp /var/qmail/bin/qmail-smtpd
root 24926 23531 0 22:31 pts/0 00:00:00 grep qmail

oh and sometimes even after I do "qmailctl stop" and happen to log
into the server later I get notified that there is a zombie process
running. (this after stopping it twice)
root@themis:/var/log/qmail# ps aux | grep -w Z
root 25510 0.0 0.0 0 0 ? Z 22:36 0:00
[supervise] <defunct>
root 25511 0.0 0.0 0 0 ? Z 22:36 0:00
[supervise] <defunct>
root 25513 0.0 0.0 3336 800 pts/0 R+ 22:36 0:00 grep -w Z


When I run with strace I get some interesting things (will only post
the part that looks fishy)

root@themis:/usr/local/src/qmail-1.03# strace qmailctl start
execve("/usr/local/sbin/qmailctl", ["qmailctl", "start"], [/* 21 vars */]) = 0
brk(0) = 0x9990000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fc8000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=14538, ...}) = 0
mmap2(NULL, 14538, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fc4000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)


stat64("/service/qmail-pop3d", 0xbfde81fc) = -1 ENOENT (No such file
or directory)
write(1, "Starting qmail\n"..., 15Starting qmail
) = 15
stat64("/var/qmail/bin/svok", 0xbfde82d8) = -1 ENOENT (No such file or
directory)
stat64("/bin/svok", 0xbfde82d8) = -1 ENOENT (No such file or directory)
stat64("/usr/bin/svok", 0xbfde82d8) = -1 ENOENT (No such file or directory)
stat64("/usr/local/bin/svok", {st_mode=S_IFREG|0755, st_size=10176, ...}) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb7e60918) = 27756
--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 27756
stat64("/var/qmail/bin/svc", 0xbfde8318) = -1 ENOENT (No such file or directory)
stat64("/bin/svc", 0xbfde8318) = -1 ENOENT (No such file or directory)
stat64("/usr/bin/svc", 0xbfde8318) = -1 ENOENT (No such file or directory)
stat64("/usr/local/bin/svc", {st_mode=S_IFREG|0755, st_size=14620, ...}) = 0
pipe([3, 4]) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb7e60918) = 27757
--- SIGCHLD (Child exited) @ 0 (0) ---
close(4) = 0
stat64("/var/qmail/bin/tee", 0xbfde8318) = -1 ENOENT (No such file or directory)
stat64("/bin/tee", 0xbfde8318) = -1 ENOENT (No such file or directory)
stat64("/usr/bin/tee", {st_mode=S_IFREG|0755, st_size=26072, ...}) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb7e60918) = 27759
--- SIGCHLD (Child exited) @ 0 (0) ---
close(3) = 0
close(-1) = -1 EBADF (Bad file descriptor)
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 27757
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 27759
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb7e60918) = 27760
--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 27760
pipe([3, 4]) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb7e60918) = 27761
--- SIGCHLD (Child exited) @ 0 (0) ---
close(4) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb7e60918) = 27764
--- SIGCHLD (Child exited) @ 0 (0) ---
close(3) = 0
close(-1) = -1 EBADF (Bad file descriptor)
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 27761
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 27764
stat64("/var/lock/subsys", 0xbfde815c) = -1 ENOENT (No such file or directory)
exit_group(0) = ?

Unfortunately this is my first time setting up qmail and I have no
clue whether that stuff in "qmailctl start" is supposed to happen.
So any ideas on what is wrong or what else I need to do to figure out
how to get qmail-send to stay up? Thanks.

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-...@muc.de

Joel

unread,
May 3, 2010, 1:32:01 AM5/3/10
to
It doesn't look like that worked either. I made sure to do a "make
clean" before I did a "make setup check". Thanks for your help though.
Maybe if you told me why exactly you added that,or what you would do
to go about figuring this out that would help me get started. I may
have enough though because I now know it has something to do with the
spawn.c file, but I don't know if I want to risk starting a wild goose
chase looking through qmail sites or just switch to postfix.

Here's the strace when I run qmailctl start this time:


root@themis:/usr/local/src/qmail-1.03# strace qmailctl start

execve("/usr/local/sbin/qmailctl", ["qmailctl", "start"], [/* 20 vars */]) = 0
brk(0) = 0x8883000


access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,

0) = 0xb7f9c000


access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=14538, ...}) = 0

mmap2(NULL, 14538, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f98000


close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)

open("/lib/tls/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320h\1\0004\0\0\0\344"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1442180, ...}) = 0
mmap2(NULL, 1451632, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0xb7e35000
mprotect(0xb7f91000, 4096, PROT_NONE) = 0
mmap2(0xb7f92000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15c) = 0xb7f92000
mmap2(0xb7f95000, 9840, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f95000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7e34000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e348d0,
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0,
limit_in_pages:1, seg_not_present:0, useable:1}) = 0
open("/dev/urandom", O_RDONLY) = 3
read(3, "\323l1"..., 3) = 3
close(3) = 0
mprotect(0xb7f92000, 8192, PROT_READ) = 0
mprotect(0x805d000, 4096, PROT_READ) = 0
mprotect(0xb7fbb000, 4096, PROT_READ) = 0
munmap(0xb7f98000, 14538) = 0
getpid() = 6962
rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
geteuid32() = 0
brk(0) = 0x8883000
brk(0x88a4000) = 0x88a4000
getppid() = 6961
stat64("/usr/local/src/qmail-1.03", {st_mode=S_IFDIR|0755,
st_size=28672, ...}) = 0
stat64(".", {st_mode=S_IFDIR|0755, st_size=28672, ...}) = 0
open("/usr/local/sbin/qmailctl", O_RDONLY) = 3
fcntl64(3, F_DUPFD, 10) = 10
close(3) = 0
fcntl64(10, F_SETFD, FD_CLOEXEC) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {0x8056770, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL}, NULL, 8) = 0
read(10, "#!/bin/sh\n\n# For Red Hat chkconfi"..., 8192) = 4124


pipe([3, 4]) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,

child_tidptr=0xb7e34918) = 6963


--- SIGCHLD (Child exited) @ 0 (0) ---
close(4) = 0

read(3, "Mon May 3 01:22:06 EDT 2010\n"..., 128) = 29
read(3, ""..., 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 6963


pipe([3, 4]) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,

child_tidptr=0xb7e34918) = 6964


--- SIGCHLD (Child exited) @ 0 (0) ---
close(4) = 0

read(3, "/dev/pts/0\n"..., 128) = 11
read(3, ""..., 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 6964
open("/var/log/qmailctl", O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE, 0666) = 3
fcntl64(1, F_DUPFD, 10) = 11
close(1) = 0
fcntl64(11, F_SETFD, FD_CLOEXEC) = 0
dup2(3, 1) = 1
close(3) = 0
write(1, "Mon May 3 01:22:06 EDT 2010 /dev/"..., 45) = 45
dup2(11, 1) = 1
close(11) = 0
stat64("/service/qmail-pop3d", 0xbf9b95ec) = -1 ENOENT (No such file


or directory)
write(1, "Starting qmail\n"..., 15Starting qmail
) = 15

stat64("/var/qmail/bin/svok", 0xbf9b96c8) = -1 ENOENT (No such file or
directory)
stat64("/bin/svok", 0xbf9b96c8) = -1 ENOENT (No such file or directory)
stat64("/usr/bin/svok", 0xbf9b96c8) = -1 ENOENT (No such file or directory)


stat64("/usr/local/bin/svok", {st_mode=S_IFREG|0755, st_size=10176, ...}) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,

child_tidptr=0xb7e34918) = 6965


--- SIGCHLD (Child exited) @ 0 (0) ---

wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 6965
stat64("/var/qmail/bin/svc", 0xbf9b9708) = -1 ENOENT (No such file or directory)
stat64("/bin/svc", 0xbf9b9708) = -1 ENOENT (No such file or directory)
stat64("/usr/bin/svc", 0xbf9b9708) = -1 ENOENT (No such file or directory)


stat64("/usr/local/bin/svc", {st_mode=S_IFREG|0755, st_size=14620, ...}) = 0
pipe([3, 4]) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,

child_tidptr=0xb7e34918) = 6966


--- SIGCHLD (Child exited) @ 0 (0) ---
close(4) = 0

stat64("/var/qmail/bin/tee", 0xbf9b9708) = -1 ENOENT (No such file or directory)
stat64("/bin/tee", 0xbf9b9708) = -1 ENOENT (No such file or directory)


stat64("/usr/bin/tee", {st_mode=S_IFREG|0755, st_size=26072, ...}) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,

child_tidptr=0xb7e34918) = 6968


--- SIGCHLD (Child exited) @ 0 (0) ---
close(3) = 0
close(-1) = -1 EBADF (Bad file descriptor)

wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 6966
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 6968
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb7e34918) = 6969


--- SIGCHLD (Child exited) @ 0 (0) ---

wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 6969


pipe([3, 4]) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,

child_tidptr=0xb7e34918) = 6970


--- SIGCHLD (Child exited) @ 0 (0) ---
close(4) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,

child_tidptr=0xb7e34918) = 6973


--- SIGCHLD (Child exited) @ 0 (0) ---
close(3) = 0
close(-1) = -1 EBADF (Bad file descriptor)

wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 6970
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 6973
stat64("/var/lock/subsys", 0xbf9b954c) = -1 ENOENT (No such file or directory)
exit_group(0) = ?


On Sun, May 2, 2010 at 8:35 PM, Airton Arantes wrote:
> I had the same problem. what I did was append an include header on the file
> spawn.c
>
> the header: #include "alloc.h"
>
> so after that you have to compile qmail again with command:
>
> make setup check
>
>
> try it out. worked for me and let me know if you got it.

> Airton Arantes Coelho Filho

Jeremy Kister

unread,
May 3, 2010, 1:54:13 AM5/3/10
to
On 5/1/2010 11:05 PM, Joel wrote:
> I realized that my installation doesn't have a /service/qmail directory

I have no idea what a /service/qmail directory would be. Since you've
manually created it, delete it.

cd /service ; svc -dx qmail ; rm -r qmail

> So any ideas on what is wrong or what else I need to do to figure out
> how to get qmail-send to stay up? Thanks.

Have you tried:

svc -d /service/qmail-send
cd /var/qmail
./rc

and watching what happens ?

is anything in readproctitle complaining ?

ps -ef | grep readp

most of us are going to be more familiar with a lifewithqmail install,
so if this is not a critical system as of yet, you may want to go that
route.

--

Jeremy Kister
http://jeremy.kister.net./

Jeremy Kister

unread,
May 3, 2010, 1:55:48 AM5/3/10
to
On 5/3/2010 1:32 AM, Joel wrote:
> chase looking through qmail sites or just switch to postfix.

Careful; we don't negotiate with terrorists!

--

Jeremy Kister
http://jeremy.kister.net./

--

Markus Stumpf

unread,
May 3, 2010, 7:57:22 AM5/3/10
to
On Mon, May 03, 2010 at 01:32:01AM -0400, Joel wrote:
> stat64("/usr/bin/tee", {st_mode=S_IFREG|0755, st_size=26072, ...}) = 0

What does the "tee" do here? Where does it come from?
If there is nothing it can write to (like stdout) it will fill up the
buffer and then kill the command.

Show us the contents of your /usr/local/sbin/qmailctl file.
Also, this is a shell script, right?
So a
$ sh -x /usr/local/sbin/qmailctl
would be a bit easier to read :-)

\Maex

Joel

unread,
May 3, 2010, 1:18:02 PM5/3/10
to
>I have no idea what a /service/qmail directory would be. Since you've >manually created it, delete it.

So this is what the /service/qmail directory looked like before I deleted it:
root@themis:/service/qmail/supervise# ls
control lock ok status


>Have you tried:
root@themis:/var/qmail# ./rc
status: local 0/10 remote 0/20
^C
root@themis:/var/qmail# sh -x rc
+ cat /var/qmail/control/defaultdelivery
+ DELIVERY=./Maildir/
+ [ -z ./Maildir/ ]
+ exec env - PATH=/var/qmail/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
qmail-start ./Maildir/
status: local 0/10 remote 0/20

It just hangs there untill I do ^C

>is anything in readproctitle complaining ?

nope:
root@themis:/var/qmail# qmailctl start
Starting qmail
root@themis:/var/qmail# ps -ef | grep readp
root 30027 28512 0 12:58 pts/0 00:00:00 grep readp


>What does the "tee" do here? Where does it come from?
>If there is nothing it can write to (like stdout) it will fill up the
>buffer and then kill the command.

umm, I'm not sure I understand, what do you think is causing that problem?

root@themis:/usr/bin# cat tee
ELF �4�a4( 44�4� 4 4�4� ��
\
\ �� \ _ � ��� H H�H�
Q�td R�t��� /lib/ld-linux.so.2 GNU %/ ) -
%',"
(*# !
. $&+ + #
"+,.) � �K��9�� 3�� 8 B �G � � W � � �$ � _�
�� )" �U �X f 2 � �
n @U �v Q � � � OI , G @ � �F �� 6� } � �k ? � X � �� f
F * Y� r ` � 6 w�
� �� �� �� H�� __gmon_start__libc.so.6_IO_stdin_used__printf_chksetlocalembrtowcoptinddcgettexterrorsignal__stack_chk_failiswprintreallocabort_exit__ctype_get_mb_cur_maxcallocstrlenmemset__errno_locationread__fprintf_chkstdoutmemcpyfclosemallocmbsinit__ctype_b_locstderr__snprintf_chkgetopt_longfilenofwrite__fpendingfdopensetvbuffcntlfopen64bindtextdomainfwrite_unlocked__libc_start_mainfputs_unlockedfree__cxa_atexitGLIBC_2.2GLIBC_2.4GLIBC_2.3GLIBC_2.3.4GLI................


>Show us the contents of your /usr/local/sbin/qmailctl file.

It is the one download-able from apress.com (the qmail handbook's)
website but here is it:

root@themis:/usr/bin# cat /usr/local/sbin/qmailctl
#!/bin/sh

# For Red Hat chkconfig
# chkconfig: - 30 80
# description: the qmail MTA
#

# Dave Sill, 2001-11-06
# For use with The qmail Handbook, ISBN 1893115402

PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
export PATH
LOG=/var/log/qmailctl

echo `date` `tty` $* >>$LOG

if [ -d /service/qmail-pop3d ]; then
POP=yes
else
POP=no
fi

case "$1" in
start)
echo "Starting qmail"
if svok /service/qmail-send ; then
svc -u /service/qmail-send 2>&1 | tee -a $LOG
else
echo qmail-send service not running
fi
if svok /service/qmail-smtpd ; then
svc -u /service/qmail-smtpd 2>&1 | tee -a $LOG
else
echo qmail-smtpd service not running
fi
if [ -d /var/lock/subsys ]; then
touch /var/lock/subsys/qmail
fi
if [ $POP = yes ]; then
if svok /service/qmail-pop3d ; then
svc -u /service/qmail-pop3d
else
echo qmail-pop3d service not running
fi
fi
;;
stop)
echo "Stopping qmail..."
echo " qmail-smtpd"
svc -d /service/qmail-smtpd 2>&1 | tee -a $LOG
echo " qmail-send"
svc -d /service/qmail-send 2>&1 | tee -a $LOG
if [ -f /var/lock/subsys/qmail ]; then
rm /var/lock/subsys/qmail
fi
if [ $POP = yes ]; then
echo " qmail-pop3d"
svc -d /service/qmail-pop3d
fi
;;
stat)
svstat /service/qmail-send
svstat /service/qmail-send/log
svstat /service/qmail-smtpd
svstat /service/qmail-smtpd/log
if [ $POP = yes ]; then
svstat /service/qmail-pop3d
svstat /service/qmail-pop3d/log
fi
qmail-qstat
;;
doqueue|alrm|flush)
echo "Sending ALRM signal to qmail-send."
svc -a /service/qmail-send 2>&1 | tee -a $LOG
;;
queue)
qmail-qstat
qmail-qread
;;
reload|hup)
echo "Sending HUP signal to qmail-send."
svc -h /service/qmail-send 2>&1 | tee -a $LOG
;;
pause)
echo "Pausing qmail-send"
svc -p /service/qmail-send 2>&1 | tee -a $LOG
echo "Pausing qmail-smtpd"
svc -p /service/qmail-smtpd 2>&1 | tee -a $LOG
if [ $POP = yes ]; then
echo "Pausing qmail-pop3d"
svc -p /service/qmail-pop3d
fi
;;
cont)
echo "Continuing qmail-send"
svc -c /service/qmail-send 2>&1 | tee -a $LOG
echo "Continuing qmail-smtpd"
svc -c /service/qmail-smtpd 2>&1 | tee -a $LOG
if [ $POP = yes ]; then
echo "Continuing qmail-pop3d"
svc -c /service/qmail-pop3d
fi
;;
restart)
echo "Restarting qmail:"
echo "* Stopping qmail-smtpd."
svc -d /service/qmail-smtpd 2>&1 | tee -a $LOG
echo "* Sending qmail-send SIGTERM and restarting."
svc -t /service/qmail-send 2>&1 | tee -a $LOG
echo "* Restarting qmail-smtpd."
svc -u /service/qmail-smtpd 2>&1 | tee -a $LOG
if [ $POP = yes ]; then
echo "* Restarting qmail-pop3d."
svc -t /service/qmail-pop3d
fi
;;
cdb)
tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp 2>&1
| tee -a $LOG
chmod 644 /etc/tcp.smtp.cdb
echo "Reloaded /etc/tcp.smtp."
tcprules /etc/tcp.pop3.cdb /etc/tcp.pop3.tmp < /etc/tcp.pop3 2>&1
| tee -a $LOG
if [ $POP = yes ]; then
chmod 644 /etc/tcp.pop3.cdb
echo "Reloaded /etc/tcp.pop3."
fi
;;
help)
cat <<HELP
stop -- stops mail service (smtp connections refused, nothing goes out)
start -- starts mail service (smtp connection accepted, mail can go out)
pause -- temporarily stops mail service (connections accepted, nothing leaves)
cont -- continues paused mail service
stat -- displays status of mail service
cdb -- rebuild the tcpserver cdb file for smtp
restart -- stops and restarts smtp, sends qmail-send a TERM & restarts it
doqueue -- sends qmail-send ALRM, scheduling queued messages for delivery
reload -- sends qmail-send HUP, rereading locals and virtualdomains
queue -- shows status of queue
alrm -- same as doqueue
flush -- same as doqueue
hup -- same as reload
HELP
;;
*)
echo "Usage: $0
{start|stop|restart|doqueue|flush|reload|stat|pause|cont|cdb|queue|help}"
exit 1
;;
esac

exit 0


root@themis:/usr/bin# sh -x /usr/local/sbin/qmailctl start
+ PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
+ export PATH
+ LOG=/var/log/qmailctl
+ date
+ tty
+ echo Mon May 3 13:10:04 EDT 2010 /dev/pts/0 start
+ [ -d /service/qmail-pop3d ]
+ POP=no
+ echo Starting qmail
Starting qmail
+ svok /service/qmail-send
+ svc -u /service/qmail-send
+ tee -a /var/log/qmailctl
+ svok /service/qmail-smtpd
+ svc -u /service/qmail-smtpd
+ tee -a /var/log/qmailctl
+ [ -d /var/lock/subsys ]
+ [ no = yes ]
+ exit 0


>most of us are going to be more familiar with a lifewithqmail install, so if this >is not a critical system as of yet, you may want to go that route.

>>chase looking through qmail sites or just switch to postfix.

> Careful; we don't negotiate with terrorists!

The life with qmail install does not get svscan up and running
correctly on my system and this is the reason I am trying this simpler
install out. However, if this doesn't work then I may try that again
and ask here about it. (or become a terrorist) XD

Jeremy Kister

unread,
May 3, 2010, 1:35:27 PM5/3/10
to
On 5/3/2010 1:18 PM, Joel wrote:
> status: local 0/10 remote 0/20
>
> It just hangs there untill I do ^C

well, hangs == waiting for something to do ? this looks like it is up
and running.

in one window, do the ./rc
in another window, do something like: echo test | sendmail y...@example.com

if you get that email, your qmail queue is certainly working when you
run it manually.


> root@themis:/var/qmail# ps -ef | grep readp

> root 30027 28512 0 12:58 pts/0 00:00:00 grep readp

Well that's odd. you should have a readproctitle program running that
looks something like 'readproctitle service errors: ...................'

maybe ps aux | grep readp ?


> umm, I'm not sure I understand, what do you think is causing that
problem?

I think that may be correct -- especially if your queue is running fine
when you manually run "rc" but it breaks when you turn it up under
daemontools.

get this qmailctl: http://lifewithqmail.org/qmailctl-script-dt70


then:
svc -d /service/qmail-send
sleep 2
svc -u /service/qmail-send

then try to send mail again.

--

Jeremy Kister
http://jeremy.kister.net./

--

Markus Stumpf

unread,
May 3, 2010, 1:48:15 PM5/3/10
to
On Mon, May 03, 2010 at 01:35:27PM -0400, Jeremy Kister wrote:
> in another window, do something like: echo test | sendmail y...@example.com

Better usr a full path like this:
echo test | /var/qmail/bin/sendmail y...@example.com
just to make sure it is using qmail's sendmail and not a left over
of exim/postfix/sendmail/...

\Maex

Christopher Chan

unread,
May 3, 2010, 7:53:29 PM5/3/10
to
>
> So here's the background on this. I'm running ubuntu server on the machine
> Linux themis 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:48:10 UTC
> 2009 i686 GNU/Linux
> I am following "the qmail handbook" by David Sill.
> I am using: daemontools-0.70 qmail-1.03 ucspi-tcp-0.88
> When compiling qmail (as well as ucspi-tcp and daemontools I think) I
> remember having to add in "include<errno.h>" to the error.h file. I
> have tried the /var/qmail/rc script that was in the book as well as
> the one that you can download from the books website (as I noticed
> they were slightly different, and no, it is not because of errata) The
> only other anomaly I remember having is when I ran the following
> commands:

Joel,

What version of Ubuntu is this? Where did you get that daemontools 0.70
version from? That is not the latest version of daemontools (version
0.76 is btw still pretty old :P) and where did you get your qmail and
ucspi-tcp package from or did you compile and install from source?

Joel

unread,
May 3, 2010, 10:05:48 PM5/3/10
to
Ok before you guys read any further I need some advice. Do you think I
should go back to trying to use the newer "life with qmail" guide? It
does seem like everyone here would know more about that anyways.
(although problem I had with it was that svscan was not running
correctly) Because I don't think we are getting anywhere here, unless
someone really thinks they know what is wrong I am just going to wait
till the weekend (im currently short on time) and run through the
"life with qmail" guide again and post the problem I have with svscan
to this list. Thank you once again for all of your help.


>What version of Ubuntu is this?

joel@themis:~$ cat /etc/issue
Ubuntu 9.04 \n \l

>That is not the latest version of daemontools
>(version 0.76 is btw still pretty old :P) and where did
>you get your qmail and ucspi-tcp package from or
>did you compile and install from source?

I am aware that I'm being very old fashion here but it is because I
was frustrated with a newer version of qmail previously because svscan
did not start properly. But I still got it all from cr.yp.to

root@themis:/var/qmail# ./rc


status: local 0/10 remote 0/20

new msg 5669502
info msg 5669502: bytes 242 from <ro...@themis.ttd.doesntexist.com> qp 2739 uid 0
starting delivery 1: msg 5669502 to remote felixth...@gmail.com
status: local 0/10 remote 1/20
echo test | /var/qmail/bin/sendmail felixth...@gmail.com
new msg 5669484
info msg 5669484: bytes 242 from <ro...@themis.ttd.doesntexist.com> qp 2901 uid 0
starting delivery 2: msg 5669484 to remote felixth...@gmail.com
status: local 0/10 remote 2/20
delivery 1: deferral:
Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
status: local 0/10 remote 1/20
delivery 2: deferral:
Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/


status: local 0/10 remote 0/20

starting delivery 3: msg 5669502 to remote felixth...@gmail.com
status: local 0/10 remote 1/20
starting delivery 4: msg 5669484 to remote felixth...@gmail.com
status: local 0/10 remote 2/20

I also tried the newer qmail script and the svc -d and -u sequence
with no luck, and take a look at this:
root@themis:/home/joel# ps aux | grep readp
root 9326 0.0 0.0 3336 792 pts/2 R+ 22:02 0:00 grep readp

Thank you though.

Christopher Chan

unread,
May 4, 2010, 3:04:30 AM5/4/10
to
Hi Joel,

On Tuesday, May 04, 2010 10:05 AM, Joel wrote:
> Ok before you guys read any further I need some advice. Do you think I
> should go back to trying to use the newer "life with qmail" guide? It
> does seem like everyone here would know more about that anyways.
> (although problem I had with it was that svscan was not running
> correctly) Because I don't think we are getting anywhere here, unless
> someone really thinks they know what is wrong I am just going to wait
> till the weekend (im currently short on time) and run through the
> "life with qmail" guide again and post the problem I have with svscan
> to this list. Thank you once again for all of your help.

No, you must first understand the system you are running with. Life with
qmail probably does not keep up to date with every dumb Linux
distribution out there.


>
>
>> What version of Ubuntu is this?

> joel@themis:~$ cat /etc/issue
> Ubuntu 9.04 \n \l

Please install the daemontools package that comes with Jaunty and you
can remove the daemontools that you compiled and installed.


>
>> That is not the latest version of daemontools
>> (version 0.76 is btw still pretty old :P) and where did
>> you get your qmail and ucspi-tcp package from or
>> did you compile and install from source?

> I am aware that I'm being very old fashion here but it is because I
> was frustrated with a newer version of qmail previously because svscan
> did not start properly. But I still got it all from cr.yp.to

Jaunty does not even have a inittab file now. It is now using Startup,
an events based init replacement. That is probably why svscan/svscanboot
did not start properly.


>
> root@themis:/var/qmail# ./rc
> status: local 0/10 remote 0/20
> new msg 5669502
> info msg 5669502: bytes 242 from<ro...@themis.ttd.doesntexist.com> qp 2739 uid 0
> starting delivery 1: msg 5669502 to remote felixth...@gmail.com
> status: local 0/10 remote 1/20
> echo test | /var/qmail/bin/sendmail felixth...@gmail.com
> new msg 5669484
> info msg 5669484: bytes 242 from<ro...@themis.ttd.doesntexist.com> qp 2901 uid 0
> starting delivery 2: msg 5669484 to remote felixth...@gmail.com
> status: local 0/10 remote 2/20
> delivery 1: deferral:
> Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
> status: local 0/10 remote 1/20
> delivery 2: deferral:
> Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
> status: local 0/10 remote 0/20
> starting delivery 3: msg 5669502 to remote felixth...@gmail.com
> status: local 0/10 remote 1/20
> starting delivery 4: msg 5669484 to remote felixth...@gmail.com
> status: local 0/10 remote 2/20

I guess that means you now have a working rc script. Now all you need is
a working 'service directory' for svscan to call supervise for.


>
> I also tried the newer qmail script and the svc -d and -u sequence
> with no luck, and take a look at this:
> root@themis:/home/joel# ps aux | grep readp
> root 9326 0.0 0.0 3336 792 pts/2 R+ 22:02 0:00 grep readp
>
> Thank you though.


Again, I suggest removing the daemontools that you compiled and
installing the Jaunty daemontools package. 'apt-cache search
daemontools' then 'apt-get install daemontoolspkgname' to install
Jaunty's daemontools. I would not touch the qmail package that Jaunty
uses though. The instructions for setting up the 'service directory' for
qmail at http://www.lifewithqmail.org/lwq.html#install-daemontools ought
to be fine. Just link /var/qmail/supervise/qmail-send to /etc/service
when you are done with daemontools.

Joel

unread,
May 4, 2010, 9:26:29 PM5/4/10
to
>Again, I suggest removing the daemontools that you >compiled and installing the Jaunty daemontools package.
>Just link /var/qmail/supervise/qmail-send to /etc/service >when you are done with daemontools.

Well I installed daemontools and daemontools-run and it created the
/etc/service directory and complained about the lack of /etc/inittab
untill I created it. But now things have gone from bad to worse:

root@themis:/service# qmailctl stat
/service/qmail-send: up (pid 20859) 0 seconds
/service/qmail-send/log: up (pid 20856) 0 seconds
/service/qmail-smtpd: up (pid 17804) 34 seconds
/service/qmail-smtpd/log: up (pid 20860) 0 seconds
messages in queue: 2


messages in queue but not yet preprocessed: 0

Now nothing except smtpd log stays up for more than 1 second.

>Life with qmail probably does not keep up to date with every >dumb Linux distribution out there.

If you are making a jab at ubuntu here, let me say that I am aware of
the security problems that Bernstein has mentioned regarding Ubuntu,
but I'm relatively new to GNU/Linux so I still think it is good a
place to start, and it is the only distribution that you can convert
non-software-engineer windows users to without giving them microchip
brain implants, so I think it has it's place overall as well.
Nevertheless I do plan to change distributions eventually when
security becomes important. Notice how I am attempting to use qmail
and not postfix, at least give me credit for that.

On Tue, May 4, 2010 at 3:04 AM, Christopher Chan <chris...@ias.com.hk> wrote:
> Hi Joel,
>
> On Tuesday, May 04, 2010 10:05 AM, Joel wrote:
>>
>> Ok before you guys read any further I need some advice. Do you think I
>> should go back to trying to use the newer "life with qmail" guide? It
>> does seem like everyone here would know more about that anyways.
>> (although problem I had with it was that svscan was not running
>> correctly)  Because I don't think we are getting anywhere here, unless
>> someone really thinks they know what is wrong I am just going to wait
>> till the weekend (im currently short on time) and run through the
>> "life with qmail" guide again and post the problem I have with svscan
>> to this list. Thank you once again for all of your help.
>
> No, you must first understand the system you are running with. Life with
> qmail probably does not keep up to date with every dumb Linux distribution
> out there.
>
>
>>
>>

>>> What version of Ubuntu is this?
>>

>> joel@themis:~$ cat /etc/issue
>> Ubuntu 9.04 \n \l
>
> Please install the daemontools package that comes with Jaunty and you can
> remove the daemontools that you compiled and installed.
>
>
>>

>>> That is not the latest version of daemontools
>>> (version 0.76 is btw still pretty old :P) and where did
>>> you get your qmail and ucspi-tcp package from or
>>> did you compile and install from source?
>>

--

Joel

unread,
May 4, 2010, 10:40:29 PM5/4/10
to
It is actually one comment I am referring to about Ubuntu made by Bernstein here:
http://www.google.com/url?sa=t&source=web&ct=res&cd=2&ved=0CBcQFjAB&url=http%3A%2F%2Fcr.yp.to%2Fqmail%2Fqmailsec-20071101.pdf&ei=EM_gS_irJ8L-8AaJqZzPDA&usg=AFQjCNFY8I0kcz3R30-56A5amJ5SAyffcg&sig2=LBiFukX3NiIUvXHYPEoAfw

and now reading further I may have misunderstood his intention in making it.

Christopher Chan

unread,
May 4, 2010, 10:54:30 PM5/4/10
to
On Wednesday, May 05, 2010 09:26 AM, Joel wrote:
>> Again, I suggest removing the daemontools that you>compiled and installing the Jaunty daemontools package.
>> Just link /var/qmail/supervise/qmail-send to /etc/service>when you are done with daemontools.
>
> Well I installed daemontools and daemontools-run and it created the
> /etc/service directory and complained about the lack of /etc/inittab
> untill I created it. But now things have gone from bad to worse:

Crumbs, I thought they had fixed all their daemontools package in
Jaunty. I guess the fix only got in in Karmic. You wanna try
do-release-upgrade on your fancy Ubuntu server?


>
> root@themis:/service# qmailctl stat
> /service/qmail-send: up (pid 20859) 0 seconds
> /service/qmail-send/log: up (pid 20856) 0 seconds
> /service/qmail-smtpd: up (pid 17804) 34 seconds
> /service/qmail-smtpd/log: up (pid 20860) 0 seconds
> messages in queue: 2
> messages in queue but not yet preprocessed: 0
>
> Now nothing except smtpd log stays up for more than 1 second.

You probably now have two instances of daemontools!? Kill one. You
should not be using /service anymore...either remove your compiled from
source daemontools or Jaunty's and then set Upstart up to run whichever
version you like.


>
>> Life with qmail probably does not keep up to date with every>dumb Linux distribution out there.
> If you are making a jab at ubuntu here, let me say that I am aware of
> the security problems that Bernstein has mentioned regarding Ubuntu,
> but I'm relatively new to GNU/Linux so I still think it is good a
> place to start, and it is the only distribution that you can convert
> non-software-engineer windows users to without giving them microchip
> brain implants, so I think it has it's place overall as well.
> Nevertheless I do plan to change distributions eventually when
> security becomes important. Notice how I am attempting to use qmail
> and not postfix, at least give me credit for that.

Hey, I don't care if you want to use an operating system that does not
get any more attention after a year. I am just telling you that Jaunty
does not use systemV init anymore. If you cannot understand what that
means, you need to do some more reading. But nevermind init, read up on
Upstart or whatever they call it. http://upstart.ubuntu.com/

Mind you, running a mail system is not for 'non-software-engineer
windows users' and in fact, that is not something a 'user' should do at
all. If you want to run a mail system, you better be prepared to learn
some system admin stuff.


>
> On Tue, May 4, 2010 at 3:04 AM, Christopher Chan<chris...@ias.com.hk> wrote:
>> Hi Joel,
>>
>> On Tuesday, May 04, 2010 10:05 AM, Joel wrote:
>>>
>>> Ok before you guys read any further I need some advice. Do you think I
>>> should go back to trying to use the newer "life with qmail" guide? It
>>> does seem like everyone here would know more about that anyways.
>>> (although problem I had with it was that svscan was not running
>>> correctly) Because I don't think we are getting anywhere here, unless
>>> someone really thinks they know what is wrong I am just going to wait
>>> till the weekend (im currently short on time) and run through the
>>> "life with qmail" guide again and post the problem I have with svscan
>>> to this list. Thank you once again for all of your help.
>>
>> No, you must first understand the system you are running with. Life with
>> qmail probably does not keep up to date with every dumb Linux distribution
>> out there.
>>
>>
>>>
>>>

>>>> What version of Ubuntu is this?
>>>

>>> joel@themis:~$ cat /etc/issue
>>> Ubuntu 9.04 \n \l
>>
>> Please install the daemontools package that comes with Jaunty and you can
>> remove the daemontools that you compiled and installed.
>>
>>
>>>

>>>> That is not the latest version of daemontools
>>>> (version 0.76 is btw still pretty old :P) and where did
>>>> you get your qmail and ucspi-tcp package from or
>>>> did you compile and install from source?
>>>

Christopher Chan

unread,
May 4, 2010, 11:01:01 PM5/4/10
to

Let's just say that I regret only having an Ubuntu Hardy disk on hand
when the Redhat Linux box left behind by the previous chump that served
as the gateway/nat/proxy died.

Centos 5 might be old, but is good old stuff, not fancy, poorly
maintained stuff like you get on Ubuntu such as their daemontools
package for instance.

Joel

unread,
May 15, 2010, 8:44:14 PM5/15/10
to
I've been really busy the past couple weeks, but now I've finally sat down and looked at this again. I was thinking of switching to debian server because of all the crap I hear about ubuntu server but the problem is that my server is very far away and my friend, who maintains my server, was soon to be going on a long visit to China (he's there now). So I decided to have him stick with ubuntu because I wasn't sure if he could get all the installation and issues with debian worked out in that time. Anyways im now using:
Ubuntu 10.04 LTS

I did my best to go through and uninstall my previous qmail installation (install2) where I used "the qmail handbook", then I upgraded from Ubuntu server 9.04 to 10.04, and after I upgraded I tried the install again using the "life with qmail" guide... again (i used it install1 as well). I will refer to this current attempt at installing as "install3"

Some things I did during the uninstal: I noticed that there were symbolic links to a nonexistent /etc/service file in my / directory:
root@themis:/# ls -l service
lrwxrwxrwx 1 root root 12 2010-05-04 21:05 service -> /etc/service
As well as a old service link
root@themis:/# ls -l service\{old}
total 0

lrwxrwxrwx 1 root root 32 2010-04-22 22:11 qmail-send -> /var/qmail/supervise/qmail-send/
lrwxrwxrwx 1 root root 32 2010-04-22 22:11 qmail-smtpd -> /var/qmail/supervise/qmail-smtpd

So I deleted those.

Anyways, now for what I did during install3 (this install) other than following the "life with qmail" guide:

I installed upstart just incase it wasn't already there:
root@themis:/sbin# apt-get install upstart
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following extra packages will be installed:
  libnih-dbus1 libnih1
The following NEW packages will be installed:
  libnih-dbus1 libnih1
The following packages will be upgraded:
  upstart
1 upgraded, 2 newly installed, 0 to remove and 88 not upgraded.
Need to get 429kB of archives.
After this operation, 111kB disk space will be freed.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ lucid/main libnih1 1.0.1-1 [127kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ lucid/main libnih-dbus1 1.0.1-1 [13.8kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ lucid/main upstart 0.6.5-6 [288kB]
Fetched 429kB in 5s (77.1kB/s)    
Selecting previously deselected package libnih1.
(Reading database ... 33630 files and directories currently installed.)
Unpacking libnih1 (from .../libnih1_1.0.1-1_i386.deb) ...
Selecting previously deselected package libnih-dbus1.
Unpacking libnih-dbus1 (from .../libnih-dbus1_1.0.1-1_i386.deb) ...
Preparing to replace upstart 0.6.3-11 (using .../upstart_0.6.5-6_i386.deb) ...
Unpacking replacement upstart ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Setting up libnih1 (1.0.1-1) ...

Setting up libnih-dbus1 (1.0.1-1) ...

Setting up upstart (0.6.5-6) ...
Installing new version of config file /etc/init/rc-sysinit.conf ...
Installing new version of config file /etc/init/rc.conf ...

Processing triggers for libc-bin ...
ldconfig deferred processing now taking place



Now I haven't done anything else with upstart because I didn't see anything I had to add to keep a program running. I just saw stuff about adding a .conf to the /etc/init directory if you wanted a program to automatically run or stop at boot or shutdown, and so you could do "start myprogram" and "stop myprogram"


I also installed daemontools and daemontools-run with
"apt-get install daemontools"
"apt-get install daemontools-run"
This uses the /etc/service directory instead of /service
and so I acounted for this during the rest of installation by replace /service with /etc/service in the scripts and commands.

I noticed that even though there was no /etc/inittab it did not complain about it, so far so good.

At one point I made a mistake and typed this instead of what I meant to type "ls | grep svscan" just to see if svscan and what stuff related to it was in there:
root@themis:/usr/bin$ ls | svscan

It started saying something like "could not aquire lock this is not a such and such directory" before I did "stop svscan" and rebooted. Hopefully this didn't effect anything.

Before I started qmail I tested to see if svscan was running (just in case this was something I should know)
root@themis:/var/qmail/supervise/qmail-smtpd/log# ps -ef | grep svscan
root       760     1  0 17:33 ?        00:00:00 /bin/sh /usr/bin/svscanboot
root       779   760  0 17:33 ?        00:00:00 svscan /etc/service
root      1131   992  0 18:16 pts/0    00:00:00 grep svscan

For aliases I just replaced the example "dave" with my name since I am both the system and mail admin

echo joel > /var/qmail/alias/.qmail-root
echo joel > /var/qmail/alias/.qmail-postmaster
ln -s .qmail-postmaster /var/qmail/alias/.qmail-mailer-daemon
ln -s .qmail-postmaster /var/qmail/alias/.qmail-abuse
chmod 644 /var/qmail/alias/.qmail-root /var/qmail/alias/.qmail-postmaster

I finally did qmailctl start and I checked the install:

root@themis:/etc/service# qmailctl stat
/etc/service/qmail-send: up (pid 1145) 506 seconds
/etc/service/qmail-send/log: up (pid 5075) 1 seconds
/etc/service/qmail-smtpd: up (pid 5076) 1 seconds
/etc/service/qmail-smtpd/log: up (pid 5074) 1 seconds
messages in queue: 0

messages in queue but not yet preprocessed: 0

What do ya know! I thought my problem was reversed, where previously qmail-send was the only thing that wasn't staying up, now everything EXCEPT qmail-send won't stay up, if only I could combine the best parts of my attempts in install2 and install3 :( but then....
I was mucking around, and I noticed I had set it to use mailbox instead of maildir (which is the one I wanted) however, after a while I tried qmailctl start again and this time I got:

root@themis:/var/log/qmail# qmailctl stat
/etc/service/qmail-send: up (pid 18125) 413 seconds
/etc/service/qmail-send/log: up (pid 18975) 0 seconds
/etc/service/qmail-smtpd: up (pid 18133) 413 seconds
/etc/service/qmail-smtpd/log: up (pid 18976) 0 seconds
messages in queue: 0

messages in queue but not yet preprocessed: 0

Now both send and smtpd are working, only the log stuff isn't. This couldn't have been because of the change from mailbox to maildir (other than having nothing to do with this I tried changing it back to mailbox and doing qmailctl start again and smtpd still stayed up)

here is qmailctl start with -x and strace:

root@themis:/var/log/qmail# /bin/sh -x /var/qmail/bin/qmailctl start

+ PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
+ export PATH
+ id -u qmaild
+ QMAILDUID=1003
+ id -g qmaild
+ NOFILESGID=1002

+ echo Starting qmail
Starting qmail
+ svok /etc/service/qmail-send
+ svc -u /etc/service/qmail-send /etc/service/qmail-send/log
+ svok /etc/service/qmail-smtpd
+ svc -u /etc/service/qmail-smtpd /etc/service/qmail-smtpd/log
+ [ -d /var/lock/subsys ]
+ exit 0


root@themis:/var/log/qmail# strace qmailctl start
execve("/usr/bin/qmailctl", ["qmailctl", "start"], [/* 21 vars */]) = 0
brk(0)                                  = 0x82ea000

access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb76f1000

access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=15406, ...}) = 0
mmap2(NULL, 15406, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb76ed000

close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260l\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1319364, ...}) = 0
mmap2(NULL, 1329512, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb75a8000
mprotect(0xb76e6000, 4096, PROT_NONE)   = 0
mmap2(0xb76e7000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13e) = 0xb76e7000
mmap2(0xb76ea000, 10600, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb76ea000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb75a7000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb75a78d0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb76e7000, 8192, PROT_READ)   = 0
mprotect(0x805e000, 4096, PROT_READ)    = 0
mprotect(0xb770f000, 4096, PROT_READ)   = 0
munmap(0xb76ed000, 15406)               = 0
getpid()                                = 19308
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
geteuid32()                             = 0
brk(0)                                  = 0x82ea000
brk(0x830b000)                          = 0x830b000
getppid()                               = 19307
stat64("/var/log/qmail", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/bin/qmailctl", O_RDONLY)     = 3

fcntl64(3, F_DUPFD, 10)                 = 10
close(3)                                = 0
fcntl64(10, F_SETFD, FD_CLOEXEC)        = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x804f5fb, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
read(10, "#!/bin/sh\n\n# For Red Hat chkconf"..., 8192) = 3157

pipe([3, 4])                            = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb75a7938) = 19309

--- SIGCHLD (Child exited) @ 0 (0) ---
close(4)                                = 0
read(3, "1003\n", 128)                  = 5
read(3, "", 128)                        = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 19309

pipe([3, 4])                            = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb75a7938) = 19310

--- SIGCHLD (Child exited) @ 0 (0) ---
close(4)                                = 0
read(3, "1002\n", 128)                  = 5
read(3, "", 128)                        = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 19310
write(1, "Starting qmail\n", 15Starting qmail
)        = 15
stat64("/var/qmail/bin/svok", 0xbf9bbbd0) = -1 ENOENT (No such file or directory)
stat64("/bin/svok", 0xbf9bbbd0)         = -1 ENOENT (No such file or directory)
stat64("/usr/bin/svok", {st_mode=S_IFREG|0755, st_size=9620, ...}) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb75a7938) = 19311

--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 19311
stat64("/var/qmail/bin/svc", 0xbf9bbbd0) = -1 ENOENT (No such file or directory)
stat64("/bin/svc", 0xbf9bbbd0)          = -1 ENOENT (No such file or directory)
stat64("/usr/bin/svc", {st_mode=S_IFREG|0755, st_size=13780, ...}) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb75a7938) = 19312

--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 19312
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb75a7938) = 19319

--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 19319
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb75a7938) = 19320

--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 19320
stat64("/var/lock/subsys", 0xbf9bbaf0)  = -1 ENOENT (No such file or directory)
exit_group(0)                           = ?

To run inst_check I went through the script and replaced all instances of /service with /etc/service, although it is of course still not completely accurate because of daemontools differences in my installation

root@themis:/home/joel# sh inst_check
! Couldn't find /usr/local/bin/multilog from daemontools
! Couldn't find /usr/local/bin/softlimit from daemontools
! Couldn't find /usr/local/bin/setuidgid from daemontools
! Couldn't find /usr/local/bin/supervise from daemontools
! Couldn't find /usr/local/bin/svok from daemontools
! Couldn't find /usr/local/bin/svscan from daemontools
! Couldn't find /usr/local/bin/tai64nlocal from daemontools

! Couldn't find 'csh -cf '/command/svscanboot &' in /etc/rc.local
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
[: 255: /var/qmail/alias: unexpected operator
[: 255: /var/qmail/alias: unexpected operator
[: 255: /var/qmail/alias: unexpected operator
! /usr/lib/sendmail is missing
...try: ln -s /var/qmail/bin/sendmail /usr/lib/sendmail
! /usr/sbin/sendmail is missing
...try: ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail


I am not sure why it is complaining about send mail being abscent should I do "ln -s /var/qmail/bin/sendmail /usr/lib/sendmail" or is there something else wrong here?
Daemontools and rc.local complaints are understandable given the differences in my daemontools, but I am not even sure why it is checking for something is rc.local.
I'm also not sure what the unexpected operator thing is as I didn't change anything else besides "/service" in the script, and it does it even when I run the original version of the script, is there an error in this script? http://lifewithqmail.org/inst_check
And when I run the script like "bash ./inst_check" I get the same thing except for those lines:
inst_check: line 247: [: /var/qmail/alias: binary operator expected
inst_check: line 247: [: /var/qmail/alias: binary operator expected
inst_check: line 247: [: /var/qmail/alias: binary operator expected


And I have a couple questions\observations that I noticed when uninstalling before this install that might be important:
there is this directory with stuff in it:
root@themis:/usr/share/perl5/Mail/Mailer# ls
qmail.pm  rfc822.pm  sendmail.pm  smtp.pm  testfile.pm

Should I have deleted that? I don't remember installing this in install2, but it has a qmail.pm file. I ended up just leaving this directory as it was.

in my /usr/bin there are the following files:
mail-lock
mail-touchlock
mail-unlock
run-mailcap
Are they from qmail? I wasn't able to find anything on such, if not, will they interfere with the running of qmail?

permissions:
root@themis:/etc# ls -l /var/qmail/supervise/qmail-send/log
total 8
-rwxr-xr-x 1 root root   89 2010-05-15 18:02 run
drwx------ 2 root root 4096 2010-05-15 20:03 supervise
root@themis:/etc# ls -l /var/qmail/supervise/qmail-smtpd/log
total 8
-rwxr-xr-x 1 root root   94 2010-05-15 18:09 run
drwx------ 2 root root 4096 2010-05-15 20:03 supervise

root@themis:/var/log/qmail# ls -l /etc/service
total 0
lrwxrwxrwx 1 root root 31 2010-05-15 18:11 qmail-send -> /var/qmail/supervise/qmail-send
lrwxrwxrwx 1 root root 32 2010-05-15 18:11 qmail-smtpd -> /var/qmail/supervise/qmail-smtpd

root@themis:/var/log/qmail# ls -l /var/qmail/supervise/
total 8
drwxr-xr-x 4 root root 4096 2010-05-15 18:11 qmail-send
drwxr-xr-x 4 root root 4096 2010-05-15 18:11 qmail-smtpd

root@themis:/var/log/qmail# ls -l /var/qmail/supervise/qmail-send/
total 12
drwxr-xr-x 3 root root 4096 2010-05-15 18:11 log
-rwxr-xr-x 1 root root   30 2010-05-15 18:00 run
drwx------ 2 root root 4096 2010-05-15 19:31 supervise


qmail processes:
root@themis:/home/joel# ps -ef | grep qmail
root      1036   779  0 18:11 ?        00:00:00 supervise qmail-smtpd
root      1038   779  0 18:11 ?        00:00:00 supervise qmail-send
qmails   19454  1038  0 19:45 ?        00:00:00 qmail-send
root     19456 19454  0 19:45 ?        00:00:00 qmail-lspawn ./Maildir/
qmailr   19457 19454  0 19:45 ?        00:00:00 qmail-rspawn
qmailq   19458 19454  0 19:45 ?        00:00:00 qmail-clean
root     21293 21210  0 19:59 pts/0    00:00:00 grep qmail


>You probably now have two instances of daemontools!? >Kill one. You should not be using /service
I am not using the service directory anymore it doesn't even exist and I made sure to remove all the daemon tools programs (from install2) from /usr/local/bin


>Mind you, running a mail system is not for
>'non-software-engineer windows users' and in fact, that is >not something a 'user' should do at all.
>If you want to run a mail system, you better be prepared >to learn some system admin stuff.
My previous comment was that ubuntu has done alot for converting people to GNU\Linux even though it may be bloated.
I was referring to the ubuntu distribution as a whole. But now I realize that ubuntu server is a very different beast from ubuntu desktop (I had previously assumed that ubuntu server must be easier to use just like their desktop). I am an interning software engineer (although I am still in college) but I am new to GNU\linux. I am not an admin but am willing to learn. I would muck around some more but I have other stuff I need to do today. I hope you don't mind if I send what I have and ask for suggestions on how to get the log stuff working. (or any other advice you have, especially if you know much about ubuntu server 10.04 LTS or upstart) Thanks in advance.
-Joel

Erwin Hoffmann

unread,
May 16, 2010, 6:55:47 AM5/16/10
to
Hi,

this is just a FYI.

For those you want to run Daemontools (in particular supervise) under
Ubuntu +9, the following replacement for the inittab entry works:

Generate unter /etc/init a file like:

* "svscanboot.conf" (the extension 'conf' is mandatory).


With the following content:

+-----------------------------------+
# svscanboot

start on runlevel [2345]

stop on shutdown

respawn
exec /command/svscanboot
+-----------------------------------+

This will start "svcscanboot" in the run-level mentionend in brackets.

The "stacked" run-level form (as found on the Web) does not work
anymore.

Upstart will automaticaly 'fire up' svscanboot as soon as this file
exists. Otherwise use:

* initctl start svscanboot

Now you can setup dnscache, qmail-send, qmail-smtpd as usual.

regards.
--eh.


Am Samstag, den 15.05.2010, 20:44 -0400 schrieb Joel:

--
Dr. Erwin Hoffmann | FEHCom | http://www.fehcom.de

signature.asc

Bob Hutchinson

unread,
May 16, 2010, 8:09:43 AM5/16/10
to
On Sunday 16 May 2010, Erwin Hoffmann wrote:
> Hi,
>
> this is just a FYI.

I recently had to set up a ubuntu 10.4 server (not qmail but with daemontools)
and daemontools-run created the entry under /etc/init but did not start the
svnboot process. This got going after a server reboot with /etc/service in
place. I also installed dbdns (a debian flavoured djbdns) and dnscache-run and
it all 'just works'. It probably is possible to restart the init system
without a full reboot but I was in a hurry at the time and had just put a new
kernel in so a reboot was due anyway.
I normally prefer stock Debian stable for my installs but this was a new Dell
box and getting NIC and RAID drivers going was too precarious for a box that
is now in a remote rack.

In all I'm quite impressed with ubuntu 10.4, a bit too 'bleeding edge' for my
taste but running very well so far (It's a Coldfusion box)

Hope this helps someone.


--
-----------------
Bob Hutchinson
Midwales dot com
-----------------

Christopher Chan

unread,
May 16, 2010, 8:52:20 PM5/16/10
to
On Sunday, May 16, 2010 08:44 AM, Joel wrote:
> I've been really busy the past couple weeks, but now I've finally sat
> down and looked at this again. I was thinking of switching to debian
> server because of all the crap I hear about ubuntu server but the
> problem is that my server is very far away and my friend, who maintains
> my server, was soon to be going on a long visit to China (he's there
> now). So I decided to have him stick with ubuntu because I wasn't sure
> if he could get all the installation and issues with debian worked out
> in that time. Anyways im now using:
> Ubuntu 10.04 LTS

/me shudders


>
> I did my best to go through and uninstall my previous qmail installation
> (install2) where I used "the qmail handbook", then I upgraded from
> Ubuntu server 9.04 to 10.04, and after I upgraded I tried the install
> again using the "life with qmail" guide... again (i used it install1 as
> well). I will refer to this current attempt at installing as "install3"
>
> Some things I did during the uninstal: I noticed that there were
> symbolic links to a nonexistent /etc/service file in my / directory:
> root@themis:/# ls -l service
> lrwxrwxrwx 1 root root 12 2010-05-04 21:05 service -> /etc/service

--snip--

> So I deleted those.

-- snip install of upstart --

> I also installed daemontools and daemontools-run with
> "apt-get install daemontools"
> "apt-get install daemontools-run"

--snip installation of Lucid daemontools package details--

>
> Before I started qmail I tested to see if svscan was running (just in
> case this was something I should know)
> root@themis:/var/qmail/supervise/qmail-smtpd/log# ps -ef | grep svscan
> root 760 1 0 17:33 ? 00:00:00 /bin/sh /usr/bin/svscanboot
> root 779 760 0 17:33 ? 00:00:00 svscan /etc/service

> root 1131 992 0 18:16 pts/0 00:00:00 grep svscan


>
> For aliases I just replaced the example "dave" with my name since I am
> both the system and mail admin
>
> echo joel > /var/qmail/alias/.qmail-root
> echo joel > /var/qmail/alias/.qmail-postmaster
> ln -s .qmail-postmaster /var/qmail/alias/.qmail-mailer-daemon
> ln -s .qmail-postmaster /var/qmail/alias/.qmail-abuse
> chmod 644 /var/qmail/alias/.qmail-root /var/qmail/alias/.qmail-postmaster
>
> I finally did qmailctl start and I checked the install:
>
> root@themis:/etc/service# qmailctl stat
> /etc/service/qmail-send: up (pid 1145) 506 seconds
> /etc/service/qmail-send/log: up (pid 5075) 1 seconds
> /etc/service/qmail-smtpd: up (pid 5076) 1 seconds

> /etc/service/qmail-smtpd/log: up (pid 5074) 1 seconds
> messages in queue: 0


> messages in queue but not yet preprocessed: 0

Output of 'ps auxww|grep readpr' please.

Output of 'cat /etc/service/qmail-send/log/run' please.

Output of 'cat /etc/service/qmail-smtpd/log/run' please.

>
--snip traces--

>
> To run inst_check I went through the script and replaced all instances
> of /service with /etc/service, although it is of course still not
> completely accurate because of daemontools differences in my installation
>

--snip--

> ! /usr/lib/sendmail is missing
> ...try: ln -s /var/qmail/bin/sendmail /usr/lib/sendmail
> ! /usr/sbin/sendmail is missing
> ...try: ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
>

Take the above suggested actions please.


>
> I am not sure why it is complaining about send mail being abscent should
> I do "ln -s /var/qmail/bin/sendmail /usr/lib/sendmail" or is there
> something else wrong here?

Just do it.


> Daemontools and rc.local complaints are understandable given the
> differences in my daemontools, but I am not even sure why it is checking
> for something is rc.local.

Script is sysvinit specific and knows nothing about upstart. That is all.


> And I have a couple questions\observations that I noticed when
> uninstalling before this install that might be important:
> there is this directory with stuff in it:
> root@themis:/usr/share/perl5/Mail/Mailer# ls

> qmail.pm <http://qmail.pm> rfc822.pm <http://rfc822.pm> sendmail.pm
> <http://sendmail.pm> smtp.pm <http://smtp.pm> testfile.pm
> <http://testfile.pm>


>
> Should I have deleted that? I don't remember installing this in

> install2, but it has a qmail.pm <http://qmail.pm> file. I ended up just


> leaving this directory as it was.

Just leave them there.


>
> in my /usr/bin there are the following files:
> mail-lock
> mail-touchlock
> mail-unlock
> run-mailcap
> Are they from qmail? I wasn't able to find anything on such, if not,
> will they interfere with the running of qmail?

No. No.


>
> permissions:
--snip --


>
> root@themis:/var/log/qmail# ls -l /etc/service

--snip--

>
>
> qmail processes:

--snip--

>
> >You probably now have two instances of daemontools!? >Kill one. You
> should not be using /service

Oops. (remembers /service -> /etc/service symlink)


> I am not using the service directory anymore it doesn't even exist and I
> made sure to remove all the daemon tools programs (from install2) from
> /usr/local/bin

K.


>
> >Mind you, running a mail system is not for
> >'non-software-engineer windows users' and in fact, that is >not
> something a 'user' should do at all.
> >If you want to run a mail system, you better be prepared >to learn
> some system admin stuff.
> My previous comment was that ubuntu has done alot for converting people
> to GNU\Linux even though it may be bloated.

As sysadmins, we could care less about desktop users being converted to
use Linux. Desktop users should not be running a mail server. We have
enough problems already dealing with spam spew from infected desktops.
We don't need misconfigured mail servers on desktops being added to the
pool of spam sources.


> I was referring to the ubuntu distribution as a whole. But now I realize
> that ubuntu server is a very different beast from ubuntu desktop (I had
> previously assumed that ubuntu server must be easier to use just like
> their desktop). I am an interning software engineer (although I am still
> in college) but I am new to GNU\linux. I am not an admin but am willing
> to learn. I would muck around some more but I have other stuff I need to
> do today. I hope you don't mind if I send what I have and ask for
> suggestions on how to get the log stuff working. (or any other advice
> you have, especially if you know much about ubuntu server 10.04 LTS or
> upstart) Thanks in advance.

I don't mind doing a little hand holding now and then but I sure am not
upgrading to Lucid any time soon even if the server side of things is
probably much more stable. I'd rather wait for Centos 6 or install
Centos 5. But don't let my preferences deter you. Just be determined to
learn if you want to use Ubuntu...

Oh, btw, you better start learning mailing list etiquette if you plan to
continue posting. Stuff like no top posting, replies under relevant
section, trimming. Things that I have done in this post.

Christopher


> -Joel
>
> On Tue, May 4, 2010 at 11:01 PM, Christopher Chan

--

0 new messages