LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-12-2005, 04:37 PM   #1
ServerStorm
Member
 
Registered: Oct 2004
Posts: 76

Rep: Reputation: 15
qmail delivering mail but not to mailbox


Hi everyone,

I am new to qmail and have learned quite a bit about it since I have installed it; however there is one issue that is plaguing my efforts to move forward with qmail's configuration. That is, if I send mail to a user@domain.ca then it is delivered to the qmail 'Mail Queue (qmail-qread)', yet it should be delivered to a user's mailbox instead. When I check the user's mailbox in /home/user/Maildir/ it reports no mail, which makes sense if it has already been delivered to the 'Mail Queue'.

I have VPop set-up and using a remote mail client I can connect via authentication to the pop3 account, so I know that the maildir account is setup.

I am obviously missing something but I have yet to find it. Of note, I did during my first attempt at installing qmail set it up to NOT use the Maildir format, but that installation was unsuccessful. From that original install attempt I removed all files and deleted all groups and variables that I had created and then used a different process to attempt a second install. I don't know if because I originally configured qmail to use the Queue and not MailDir that I am now getting this behavior.

I would like to be able to have several MailDir's setup for different users.

I hope that you might be able to offer advise as to how I might either diagnose or fix it so the mail gets delivered to a user's maildir.

Your help will be most appreciated.

Truly,
ServerStorm
 
Old 01-12-2005, 05:13 PM   #2
hallamigo
Member
 
Registered: Feb 2004
Location: Utah, USA
Distribution: Debian
Posts: 230

Rep: Reputation: 31
When I installed qmail using Maildir and server accounts it created the following directory with all the goods I needed to configure.

/var/qmail/control/

-rw-r--r-- 1 root root 3 2004-09-25 23:46 concurrencyincoming
-rw-r--r-- 1 root root 11 2004-09-25 23:36 defaultdelivery
-rw-r--r-- 1 root root 15 2004-09-25 23:35 defaultdomain
-rw-r--r-- 1 root root 23 2004-10-09 01:49 locals
-rw-r--r-- 1 root root 23 2004-09-25 23:35 me
-rw-r--r-- 1 root root 15 2004-09-25 23:35 plusdomain
-rw-r--r-- 1 root root 54 2004-10-09 01:49 rcpthosts
-rw-r--r-- 1 root root 62 2004-10-09 01:49 virtualdomains

Check the following and let me know:
1. Is domain.ca (from your example) in the list of allowable domains in the rcpthosts file?
2. Is user@domain.ca:user in the virtualdomains file? You should have the email then a colon then the name of the user who should be handling the email.
3. Do you have a .qmail-user file in /home/user directory that indicates what to do with the email?
4. Does your .qmail-user file contain /home/user/Maildir/ as the only line of code? (Others are optional, but the one is most important. BTW, it must have an end slash after Maildir.

Hope that helps.
 
Old 01-12-2005, 06:33 PM   #3
ServerStorm
Member
 
Registered: Oct 2004
Posts: 76

Original Poster
Rep: Reputation: 15
Hi hallamigo,

Thanks for your post!

Please find below my comments to each of your questions:

Quote:
1. Is domain.ca (from your example) in the list of allowable domains in the rcpthosts file?
Yes

Quote:
2. Is user@domain.ca:user in the virtualdomains file? You should have the email then a colon then the name of the user who should be handling the email.
I didn't have this entry when I checked. I added it. How should this be configured if the user does not have a linux account?

Quote:
3. Do you have a .qmail-user file in /home/user directory that indicates what to do with the email?
No. This one is a little more confusing for me because of the following scenario: I have a two possibilities where I might locate this file. Let's say for example that the user's name is bwalton, then here are the possibilities

Code:
 If using Webmin I see a username /home/bwalton/Maildir/

However if I go to /home/bwalton there is no .qmail-user, .qmail-bwalton file or for that matter any 'Maildir' folder.

Alternatively there is also a bwalton directory under /home/vpopmail/domains/%domainname%/bwalton (%domainame% is the actual domain)
Where should the .qmail-user file be located? Is it actually named .qmail-user? Out of the two possibilities for listing the home, I am guessing that I should list it as the vpopmail location and not the sole /home/bwalton location; is this correct?

Quote:
4. Does your .qmail-user file contain /home/user/Maildir/ as the only line of code? (Others are optional, but the one is most important. BTW, it must have an end slash after Maildir.
I will not proceed with 4 until I resolve questions that I proposed in .3.

Thanks so much. I definitely understand why it is not working with the absence of a .qmail-user file.

hope this adequately answers your questions!

Truly,
ServerStorm
 
Old 01-12-2005, 09:13 PM   #4
ServerStorm
Member
 
Registered: Oct 2004
Posts: 76

Original Poster
Rep: Reputation: 15
Hi

I learned a bit more. I did a search for .qmail-* and found that I had the following:

.qmail-default home/vpopmail/domains/bwalton.ca/
.qmail-mailer-daemon var.qmail/alias/
.qmail-postmaster var.qmail/alias/
.qmail-root var.qmail/alias/
.qmail-bwalton var.qmail/alias/



in the .qmail-bwalton file one line exists:

/home/vpopmail/domains/bwalton.ca/bwalton/maildir/

So it appears that the answer to all hallamigo's questions is 'YES'

Given that this .qmail-bwalton file exists should this mean that it should be working?

Again your thoughts are appreciated.

Truly,
ServerStorm

Last edited by ServerStorm; 01-12-2005 at 09:14 PM.
 
Old 01-12-2005, 10:05 PM   #5
ServerStorm
Member
 
Registered: Oct 2004
Posts: 76

Original Poster
Rep: Reputation: 15
Unable_to_chdir_to_maildir._(#4.2.1)/

Hi

My qmail startscript:

Code:
#!/bin/sh
exec env - PATH="/var/qmail/bin:/usr/local/bin" \
qmail-start ./Maildir/
If I invoke it in a shell console:

Code:
# '/var/qmail/rc'
It gives this output:
Code:
status: local 0/10 remote 0/255
starting delivery 1: msg 162678 to local bwalton@bwalton.ca
status: local 1/10 remote 0/255
delivery 1: deferral: Unable_to_chdir_to_maildir._(#4.2.1)/ 
status: local 0/10 remote 0/255
d

I think that the line delivery 1: deferral: Unable_to_chdir_to_maildir._(#4.2.1)/ means that their is a permissions problem on a directory. Only, I am not sure what director local bwalton@bwalton.ca is, and I am also not clear on how I should reset the permissions so that they work correctly?

I think that we are almost their only I am just not sure how to do this last step. Your help is definitely appreciated.

Truly,
ServerStorm

Last edited by ServerStorm; 01-12-2005 at 10:21 PM.
 
Old 01-12-2005, 10:39 PM   #6
ServerStorm
Member
 
Registered: Oct 2004
Posts: 76

Original Poster
Rep: Reputation: 15
Here are the permissions on the different directories:

Quote:
foozle:/home # dir
total 2
drwxr-xr-x 4 root root 104 Jan 1 22:23 .
drwxr-xr-x 25 root root 584 May 1 21:43 ..
drwxr-xr-x 20 bwalton users 1936 May 2 02:36 bwalton
drwxr-xr-x 8 root root 192 Jan 1 23:21 vpopmail
foozle:/home # cd vpopmail
foozle:/home/vpopmail # dir
total 1
drwxr-xr-x 8 root root 192 Jan 1 23:21 .
drwxr-xr-x 4 root root 104 Jan 1 22:23 ..
drwxr-xr-x 2 vpopmail vchkpw 696 May 2 09:44 bin
drwxr-xr-x 4 vpopmail vchkpw 96 Jan 1 23:21 doc
drwx------ 3 vpopmail vchkpw 176 May 2 10:00 domains
drwxr-xr-x 2 vpopmail vchkpw 304 May 2 09:54 etc
drwxr-xr-x 2 vpopmail vchkpw 200 May 2 09:44 include
drwxr-xr-x 2 vpopmail vchkpw 80 May 2 09:44 lib
foozle:/home/vpopmail # cd domains
foozle:/home/vpopmail/domains # dir
total 12
drwx------ 3 vpopmail vchkpw 176 May 2 10:00 .
drwxr-xr-x 8 root root 192 Jan 1 23:21 ..
-rw-r--r-- 1 root root 80 May 2 09:58 .over-quota.msg
drwx------ 4 vpopmail 98 144 May 2 10:01 bwalton.ca
-rw-r--r-- 1 root root 512 May 2 09:57 quotawarn.msg
-rw-r--r-- 1 root root 2 May 2 09:55 quotawarn.msg~
foozle:/home/vpopmail/domains # cd bwalton.ca
foozle:/home/vpopmail/domains/bwalton.ca # dir
total 4
drwx------ 4 vpopmail 98 144 May 2 10:01 .
drwx------ 3 vpopmail vchkpw 176 May 2 10:00 ..
-rw------- 1 vpopmail 98 55 May 2 10:00 .qmail-default
drwx------ 3 vpopmail 98 72 May 2 10:00 postmaster
drwx------ 3 vpopmail 98 136 May 8 09:04 bwalton
 
Old 01-13-2005, 12:14 AM   #7
hallamigo
Member
 
Registered: Feb 2004
Location: Utah, USA
Distribution: Debian
Posts: 230

Rep: Reputation: 31
I was unaware that you were using vpopmail combined with qmail. Vpopmail should be the one handling your mail delivery. What is the content of your /var/qmail/control/rcpthosts and /var/qmail/control/virtualdomains files. They should indicate that vpopmail is in control.

My rcpthosts simply lists the domain names and the virtualdomains have

greenaspen.com:greenaspen.com

This indicates that anything for the domain greenaspen.com is handled by the /home/vpopmail/domains/greenaspen.com directory.

Combining qmail and vpopmail can be somewhat touch-and-go - what instructions did you follow?
 
Old 01-13-2005, 11:16 AM   #8
ServerStorm
Member
 
Registered: Oct 2004
Posts: 76

Original Poster
Rep: Reputation: 15
Hi hallamigo

The content of my /var/qmail/control/rcpthosts is:

mail.bwalton.ca
bwalton.ca
mail.bwalton.com
bwalton.com

The content of my /var/qmail/control/virtualdomains

bwalton@bwalton.ca:bwalton

To set it up similarily to your own setup I did the following:

bwalton@bwalton.ca:bwalton
bwalton.ca:bwalton.ca

I used the directions at the following site.
http://sylvestre.ledru.info/howto/ho...mail.php#qmail

I originally followed the instuctions at 'Life with Qmail' although I ran into barriers with these instructions when I attempted to get imap-courier configured and also I could not compile the authentication module; therefore I followed these instructions at the listed site and it got me past the imap-courier and authentication issues.

Thanks for you help thus far!

Truly,
ServerStorm
 
Old 01-13-2005, 11:20 AM   #9
hallamigo
Member
 
Registered: Feb 2004
Location: Utah, USA
Distribution: Debian
Posts: 230

Rep: Reputation: 31
I'll get back to you shortly with a link to my documentation - hopefully it will give you some ideas; I just need to get it on the web.
 
Old 01-13-2005, 11:39 AM   #10
ServerStorm
Member
 
Registered: Oct 2004
Posts: 76

Original Poster
Rep: Reputation: 15
Thank You!!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix/Cyrus Not delivering mail nitsujw Linux - Software 1 07-17-2005 07:16 PM
Qmail problem: ISP mail and virtual mail, "sorry no mailbox, here by that user" barryw Linux - Networking 7 05-28-2005 01:43 PM
postfix not delivering mail to root pbaumgar Linux - Software 1 06-25-2004 01:44 AM
postfix not delivering mail stir_frey Linux - Software 2 10-10-2003 08:43 AM
Postfix not delivering mail to mailbox DeVryGuy Linux - Software 13 09-22-2003 01:43 AM


All times are GMT -5. The time now is 04:10 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration