LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   QMAIL ! multilog: fatal: (https://www.linuxquestions.org/questions/linux-newbie-8/qmail-multilog-fatal-207902/)

azul79 07-21-2004 11:23 AM

QMAIL ! multilog: fatal:
 
hi! I'm a new slackware user.. and I'm trying to run the qmail server....
I 've been running with some problems.. my actual problem is the following error message:

multilog: fatal: unable to lock directory /var/log/qmail/smtpd: temporary failure

the output of the qmail stat is this one :

root@azul:/service/qmail-smtpd/log# qmailctl stat
/service/qmail-send: up (pid 12917) 0 seconds
/service/qmail-send/log: up (pid 9224) 754 seconds
/service/qmail-smtpd: up (pid 9226) 754 seconds
/service/qmail-smtpd/log: up (pid 9228) 755 seconds
messages in queue: 0
messages in queue but not yet preprocessed: 0

and when I ask to see the process ..:

root@azul:/service/qmail-smtpd/log# ps -efa | grep qmail
root 25779 25777 0 12:14 ? 00:00:00 supervise qmail-send
root 25783 25777 0 12:14 ? 00:00:00 supervise qmail-smtpd
qmaill 9224 25782 0 13:08 ? 00:00:00 /usr/local/bin/multilog t /var/log/qmail/send
qmaild 9226 25783 0 13:08 ? 00:00:00 [tcpserver]
qmaill 9228 25784 0 13:08 ? 00:00:00 /usr/local/bin/multilog t /var/log/qmail/smtpd
qmails 13194 25779 0 13:22 ? 00:00:00 [qmail-send] <defunct>
root 13200 10296 0 13:22 pts/4 00:00:00 grep qmail

based on LWQ I should be getting another qmaild output line with the following instruction:

qmaild 13717 1185 0 17:33 ? 00:00:00 /var/qmail/bin/qmail-smtpd

this one is missing... and when I try to see where the problem is.. the above message error is what I got...
does anyone know what could be wrong?
thanks

Donboy 07-21-2004 12:58 PM

I think you should stop qmail with qmailctl stop. Now do qmailctl stat and verify that all the processes are stopped. Just for good measure, do svc -d /service/qmail-*. Now go to ps -ef and see if there are any qmail processes still trying to run. If that one is still showing <defunct> try to kill it with kill -9 pid where pid is the process ID of the defunct item. Now try to qmailctl start and see if everything is good.

You may also want to try doing a ps -ef | grep proc and see if there are any errors showing up on readproctile service errors. Normally they will just be dots, which is fine.

If you have been editing your control files through windows, you'll need to do a vi -b on each control file and delete the ^M characters you see at the end of each line.

If you're using Life with Qmail, as long as you're following everything to the letter (precision matters!) there should be no mistakes at all and everything should work fine right off the bat.

azul79 07-22-2004 07:49 AM

hey! thanks 4 your help!!
I tried what u told me.. but .. when I kill the process.. he doesn't wanna die!!!
this is what i do after stopping qmail..

root@azul:/service/qmail-smtpd/log# qmailctl stat
/service/qmail-send: down 32 seconds, normally up
/service/qmail-send/log: down 33 seconds, normally up
/service/qmail-smtpd: down 33 seconds, normally up
/service/qmail-smtpd/log: down 33 seconds, normally up
messages in queue: 0
messages in queue but not yet preprocessed: 0
root@azul:/service/qmail-smtpd/log# svc -d /service/qmail*
root@azul:/service/qmail-smtpd/log# ps -efa | grep qmail
root 1970 1968 0 Jul21 ? 00:00:00 supervise qmail-send
root 1974 1968 0 Jul21 ? 00:00:00 supervise qmail-smtpd
root 8358 906 3 09:30 pts/3 00:00:00 grep qmail
root@azul:/service/qmail-smtpd/log# kill -9 1970
root@azul:/service/qmail-smtpd/log# kill -9 1974
root@azul:/service/qmail-smtpd/log# ps -efa | grep qmail
root 8359 1968 0 09:31 ? 00:00:00 supervise qmail-send
root 8385 1968 0 09:31 ? 00:00:00 supervise qmail-smtpd
qmaild 8386 8385 0 09:31 ? 00:00:00 [tcpserver]
qmails 8436 8359 0 09:31 ? 00:00:00 [qmail-send] <defunct>
root 8442 906 0 09:31 pts/3 00:00:00 grep qmail

root@azul:/service/qmail-smtpd/log# qmailctl stat
/service/qmail-send: up (pid 8868) 700 seconds, want down
/service/qmail-send/log: down 962 seconds, normally up
/service/qmail-smtpd: down 6 seconds, normally up
/service/qmail-smtpd/log: down 962 seconds, normally up


root@azul:/service/qmail-smtpd/log# ps -efa | grep qmail
root 8359 1968 0 09:31 ? 00:00:00 supervise qmail-send
root 8385 1968 0 09:31 ? 00:00:00 supervise qmail-smtpd
root 8901 906 0 09:45 pts/3 00:00:00 grep qmail
root@azul:/service/qmail-smtpd/log# kill -9 8359
root@azul:/service/qmail-smtpd/log# kill -9 8385
root@azul:/service/qmail-smtpd/log# ps -efa | grep qmail
root 8902 1968 0 09:45 ? 00:00:00 supervise qmail-send
qmails 8903 8902 0 09:45 ? 00:00:00 [qmail-send]
root 8905 8903 0 09:45 ? 00:00:00 qmail-lspawn ./newmode
qmailr 8906 8903 0 09:45 ? 00:00:00 [qmail-rspawn]
qmailq 8907 8903 0 09:45 ? 00:00:00 [qmail-clean]
root 8908 1968 0 09:45 ? 00:00:00 supervise qmail-smtpd
qmaild 8909 8908 3 09:45 ? 00:00:00 [tcpserver]
root 8915 906 0 09:45 pts/3 00:00:00 grep qmail


it seems as if the qmail-send.. can't die.. isn' it?

Donboy 07-22-2004 08:32 AM

Well the error you mentioned in your first post usually means supervise is already trying to run in that directory. You need to stop all qmail-related processes including svscan, supervises, anything running as "qmail" user, qmail-send, multilogs, etc. If you have trouble stopping svscan, try /etc/init.d/svscan stop. Try to kill -9 the other processes so that qmail is completely dead.

Next, you'll need to double-check directory names, owners, groups and the contents of your run scripts againt lifewithqmail. When you're satisfied that everything is in order, try starting qmail again with qmailctl start.

If after this you're still getting the error, try running... sh -x
/usr/local/sbin/qmail start
and copy/paste the output here.

One other thing that troubles me... one of your lines says this...

Quote:

root 8905 8903 0 09:45 ? 00:00:00 qmail-lspawn ./newmode
Where did you get "newmode"? I think you want Maildir or Mailbox instead. This would be controlled in your run script for qmail-pop3d. Maybe you intended for this because you're trying a custom setup, but it looked wrong to me because it sounded like you're trying to stay true to LWQ.

azul79 07-22-2004 09:08 AM

thanks 4 your help!!
I checked LWQ & the owners and permissions seems to be ok..

I tried to stop svscan.. I dont have the /etc/init.d folder.. but i tried to kill it anyway.. and after i kill it it comes to life again alone!!

with qmailctl stop i get this when i ask to see the process..

root@azul:/service/qmail-smtpd/log# ps -efa

root 21826 1 0 11:09 ? 00:00:00 /bin/sh /command/svscanboot
root 21831 21826 0 11:09 ? 00:00:00 svscan /service
root 21832 21826 0 11:09 ? 00:00:00 readproctitle service errors: ..................
root 21836 21831 0 11:09 ? 00:00:00 supervise log
root 21837 21831 0 11:09 ? 00:00:00 supervise qmail-smtpd
root 21847 21831 0 11:09 ? 00:00:00 supervise qmail-send
root 21848 21831 0 11:09 ? 00:00:00 supervise log

and the output of the sh -x command is ..

root@azul:/etc# qmailctl start
Starting qmail
root@azul:/etc# sh -x /usr/local/sbin/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=102
+ echo 'Starting qmail'
Starting qmail
+ svok /service/qmail-send
+ svc -u /service/qmail-send /service/qmail-send/log
+ svok /service/qmail-smtpd
+ svc -u /service/qmail-smtpd /service/qmail-smtpd/log
+ '[' -d /var/lock/subsys ']'
+ touch /var/lock/subsys/qmail
+ exit 0


thanks again!

azul79 07-22-2004 09:14 AM

and..also..
the ./newmode.. I dont know why it appears there!!
because.. I have Mailbox as my defaultdelivery

Donboy 07-22-2004 10:28 AM

If you kill svscan manually, like with kill -9 it will be respawned within about 2 or 3 seconds by svscanboot.

Sounds like svscan is located somewhere else on your machine... maybe /etc/rc.d/init.d/svscan? I think we may be having some communication troubles because I don't know slack very well and how everything is setup. You may want to use "find" or "locate" to see where this file is stored. Sounds like you probably need to know where these init scripts are located anyhow, becasue these are what programs are launched when the machine boots, and at some point, you will need to know where they are.

Once you find your svscan command, you may want to try stopping it like I described above with "svscan stop". If you still can't find svscan, maybe try kill `cat /var/run/svscan.pid` which should kill it the old fashioned way. Note doing this, you'll also need to run svc -dx /service/* and svc -dx /service/*/log to be sure everything dies.

If none of this seems to be working, you can go into /etc/inittab (I sure hope you have this!) and look for the line that calls svscan. Usually this is at the bottom of the inittab file and you can just put a # in front of the line to comment it out. Now do kill -1 1 (note, those are both one's, not L's) which will restart process #1 which is init. This causes the inittab file to be reloaded. Now kill the old svscan processes with kill -9. Also run svc -dx /service/* and also for /service/*/log to be sure everything is dead. Also do ps -ef and be sure all qmail processes are dead and are truly dead and being respawned. Hopefully they should all kill themselves by now. If you see any defunct, try killing those too with kill -9. This should leave you in a state where qmail is totally dead. Now uncomment the inittab line and "kill -1 1" again, and svscan should come back up. Now you should be able to run qmailctl start and qmail should launch normally. Now let me know what you get from ps -ef and qmailctl stat.

One other thing that comes to mind... you may want to check your symlinks located under /service and be sure there are no duplicates... like none that are pointing twice to the same target.

I'm afraid if you're still getting errors after this, you may want to step back through life with qmail another time from scratch. LWQ has been around for several years now and most all of the bugs have been worked out, so most everyone going through it should come off without any problems whatsoever because Dave has done a wonderful job of fixing the bugs in his instructions.

You may also want to consider the first link shown in my signature. This is a very very good mail server howto. It's a little more involved than LWQ, has a lot more instructinos, but also gives you a lot more features (bells and whistles mostly) for your qmail system. If you're serious about running a mail server for numerous users, I think you will find that LWQ all by itself just isn't enough, but works wonderfully for small mail servers with just a few domains hosted.

azul79 07-22-2004 11:53 AM

I know my configuration scripts are in /etc/rc.d/ but there' s no svscan script in there o rin my /etc/ file..

i tried to stop it as u said.. i located it in :

root@azul:/var# locate svscan
/usr/local/bin/svscanboot
/usr/local/bin/svscan

but it didnt work..
so I did it with the inittab file..
the output of the qmailctl stat is this:

root@azul:/etc# qmailctl start
Starting qmail
root@azul:/etc# qmailctl stat
/service/qmail-send: up (pid 489) 1 seconds
/service/qmail-send/log: up (pid 344) 28 seconds
/service/qmail-smtpd: up (pid 345) 28 seconds
/service/qmail-smtpd/log: up (pid 349) 28 seconds
messages in queue: 1
messages in queue but not yet preprocessed: 1

the message in queue.. is just 1 i tried to send as testing the mail..

and the output of ps is:

root@azul:/etc# ps -efa | grep qmail
root 340 338 0 13:51 ? 00:00:00 supervise qmail-send
root 342 338 0 13:51 ? 00:00:00 supervise qmail-smtpd
qmaill 344 341 0 13:51 ? 00:00:00 /usr/local/bin/multilog t /var/log/qmail/send
qmaild 345 342 0 13:51 ? 00:00:00 [tcpserver]
qmaill 349 347 0 13:51 ? 00:00:00 /usr/local/bin/multilog t /var/log/qmail/smtpd
qmails 974 340 6 13:53 ? 00:00:00 [qmail-send] <defunct>


as u can see here.. i dont see. qmailr, qmailq and qmaild [/var/qmail/bin/qmail-smtp] and qmail-lspawn [./Mailbox] . up....

i checked the links on /service.. and they seem ok.. just 1 link each..
i followed LWQ. .. and i 've reread it many times and i still can not find the problem..
something strange is that the qmail-spawn... (./Mailbox).. sometimes when i ask for the proc.. is up.. and sometimes not..
it seems to me .. as if the qmail-send and qmail-smtpd are the problem..
i tried this .. and look what happens...

root@azul:/service/qmail-smtpd# svc -d
root@azul:/service/qmail-smtpd# ./run
tcpserver: fatal: unable to bind: address already used

and..

root@azul:/service/qmail-send# svc -d
root@azul:/service/qmail-send# ./run
alert: cannot start: unable to open mutex

thank u very very much 4 your help!!!

Donboy 07-22-2004 12:12 PM

Quote:

root@azul:/service/qmail-smtpd# svc -d
You didn't specify anything to bring down. The svc is asking for "service" and the -d is telling it to bring something down. Likewise using a -u is bringing something up. So the only thing you missed is telling it what to bring down. So when you did /run manually, it couldn't start another instance of qmail because you already have one running on that port, so naturally it says you can't bind to the address because it's being used by another qmail process that is running.

Here's another way that worked for me.

Try this... I commented out the line in inittab as we discussed and then at the command line, run init q. This should reload the inittab file and kill all the children under svscan and should automatically kill qmail processes too. When I did that on mine, all of qmail was killed.

Now do the reverse and it should come back up by itself too.

Donboy 07-22-2004 12:14 PM

The correct syntax is...

svc -d /service/*
svc -d /service/*/log

Running qmailctl stat afterwards should show you what's up.

Donboy 07-22-2004 12:27 PM

By the way... I think we're getting to the poiint where you should post your run scripts. There may be something in there you've overlooked... like if you use the letter O instead of a zero it will croak. Did you try using the troubleshooting section of LWQ? There is a script in there that checks for obvious problems.

azul79 07-22-2004 12:34 PM

hey!! thanks 4 answer so fast!
i did wat u told me..
this is the output of qmailctl stat

root@azul:/var/qmail# svc -d /service/*
root@azul:/var/qmail# svc -d /service/*/log
root@azul:/var/qmail# qmailctl stat
/service/qmail-send: down 17 seconds, normally up
/service/qmail-send/log: down 11 seconds, normally up
/service/qmail-smtpd: down 18 seconds, normally up
/service/qmail-smtpd/log: down 11 seconds, normally up
messages in queue: 1
messages in queue but not yet preprocessed: 1

and..

root@azul:/etc# ps -efa | grep qmail

root 12275 12273 0 14:34 ? 00:00:00 supervise qmail-send
root 12277 12273 0 14:34 ? 00:00:00 supervise qmail-smtpd
qmaill 12709 12276 1 14:39 ? 00:00:00 /usr/local/bin/multilog t /var/log/qmail/send
qmaild 12712 12277 2 14:39 ? 00:00:00 [tcpserver]
qmaill 12714 12280 1 14:39 ? 00:00:00 /usr/local/bin/multilog t /var/log/qmail/smtpd
root 12733 15453 0 14:39 pts/2 00:00:00 grep qmail
root 12734 12275 0 14:39 ? 00:00:00 [qmail-start]
root 12736 12734 0 14:39 ? 00:00:00 qmail-lspawn ./Mailbox

root@azul:/etc# ps -efa | grep qmail

root 12275 12273 0 14:34 ? 00:00:00 supervise qmail-send
root 12277 12273 0 14:34 ? 00:00:00 supervise qmail-smtpd
qmaill 12709 12276 0 14:39 ? 00:00:00 /usr/local/bin/multilog t /var/log/qmail/send
qmaild 12712 12277 0 14:39 ? 00:00:00 [tcpserver]
qmaill 12714 12280 0 14:39 ? 00:00:00 /usr/local/bin/multilog t /var/log/qmail/smtpd
qmails 12844 12275 6 14:39 ? 00:00:00 [qmail-send] <defunct>

as u can see.. what bothers me.. is that.. some services of qmail (as qmailq , qmailr & qmaild) dont get up... and here u can see what i was telling u about the qmail-lspawn.. the first time it gets up.. but not the second one.. u see what i mean?

azul79 07-22-2004 12:44 PM

yes! i tried the inst_check script
and i solved some..
but now..i thoght that when everything is ok.. it shiçould say sth,, but it doesnt..
it just gives me another #

root@azul:~/qmail# sh inst_check
root@azul:~/qmail#

just nothing..

Donboy 07-22-2004 01:26 PM

You say it "solved some"? What kind of stuff did it find?? Also, you should try looking at the ps output a little more if you have changed some stuff. There may be new errors showing in your error logs too.

Also, I'm a little confused about the two times you ran ps and posted the output. What I mean is... you ran the command then ran it again. Is that first one showing what it looks like with everything down and the second output is with everything running?

If you completely stop qmail then run your ps output again, you should see NO processes running as a qmail userid. You should see some processes running as root and that's fine. These will be mostly those things running supervised. The stuff running as qmail user id's are running as those ID"s because your run scripts tell them to run as that user. If you've got processes owned by qmail user ID's running when qmail is stopped, then something is hosed up.

azul79 07-23-2004 08:26 AM

the problems i solved with the inst_check were.. a link i was missing.. and an owner file problem..
what im trying now is to install it again.. may i'm missing sth i dont realise..
I hope this time .. not having these problems!!
thank u very much 4 your help!

azul79 07-23-2004 09:35 AM

i reinstalled qmail.. and i still have errors!!
remember what u told me yesterday... about the syntax of the svc command..
well .. im following LWQ . and when it says to check for errors in the installation.. it tells u to do this..:

# ps -efl | grep "service errors" | grep -v grep

my out put to that is this :

root@azul:~/qmail# ps -efl | grep "service errors" | grep -v grep
0 S root 31291 31288 0 69 0 - 333 pipe_w 10:47 ? 00:00:00 readproctitle service errors: ...ail/smtpd: access denied?multilog: fatal: unable to lock directory /var/log/qmail: access denied?multilog: fatal: unable to lock directory /var/log/qmail/smtpd: access denied?multilog: fatal: unable to lock directory /var/log/qmail: access denied?multilog: fatal: unable to lock directory /var/log/qmail/smtpd: access denied?multilog: fatal: unable to lock directory /var/log/qmail: access denied?

so.. after that.. LWQ tells u can try this.:

cd /service/qmail-smtpd/log
svc -d .
./run

so i tried it
and this is what i got

root@azul:/service/qmail-smtpd/log# svc -d
root@azul:/service/qmail-smtpd/log# ./run
multilog: fatal: unable to lock directory /var/log/qmail/smtpd: temporary failure

i know u told me i must specify sth to the svc command.. but it tells me error..

do u think this is an owner file problem?

Donboy 07-23-2004 10:21 AM

Yep.. /var/log/qmail - access denied is most definitely a ownership/permissions problem. You need to chown qmaill /var/log/qmail /var/log/qmail/smtpd. The inst_check script should have caught this error and asked you to fix it.

After you change that stuff, you should reboot the system and it will wipe out your "readproctile" errors. If there are none, it will just be a bunch of dots. If there are new errors, they will show up there. Hopefully you will not get the same error again.

azul79 07-23-2004 10:38 AM

yes!! finally!!!!!!!!!!!!! it was an owners problem!!
the thing is that LWQ doesnt tell u that /var/qmail/supervise and all in it needed to be owned by qmaill as well

this is what i get now:

root@azul:/var/log/qmail# qmailctl stat
/service/qmail-send: up (pid 975) 982 seconds
/service/qmail-send/log: up (pid 978) 982 seconds
/service/qmail-smtpd: up (pid 979) 982 seconds
/service/qmail-smtpd/log: up (pid 981) 982 seconds
messages in queue: 0
messages in queue but not yet preprocessed: 0
root@azul:/var/log/qmail# ps -efa | grep qmail
root 892 890 0 12:26 ? 00:00:00 supervise qmail-send
root 894 890 0 12:26 ? 00:00:00 supervise qmail-smtpd
qmails 975 892 0 12:26 ? 00:00:00 [qmail-send]
qmaill 978 893 0 12:26 ? 00:00:00 /usr/local/bin/multilog t /var/log/qmail/send
qmaild 979 894 0 12:26 ? 00:00:00 [tcpserver]
qmaill 981 897 0 12:26 ? 00:00:00 /usr/local/bin/multilog t /var/log/qmail/smtpd
root 984 975 0 12:26 ? 00:00:00 qmail-lspawn ./Mailbox
qmailr 985 975 0 12:26 ? 00:00:00 [qmail-rspawn]
qmailq 987 975 0 12:26 ? 00:00:00 [qmail-clean]
root 1040 16278 0 12:43 pts/3 00:00:00 grep qmail
root@azul:/var/log/qmail# ps -efl | grep "service errors" | grep -v grep
0 S root 891 888 0 69 0 - 333 pipe_w 12:26 ? 00:00:00 readproctitle service errors: .................................................................................................... ...............................................................

it is ok .. isn't it??

azul79 07-23-2004 10:41 AM

though.. i still dont understand.. why when i do this..

root@azul:/service/qmail-smtpd/log# svc -d
root@azul:/service/qmail-smtpd/log# ./run
multilog: fatal: unable to lock directory /var/log/qmail/smtpd: temporary failure


i still have that error message--

Donboy 07-23-2004 10:54 AM

>> LWQ doesnt tell u that /var/qmail/supervise and all in it needed to be owned by qmaill

That's because they don't need to be. The directory /var/qmail/supervise does need to be owned by qmaill, but this is created by the make/install command. The stuff under there can be owned by root. However, LWQ also tells you to chmod the run scripts to 755 which makes the executable by any user, so therefore they CAN be owned by root and still be executed by any user.

Everything looks good now. Your readproc is showing all dots, and your services are up for more than 1 second, so you're in business. Glad you got it working. Have fun!

Donboy 07-23-2004 11:16 AM

You should go back and look at LWQ... you're missing one very small but important thing... there is a single dot right beside svc -d in that statement. You should also look at "2.8.2.1. The qmailctl script" and look at the start and stop sections of that script. You'll notice that it's just using "svc -u /path/to/service" and "svc -d /path/to/service" which is really the correct usage for that command. I don't like Dave's usage of it where he uses only a single dot... this confuses people too much, I think.

azul79 07-23-2004 11:56 AM

i checked" svc -d . "
u were right! i wasnt writting it! :P
thanks!
theres one thing that still bothers me.. and its that .. accordingly to LWQ.. another qmaild server should be starting up..

qmaild 13717 1185 0 17:33 ? 00:00:00 /var/qmail/bin/qmail-smtpd

it seems as if the qmail-smtpd wouldnt be stating-- but that is not what the qmailctl stat says...
i dont realise what is happening here..

Donboy 07-23-2004 12:17 PM

Well, looking at one of your earlier posts today, you have something running under qmaild... it's tcpserver. This is probably what you're looking for. One thing... I'm surprised it only says [tcpserver]... mine says the whole command that is running, which is basically the contents of my /var/qmail/supervise/qmail-smtpd/run file that is running under qmaild user.

If you can try to telnet to your smtpd service and it works, then you're OK.

Try this...

telnet 127.0.0.1 25

Notice there is a space between the ip address and the 25 which is the port number. You should get something like this...

[root@falcon root]# telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 hostname.yourdomain.com ESMTP
helo anything
250 hostname.yourdomain.com
mail from: me@mydomain.com
250 ok
rcpt to: user@yourdomain.net
250 ok
data
354 go ahead
something blah,blah blah
.
250 ok 1090602878 qp 13724
quit
221 hostname.yourdomain.com
Connection closed by foreign host.

The helo, mail from, rcpt to, and data commands are commands you input yourself at the command line. When you're done typing the body of your message (like something, blah, blah etc) just put a single dot and hit enter to end the body section. Then type quit and the connection will be closed. Hopefully you should get all positive responses from your smtp server.

azul79 07-23-2004 12:40 PM

i did what u told me and this is my out put:

root@azul:/var/qmail/supervise/qmail-smtpd/log# telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 azul.uba.ar ESMTP
helo
250 azul.uba.ar
mail from: azul@azul
250 ok
rcpt to: root@azul
250 ok
data
354 go ahead
blabla
.
250 ok 1090604699 qp 2088
quit
221 azul.uba.ar
Connection closed by foreign host.


everything @25 seeems to be workin' i think.. though i still dont understan what i told u before..
i checked.. the run scripts..
i think what is happening is that in someway the svscan is not getting up the qmail-smtp--
i think so.. because the line i dont have seems to be calling /var/qmail/bin/qmail-smtpd
this is strange..
should qmaild be the owner of this file??
my owner is qmaill..

azul79 07-23-2004 01:12 PM

i m leaving from work now.. and i'll be on vacations next week.. can i keep asking on my return the other week?

Donboy 07-23-2004 01:27 PM

>> i did what u told me and this is my out put:

Looks perfect! Now you should have a blank email message injected into your queue. If qmail is working right, it should move that message over to root@azul's mailbox pretty quickly (seconds) after it's inserted into the queue.

>> though i still dont understan what i told u before

Not sure what you mean by this.

>> i think what is happening is that in someway the svscan is not getting up the qmail-smtp

Not sure why you feel that way. Looks like smtp is working fine. If you can check your mail using pop3 that would be a good way to test. Otherwise (like if you dont have that setup yet) you can just go to root's mailbox and look to see if the message was moved into there.

>> because the line i dont have seems to be calling...

Maybe it doesn't matter. So long as it's delivering mail from the outside to the inside, you're all good.

>> should qmaild be the owner of this file

qmaild should be the owner according to ps output. I wouldn't worry about it too much until we're sure there is a problem.

>> can i keep asking on my return the other week

Sure. Keep em coming. If I'm available I'll try to help when I can.

azul79 08-02-2004 10:08 AM

Hey !
i reinstalled qmail.. and it seemed to be workin'-- though i still have problems! :(
when i arrived @work this morning i asked for the qmailctl stat and everything was up.--
so i thought the qmail was running ok..
i sent an email and it went out .
but.. now.. when i ask for the qmailctl stat i've got this:

root@azul:/var/log/qmail/smtpd# qmailctl stat
/service/qmail-send: up (pid 10972) 446 seconds
/service/qmail-send/log: up (pid 10974) 446 seconds
/service/qmail-smtpd: up (pid 10976) 446 seconds
/service/qmail-smtpd/log: up (pid 11570) 0 seconds

and before i restarted qmail.. it told me that :

/service/qmail-smtpd/log:down - normally up

for quite a while..
it also gives me this error:

root@azul:/var/log/qmail/smtpd# ps -efa | grep qmail
qmaill 8394 8292 0 09:36 pts/0 00:00:00 /usr/local/bin/multilog t /var/log/qmail/smtpd
root 9458 9455 0 11:47 ? 00:00:00 readproctitle service errors: ...al: unable to lock directory /var/log/qmail/smtpd: temporary failure?multilog: fatal: unable to lock directory /var/log/qmail/smtpd: temporary failure?multilog: fatal: unable to lock directory /var/log/qmail/smtpd: temporary failure?multilog: fatal: unable to lock directory /var/log/qmail/smtpd: temporary failure?multilog: fatal: unable to lock directory /var/log/qmail/smtpd: temporary failure?
root 9459 9457 0 11:47 ? 00:00:00 supervise qmail-send
root 9461 9457 0 11:47 ? 00:00:00 supervise qmail-smtpd
qmails 10972 9459 0 12:08 ? 00:00:00 [qmail-send]
qmaill 10974 9460 0 12:08 ? 00:00:00 /usr/local/bin/multilog t /var/log/qmail/send
qmaild 10976 9461 0 12:08 ? 00:00:00 [tcpserver]
root 10977 10972 0 12:08 ? 00:00:00 qmail-lspawn ./Mailbox
qmailr 10978 10972 0 12:08 ? 00:00:00 [qmail-rspawn]
qmailq 10979 10972 0 12:08 ? 00:00:00 [qmail-clean]
qmaill 11732 9464 3 12:17 ? 00:00:00 [multilog] <defunct>


i don't understan why???? from one second to another it gives me this kind of message.. 'cause it didn't before!!!
i didnt change anything on mi configuration..
does anyone know what can be happening??
thanks!

Donboy 08-02-2004 02:08 PM

Can you post your qmailctl script? I suspect there is a command missing and its not stopping/starting the smtp logging process like it should.

You may also want to check the permisions on /var/log/qmail/smtpd be sure they match whatever you have for /var/log/qmail/send.

azul79 08-03-2004 10:39 AM

THANKS 4 ANSWER!!!! :)

i realised i had a zombie fooling aroun' that was botherig me..
though................. (there's always a " though! " ).
LWQ says this.. :

----------------------------------------------------------------------------------------

[dave@sparge dave]$ ps waux|grep qmail
dave 2222 0.0 0.8 836 348 p4 S 10:25 0:00 grep qmail
qmaild 351 0.0 1.0 840 400 ? S N 12:43 0:00 /usr/local/bin/tcpserver -v -x /etc/tcp.smtp.cdb -u 49491 -g 31314 0 smtp /var/qmail/bin/qmail-smtpd-
qmaild 2220 0.0 1.0 844 420 ? S N 10:25 0:00 /usr/local/bin/tcpserver -v -x /etc/tcp.smtp.cdb -u 49491 -g 31314 0 smtp /var/qmail/bin/qmail-smtpd-
qmaill 365 0.0 0.8 748 344 ? S N 12:43 0:00 splogger qmail
qmailq 368 0.0 0.7 736 292 ? S N 12:43 0:00 qmail-clean
qmailr 367 0.0 0.6 732 272 ? S N 12:43 0:00 qmail-rspawn
qmails 350 0.0 0.8 776 336 ? S N 12:43 0:00 qmail-send
root 340 0.0 0.6 724 252 ? S N 12:43 0:00 /usr/local/sbin/supervise /var/supervise/qmail-send /var/qmail/rc
root 341 0.0 0.6 724 252 ? S N 12:43 0:00 /usr/local/sbin/supervise /var/supervise/tcpserver-qmail /usr/local/bin/tcpserver -v -x /etc/tcp.smtp
root 366 0.0 0.7 736 276 ? S N 12:43 0:00 qmail-lspawn ./Mailbox
[dave@sparge dave]$

If you run qmail or qmail-smtpd under supervise, as in the example above, you should see those processes as well. And if run qmail-smtpd under tcpserver, you should see a parent tcpserver process plus an additional tcpserver process for each active incoming SMTP connectioni ! thanks 4 answer!

----------------------------------------------------------------------------------------

while my my output is:

root@azul:/etc# ps waux | grep qmail
root 18911 0.0 0.2 1336 76 ? S Aug02 0:00 supervise qmail-smtpd
root 18921 0.0 0.2 1336 76 ? S Aug02 0:00 supervise qmail-send
qmails 18932 0.0 0.8 1384 236 ? S Aug02 0:00 [qmail-send]
qmaill 18935 0.0 0.2 1352 60 ? S Aug02 0:00 /usr/local/bin/multilog t /var/log/qmail/send
qmaild 18936 0.0 0.5 1404 164 ? S Aug02 0:00 [tcpserver]
qmaill 18937 0.0 0.0 1352 20 ? S Aug02 0:00 /usr/local/bin/multilog t /var/log/qmail/smtpd
root 18938 0.0 0.1 1352 32 ? S Aug02 0:00 qmail-lspawn ./Mailbox
qmailr 18939 0.0 0.7 1348 228 ? S Aug02 0:00 [qmail-rspawn]
qmailq 18940 0.0 0.4 1344 128 ? S Aug02 0:00 [qmail-clean]


LWQ says that if i am running qmail under tcpserver (and I AM) i should see all the processes they told...
i still have a process missinig that shold be running under qmaild...:

qmaild 351 0.0 1.0 840 400 ? S N 12:43 0:00 /usr/local/bin/tcpserver -v -x /etc/tcp.smtp.cdb -u 49491 -g 31314 0 smtp /var/qmail/bin/qmail-smtpd-

this process is the one that listens @port 25... waiting for incoming conections
i sent a mail to myself and it never arrived.. I can send mails but i can not receive them!! i think that this process is the responsible for this..
i checked the permissions & owners of the supervise file

root@azul:/var/qmail# ls -l
total 40
drwxr-sr-x 2 alias qmail 4096 Jul 23 11:30 alias/
drwxr-xr-x 2 root qmail 4096 Jul 23 10:55 bin/
drwxr-xr-x 2 root qmail 4096 Jul 23 10:26 boot/
drwxr-xr-x 2 root qmail 4096 Jul 23 11:05 control/
drwxr-xr-x 2 root qmail 4096 Jul 23 10:26 doc/
drwxr-xr-x 10 root qmail 4096 Jul 23 10:26 man/
drwxr-x--- 11 qmailq qmail 4096 Jul 23 10:26 queue/
-rwxr-xr-x 1 root root 216 Jul 23 10:50 rc*
drwxr-xr-x 4 qmaill root 4096 Jul 23 11:01 supervise/
drwxr-xr-x 2 root qmail 4096 Aug 2 10:56 users/
root@azul:/var/qmail/supervise# ls -l
total 8
drwxr-xr-x 4 qmaill root 4096 Jul 23 11:02 qmail-send/
drwxr-xr-x 4 qmaill root 4096 Jul 23 15:11 qmail-smtpd/

and the run script of the qmail-smtpd is the following:

root@azul:/var/qmail/supervise/qmail-smtpd# cat run
#! /bin/sh

#Levanta tcpserver, quien maneja y espera las conexiones smtp en el puerto 25 (en vez de inetd)

exec /usr/local/bin/softlimit -m 5000000 envuidgid qmaild tcpserver -c 10 -v -p -u 1003 -g 102 0 smtp \
/var/qmail/bin/qmail-smtpd 2>&1


i did everything LWQ tells.. and still not workin'
any idea?

Donboy 08-03-2004 07:40 PM

I believe it must be because your run file doesn't look anything like what Life With Qmail shows. Yours looks totally different.

Here's what it says yours should look like...

Quote:

#!/bin/sh

QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
LOCAL=`head -1 /var/qmail/control/me`

if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z "$LOCAL" ]; then
echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in
echo /var/qmail/supervise/qmail-smtpd/run
exit 1
fi

if [ ! -f /var/qmail/control/rcpthosts ]; then
echo "No /var/qmail/control/rcpthosts!"
echo "Refusing to start SMTP listener because it'll create an open relay"
exit 1
fi

exec /usr/local/bin/softlimit -m 5000000 \
/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp /var/qmail/bin/qmail-smtpd 2>&1
One of the big differences is.... your run file only says the word "tcpserver" and does not specify the full path to tcpserver like the one does in LWQ. I think this may also be the reason your "ps" output is not showing the full information about the running process. For example, everytime I have seen your ps output, it shows something like this...

qmaild 18936 0.0 0.5 1404 164 ? S Aug02 0:00 [tcpserver]

which has caused me to scratch my head everytime I see it, but now I think I'm beginning to realize this must be the reason its showing up this way. For example.... my output looks like this...

qmaild 2817 0.0 0.0 1384 312 ? S Jul31 0:01 /usr/local/bin/tcpserver -p -R -x /home/vpopmail/etc/tcp.
cdb -u92 -g91 -v -c100 0 25

There's a little more, but this gives you the idea. The major difference is, I can see the full commands and arguments where in yours I don't.

azul79 08-04-2004 07:53 AM

i see what u say.. but i dont think thats the probelm.. 'cause i had that script before and i changed because i was in the same situation i'm now..
anyway... i changed again to the one u told me, i restarted qmail.. and still the same -- :(

do u think it might be a permission problem? here they r :

root@azul:/var/qmail/supervise# ls -la
total 16
drwxr-xr-x 4 qmaill root 4096 Jul 23 11:01 ./
drwxr-xr-x 11 root qmail 4096 Jul 23 11:01 ../
drwxr-xr-x 4 qmaill root 4096 Jul 23 11:02 qmail-send/
drwxr-xr-x 4 qmaill root 4096 Aug 4 09:52 qmail-smtpd/

root@azul:/var/qmail/supervise/qmail-smtpd# ls -la
total 28
drwxr-xr-x 4 qmaill root 4096 Aug 4 09:52 ./
drwxr-xr-x 4 qmaill root 4096 Jul 23 11:01 ../
drwxr-xr-x 3 qmaill root 4096 Jul 23 11:06 log/
-rwxr-xr-x 1 qmaill root 755 Jul 23 11:05 run*
drwx------ 2 qmaill root 4096 Aug 4 09:54 supervise/

i can not see where the problem is! ;'(

Donboy 08-04-2004 12:16 PM

Hmmm... possibly. Mine are chmod +t. They look like this...

Quote:

drwxr-xr-t 4 root root 1024 Mar 6 23:06 qmail-pop3d
drwxr-xr-t 4 root root 1024 Mar 6 23:06 qmail-send
drwxr-xr-t 4 root root 1024 Mar 6 23:06 qmail-smtpd
So just chmod +t on all of those. Also note these are all owned by root.

Then, I also have this...

Quote:

drwxr-xr-x 3 root root 1024 Mar 6 23:06 log
-rwxr-xr-x 1 root root 538 Jun 19 03:07 run
drwx------ 2 root root 1024 Jul 31 16:38 supervise
So these are also owned by root. Perms look the same tho.

kamalkakkar 12-31-2013 05:57 AM

Thanks Donboy...
your answer is very helpful. As I was having issue with my smtpd log which were not generating.
Since, I read your input and gave the same command which killed all my defunct process to get it working.

Many Thanks for saving my time.


All times are GMT -5. The time now is 06:27 AM.