|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I'm having a problem with Qmail..
Hey everyone,
I just recently started having a problem with Qmail, it seems that nothing is being sent or received correctly. I'm no expert in this area, infact it was already set up for me and working when I got the server so I assume I broke it Everything seems to get stuck in the queue. I also noticed that emails sent under the PHP function mail() are not being received. I believe the problem was either caused by using Webmin to modify Qmail settings or by accidently changing the permissions on some of the queue directories. I found this about using Webmin with Qmail: "The webmin module seems to have a bit of a problem interacting with the running qmail process. If you delete items from the queue using webmin it tries to restart the qmail-send process which is still running via the alternate boot script. This causes the service monitor to spaz out and try to restart qmail-send every second and writes a long entry every time it does. You can tell when this happens because it sounds like someone is playing ping-pong on the hard drive. I suggest you avoid deleting things from the queue this way for now. Messages will leave the queue eventually anyway." Here's what I know if it will help solve this: -If I run /var/qmail/bin/qmail-qstat it says that all the messages are in the queue and the same number of messages are not yet preprocessed. - The following qmail related processes are running: qmail-send under user qmails splogger qmail under user qmaill qmail-lspawn ./Maildir/ under user root qmail-rspawn under user qmailr qmail-clean under user qmailq Anyways I guess in short my problem is emails are stuck in the Queue and my questions are how do I fix that? and Does anyone know what the permissions on all of the directories under the Qmail queue directory are meant to be? Thank you very much for helping me out, Jake R. |
|
#2
|
||||
|
||||
|
You should never delete things from the qmail queue. Just let them sit there. If they aren't delivered, qmail will eventually give up and bounce the message. But if you feel so inclined to delete files from the queue, you should use a specialized utility for this like "qmHandle" which is a simple perl script you can google for that will help you manage the queue using the command line.
Here's the permissions you need.... -rws--x--x 1 qmailq qmail 12708 Nov 14 12:35 qmail-queue To get that, you need to do "chmod 4711". If you think the queue is beyond help, you'll need to try using a qmail repair tool to get things back in order. There are programs you can download from qmail.org that you can use for repairing the queue. I recommend searching the qmail.org homepage for the one written by Charles Cazabon. Do you have a qmailctl script? Maybe go to the command line and run "locate qmailctl" and see if you have it. This is a good utility for starting and stopping qmail, and you can do "qmailctl stat" to see if qmail is running and also see the number of messages sitting in the queue. Also do "qmailctl queue" to view all the basic info of messages stored in the queue. Don't worry about messages piling up. It's OK. When qmail comes back online, it will keep trying to deliver them as usual. If you want to be sure it's working, try qmailctl flush and it will start trying to deliver everything in the queue right away. Hope that helps. |
|
#3
|
|||
|
|||
|
Ok I tried that..
There are zero messages in the queue according to that script and if I send a new message there are still none but if I look there manually there are a bunch stuck in /var/qmail/queue/mess and /var/qmail/queue/todo including the ones I just sent.
I don't know that much about qmail like I said but is qmailctl not picking up on those messages because they're not in queue/info/? Anyone know why that might be? |
|
#4
|
||||
|
||||
|
Hey man... first thing... I told you wrong on those permissions. Sorry bout that. Here's the correct stuff...
drwxr-x--- 11 qmailq qmail 1024 Apr 16 15:04 queue and under queue.... drwx------ 2 qmails qmail 1024 Jul 9 19:12 bounce drwx------ 201 qmails qmail 3072 Mar 3 19:00 info drwx------ 2 qmailq qmail 2048 Jul 9 19:12 intd drwx------ 201 qmails qmail 3072 Mar 3 19:00 local drwxr-x--- 2 qmailq qmail 1024 Mar 3 19:00 lock drwxr-x--- 201 qmailq qmail 3072 Mar 3 19:00 mess drwx------ 2 qmailq qmail 1024 Jul 9 19:12 pid drwx------ 201 qmails qmail 3072 Mar 3 19:00 remote drwxr-x--- 2 qmailq qmail 2048 Jul 9 19:12 todo So what you're saying is... when you run /var/qmail/bin/qmail-qstat it says there are a whole bunch of messages in the queue... but when you run "qmailctl stat" it shows there are none??? If that's the case, then your script must be hosed up. Maybe try to edit your qmailctl script and see what it says for "stat". Maybe a good idea to paste it here and let's have a look. If you don't care too much about the messages in your queue, it's probably easiest to just rebuild the queue completely from the source code. I also think you may want to try this utility... http://www.netmeridian.com/e-huss/queue-fix.tar.gz This is good for fixing queue permissions and directories. When you get it installed you can run... queue-fix -N /var/qmail/queue The -N option will show you what it's going to do without actually doing it. Or you can use -i instead of -N. This will run interactively and prompt you before making each change. Or you can run it without any options and it will just fix everything and report on what it did. |
|
#5
|
|||
|
|||
|
install queue-fix-1.4
i get some errors during compile.
my distrib is RH9 in conf-cc i have "gcc -O2" in conf-ld i have "gcc -S" at the end here's what i get : queue-fix.o(.text+0x194): In function `check_item': : undefined reference to `errno' queue-fix.o(.text+0x411): In function `check_item': : undefined reference to `errno' queue-fix.o(.text+0x653): In function `check_item': : undefined reference to `errno' queue-fix.o(.text+0xc62): In function `rename_mess': : undefined reference to `errno' substdio.a(substdi.o)(.text+0x2c): In function `oneread': : undefined reference to `errno' substdio.a(substdo.o)(.text+0x43): more undefined references to `errno' follow collect2: ld returned 1 exit status make: *** [queue-fix] Error 1 any help would be appreciated :-) thx |
|
#6
|
||||
|
||||
|
ahhh, the old errno problem. This has always been a problem because of RH changing the way errno works. I'm assuming you used the link above to queue-fix. I recommend getting version 1.4 and download/unpack. Now go into the directory and you'll need to modify this file...
In the file error.h look for extern int errno;and change it to #include <errno.h>. Now run it and see what you get. |
|
#7
|
|||
|
|||
|
it worked fine !
thx |
|
#8
|
|||
|
|||
|
I was also having that problem..
I was having the same problem as doudblast with getting that setup, thanks for that explination
I let the script re-create the entire queue and everything was cleared out of it. However I'm experiencing another problem related to this. When ever an email is received it keeps generating copys of it. For example an email was just received but instead of delivering it, it keeps on making copys of it and ignoring all other messages. I stopped Qmail since there's now around 5,000 copys of the same email (and no it wasn't sent that many times, it's happening with all the messages). Any ideas on this one? Maybe it didn't re-create the queue correctly.. |
|
#9
|
||||
|
||||
|
>> but instead of delivering it, it keeps on making copys of it and ignoring all other messages
Where do you see the copies building up? In the queue? And what do you mean it's "ignoring" the other messages? You mean the queue still isn't delivering them? If your messages are just sitting in the queue and not being moved to user's Maildir's, then your qmail installation is broken. You need to do some basic troubleshooting. You may want to do ps -ef and post the output for us to see. Try running this command when qmail is up and again when qmail is down and post the results both ways. Also do a qmailctl stat and let's see what the processes are doing when qmail is running. All processes should be up for more than a second. I also recommend using Dave Sill's inst_check script. You can get a copy on www.lifewithqmail.org and run it to see if there are any permissions or ownership problems with your directories. If you think the queue is still hosed up, you should try letting the install recreate it from scratch. Do this... qmailctl stop svc -d /service/qmail-* (just to be sure everything is down) rm -rf /var/qmail/queue cd /usr/local/src/qmail-1.03 (or wherever you unpacked the qmail source) make setup check Now the queue should be rebuilt completely from the way it was when you started. Do a qmailctl start. Once you've done that, check out the qmail-send logfile and see if there were any errors about the queue. |
|
#10
|
|||
|
|||
|
Tried Examples
Thank you for the information you posted in this thread. Very helpful, however after trying every suggestion I am still plaqued with the same problem.
instcheck: warning: .../bin/qmail-queue has wrong owner instcheck: warning: .../bin/qmail-queue has wrong permissions I have tried manually changing each permission and ownership based on the examples in the thread, with no success. I ran the queue-fix as suggested. Once configured properly it say fix complete however no change in make setup check status. Any help would be much appreciated |
|
#11
|
||||
|
||||
|
Did you try the last solution I mentioned in my last post where you delete the queue completely and run "make setup check"? I realize it's a last resort because whatever is in your queue is going to be lost, but it's an easy way to restore it to the "factory defaults" so to speak.
|
|
#12
|
|||
|
|||
|
Thank you for responding so quickly. No I did not try that. I was afraid that I would really make it worse . Most of the other people posting seemed to have multiple errors. I had only two so I hoped that I was almost there. I will try that now.
|
|
#13
|
||||
|
||||
|
Also noteworthy.... You should never tinker with the queue. If you go deleting files from the queue manually, you will most certainly screw it up. One possible idea is to make the queuelifetime variable very small. For example, if you have a bunch of crap in your queue and you just want to purge it completely an instantly, you can set your queuelifetime variable to a very small number. Like so...
echo '5' > /var/qmail/control/queuelifetime Then restart qmail with "qmailctl restart" and by the time qmail counts to 5, it will try to deliver the messages in the queue and if they fail, they will bounce to the postmaster account. Now set your queuelifetime back to normal... echo '604800' > /var/qmail/control/queuelifetime which is the standard of 1 week. Mine is set for 300000 which is about 40 hours or so. Don't forget to restart qmail. You should also consider getting something called qmHandle which will allow you to delete stuff from the queue easily. But after you have been admin'ing a box for a while, you will ultimately decide that it's never worth deleting from the queue. qmail will take care of everything in time. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Mail Server Help > I'm having a problem with Qmail.. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|