The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Operating Systems
> Linux Help
|
Qmail - Mail stuck in the queue
Discuss Qmail - Mail stuck in the queue in the Linux Help forum on Dev Shed. Qmail - Mail stuck in the queue Linux Help forum discussing topics including usage, troubleshooting, modules, and distributions. Linux is an open source OS, based on UNIX.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

November 28th, 2001, 05:42 AM
|
|
Contributing User
|
|
Join Date: Apr 2001
Location: London, England
Posts: 262
Time spent in forums: 26 m 58 sec
Reputation Power: 13
|
|
|
Qmail - Mail stuck in the queue
I'm a bit of a newbie with qmail.
Emails werent going through to POP accounts on our webserver. I checked the queue with qmail-qread and there were lots of emails queued. How do I get them from the queue to their respective mailboxes? and why would this happen?
Thanks
|

November 28th, 2001, 06:10 AM
|
|
Contributing User
|
|
Join Date: Jan 2001
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Off-topic. It should be posted to Mail Server forum instead.
>> Emails werent going through to POP accounts on our webserver
Your concept doesn't make sense. Message not delivering has nothing to do with POP. qmail is mail server, not a webserver.
>> How do I get them from the queue to their respective mailboxes?
So that's a local mail delivery problem.
>> and why would this happen?
Because you either haven't told qmail which deliver method to use or the mailbox format or its permission was incorrect.
To fix this problem, you need to make sure your /var/qmail/rc file matches your local delivery method. Say you have:
#!/bin/sh
exec env - PATH="/var/qmail/bin:$PATH" \
qmail-start ./Maildir/
that is to tell qmail to deliver to /home/username/Maildir/new directory.
Since I don't know which local delivery method you have chosen, if you haven't created your /var/qmail/rc file, you need to select one from /var/qmail/boot, then copy it to /var/qmail/rc.
Anyway, you better fix this ASAP or all your messages will be bounced when its queuelifetime is reached.
There also is a maildirmake command to create the /home/username/Maildir directory automatically.
|

November 28th, 2001, 06:16 AM
|
|
Contributing User
|
|
Join Date: Apr 2001
Location: London, England
Posts: 262
Time spent in forums: 26 m 58 sec
Reputation Power: 13
|
|
|
Sorry that didn't make much sense did it:
I am running a SUSE linux box, with qmail, and vpopmail. It has been working fine up until yesterday, and has just stopped delivering to the mailboxes now. They all exist etc, and I havent chagned the config, so do I still need to look at what you mention above?
Thanks
|

November 28th, 2001, 06:39 AM
|
|
Contributing User
|
|
Join Date: Jan 2001
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
qmail is highly configurable, so without sufficient info from you, there is no way to figure out what the problem was.
1) How many domains do you have?
2) Have you specified --enable-default-domain when compiling vpopmail?
3) What dirs can you see in /home/vopmail/domains right now? If you don't see your domain dir there, you need to run /home/vpopmail/bin/vadddomain to create a domain dir structure, then vadduser for each user.
>> It has been working fine up until yesterday
Then your /var/qmail/rc part should probably be okay.
>> so do I still need to look at what you mention above?
Yes. To troubleshoot problem, you should start from scratch. For local delivery problem, start from what I told you to do previously.
Then check /home/vpopmail/domains/domain.com structures, make sure the permissions are correct.
You also need to make sure your /home/vpopmail/domains/domain.com/vpasswd.cdb file is not corrupted. Try to add a new user and see if its coredump.
|

November 28th, 2001, 06:49 AM
|
|
Contributing User
|
|
Join Date: Apr 2001
Location: London, England
Posts: 262
Time spent in forums: 26 m 58 sec
Reputation Power: 13
|
|
|
Ok, the rc file is as follows:
#!/bin/sh
# Using stdout for logging
# Using control/defaultdelivery from qmail-local to deliver messages by default
exec env - PATH="/var/qmail/bin:$PATH" \
qmail-start "`cat /var/qmail/control/defaultdelivery`"
Answers to your questions:
1) 5
2) Unfortunately I did not compile vpopmail so I don't know, sorry.
3) All the domains are there, and were working fine previously. What should the permissions be set to in the /home/vpopmail directory (this could be the cause as we had some permission problems yesterday, and these may have been inadvertently reset)? Also if I reset these, will the mail then be delivered or do I have to force it somehow?
Thanks
|

November 28th, 2001, 07:11 AM
|
|
Contributing User
|
|
Join Date: Jan 2001
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Your rc file should be fine, since vpopmail supports Maildir only.
>> 2) Unfortunately I did not compile vpopmail so I don't know, sorry.
You still can find out the configur options by checking /home/vpopmail/include/vpopmail.h and vpopmail_config.h files. Check and see if #define DEFAULT_DOMAIN "domain.com" is defined.
>> What should the permissions be set
Owner should be vpopmail and group should be vchkpw, except symlinks dir such as mail.domain.com from domain.com dir at /home/vpopmail/domains/*
Here is the directory layout + permission for /home/vpopmail:
drwxr-xr-x bin,doc,etc,include,lib
drwx------ domains,users
In domains dir:
-rw------- .dir-control
drwx------ domain.com, vhost.com
lrwxr-xr-x mail.domain.com -> domain.com # symlink
In domain.com dir:
-rw------- .dir-control, .qmail-xxx, .vpasswd.lock,vpasswd, vpasswd.cdb
drwx------ username, username2
username dir:
drwx------ Maildir
Maildir:
drwx------ for all dirs
-rw------- for all hidden files
If the permissions were correct, then rebuild vpasswd.cdb from vpasswd for each domains.
BTW, is it a problem to all domains or just particular domain?
>> if I reset these, will the mail then be delivered or do I have to force it somehow?
Yes and automatically immediately. Do it sooner or else, as I said, they will be bounced back to envelope sender.
|

November 28th, 2001, 07:32 AM
|
|
Contributing User
|
|
Join Date: Apr 2001
Location: London, England
Posts: 262
Time spent in forums: 26 m 58 sec
Reputation Power: 13
|
|
|
Firstly, yes it is a problem for all pop domains, no mail is being delivered, all remains in the queue. Sending mail is fine, but it is the local delivery of the mail that is failing.
Ok I have changed all the permissions and checked the mail queue again and it remains the same. I don't think I need to reset passwords as when you collect mail with a MUA it connects fine but collects nothing (as there is nothing in the mailbox).
Starting to get a bit worried now, because as you say it will soon be deleted!
My define default domains in /vpopmail_config.h reads as follows:
#define DEFAULT_DOMAIN ""
So I guess not defined then.
Any other ideas??? Can I not somehow push the mail into the correct boxes? (I'm getting despeate here!)
Cheers
|

November 28th, 2001, 08:01 AM
|
|
Contributing User
|
|
Join Date: Jan 2001
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
>> Ok I have changed all the permissions
So they weren't correct earlier?
>> checked the mail queue again and it remains the same
Send ALRM signal to qmail or restart it.
>> Can I not somehow push the mail into the correct boxes?
You can't. Don't even attempt to mess with the queue manually or qmail may break and all messages will be /dev/null plus you need to recompile qmail from scratch.
If you are trying to remove certain messages in the queue or to repair it, there are many scripts to do such cleanup task (go to http://www.qmail.org/top.html).
>> #define DEFAULT_DOMAIN ""
Then the username you enter to check mails with MUA is the email address, not just username. But that's not the issue since messages are being stuck in queue.
If after sending ALRM signal doesn't help still, check another file: /var/qmail/users/assign, then rebuild it so it refreshes your cdb file. Basically these all cover local mail delivery topics in qmail.
|

November 28th, 2001, 08:31 AM
|
|
Contributing User
|
|
Join Date: Apr 2001
Location: London, England
Posts: 262
Time spent in forums: 26 m 58 sec
Reputation Power: 13
|
|
|
Still no joy, but thanks anyway.
One last thing:
"You also need to make sure your /home/vpopmail/domains/domain.com/vpasswd.cdb file is not corrupted. Try to add a new user and see if its coredump."
I will add a new user but I don't understand "see if its coredump" - what does this mean?
Thanks again.
|

November 28th, 2001, 09:25 AM
|
|
Contributing User
|
|
Join Date: Apr 2001
Location: London, England
Posts: 262
Time spent in forums: 26 m 58 sec
Reputation Power: 13
|
|
|
ok, got it moving now!
I believe it was a combination of privileges problems, then I restarted qmail and qmail-injected. Left it injecting for a long time and it seems to have done the trick.
Thanks for all of your help
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|