#1  
Old 4th October 2007, 19:57
PacketPaul PacketPaul is offline
Junior Member
 
Join Date: Oct 2007
Posts: 14
Thanks: 3
Thanked 1 Time in 1 Post
Default Mail not being delivered

Here is the log file of a message being received:

Oct 4 13:51:42 new postfix/local[24100]: 41538A60069: to=<paul@mylabs.com>, relay=local, delay=0.17, delays=0.16/0.01/0/0, dsn=2.0.0, status=sent (delivered to maildir)

Yet, I can not find the mail message anywhere?

Under /var/spool/mail:
-rw------- 1 web6_paul mail 0 Oct 4 11:04 web6_paul

Under ~/web6_paul/Maildir:
(empty directory)

Under ~/web6_paul/mail:
drwx------ 4 web6_paul web6 4096 Oct 4 01:22 .imap
-rw------- 1 web6_paul web6 0 Oct 4 01:22 inbox
-rw------- 1 web6_paul web6 0 Oct 4 01:22 Junk E-mail
-rw------- 1 web6_paul web6 12 Oct 4 01:22 .subscriptions

When I view the account via squirrelmail, it shows no messages in the inbox.

Any ideas?

Thanks!

Paul
Reply With Quote
Sponsored Links
  #2  
Old 4th October 2007, 20:02
mlz mlz is offline
Senior Member
 
Join Date: Dec 2006
Posts: 189
Thanks: 16
Thanked 9 Times in 9 Posts
Default

Under Maildir there should be the following directories:

cur
new
tmp

(and maybe dovecot-uidlist as a file) Sounds like your Maildirs are not setting up right.
Reply With Quote
The Following User Says Thank You to mlz For This Useful Post:
PacketPaul (5th October 2007)
  #3  
Old 5th October 2007, 02:45
PacketPaul PacketPaul is offline
Junior Member
 
Join Date: Oct 2007
Posts: 14
Thanks: 3
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by mlz
Under Maildir there should be the following directories:

cur
new
tmp

(and maybe dovecot-uidlist as a file) Sounds like your Maildirs are not setting up right.

Thanks for your help. Any suggestions on how to fix my setup? I imagine I need to do more then simply create the directories.

Thanks!

Paul
Reply With Quote
  #4  
Old 5th October 2007, 13:26
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

What's in your /etc/postfix/main.cf?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 5th October 2007, 14:21
PacketPaul PacketPaul is offline
Junior Member
 
Join Date: Oct 2007
Posts: 14
Thanks: 3
Thanked 1 Time in 1 Post
Default

Ok, I think I have this issue fixed. For whatever reason they virtusertable was not setup correct. I deleted then recreated the site and mail is now being delivered to Maildir.

But, there is now another issue. Dovecot can not find the mailbox. I am using a chroot environment and ISPConfig does not seem to setup the passwd file home directory correct when creating the user.

When I create a new user under a site, the home directory in the password file is:

web5_paul:x:10002:10005:Paul:/var/www/web5/./:/bin/bash

This causes Dovecot to look for the mailbox under /var/www/web5/Mailbox.

The password file should be:

web5_paul:x:10002:10005:Paul:/var/www/web5/./user/web5_paul:/bin/bash

Notice the home directory difference.

I realize I can edit the dovecot.conf file to tell it to look for Maildir under :~/user/%u/Maildir, but I would prefer to have the password home directory correct.

Ideas?

Paul
Reply With Quote
  #6  
Old 6th October 2007, 11:26
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Is web5_paul the admin of the site? Then /var/www/web5 is the correct homedir, and there should be a symlink from /var/www/web5/Maildir to /var/www/web5/user/web5_paul/Maildir.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 6th October 2007, 12:37
PacketPaul PacketPaul is offline
Junior Member
 
Join Date: Oct 2007
Posts: 14
Thanks: 3
Thanked 1 Time in 1 Post
Default

The directory /var/www/web5 is the root directory of the chroot environment and should never be used as the home directory for any user, including the administrator. The home directories for all users should fall under /var/www/web5/users. In the current version if ISPConfig, the administrator is given his own home directory, but the passwd file incorrectly points to the root directory, and not the home directory.

Using /var/www/web5 as the home directory for the administrator in a chroot environment breaks e-mail under CentOS 5. The symbolic links created codes the full pathway (i.e. /var/www/web6/users/web5_admin/Webdir). This pathway is not available in a chroot environment! Thus the administrator can not receive mail in a chroot environment, assuming Dovecot has been properly setup to use chroot.

One solution would be to use relative pathways when creating the link, but in my opinion the best solution is to make the administrators directory /var/www/web5/./users/web5_admin thus giving the administrator his own home directory. Plus it makes the end-user "feel" as if they are receiving their own little private linux system.

I have hacked /root/ispconfig/scripts/lib/config.lib.php and /root/ispconfig/scripts/lib/config.inc.php to modify the chroot environment and would be happy to submit it to the development team for consideration. There are a few things I need to fix first and I want to make sure it is fully tested.



Paul
Reply With Quote
  #8  
Old 6th October 2007, 14:11
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Quote:
Originally Posted by PacketPaul
In the current version if ISPConfig, the administrator is given his own home directory, but the passwd file incorrectly points to the root directory, and not the home directory.
The admin is given his own directory in the user directory but it's not his homedir. His homedir is /var/www/web5. It's intended like that.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 6th October 2007, 18:53
PacketPaul PacketPaul is offline
Junior Member
 
Join Date: Oct 2007
Posts: 14
Thanks: 3
Thanked 1 Time in 1 Post
Default

Yes, but under a chroot environment it breaks Dovecot and is contrary to Unix/Linux standards.

Dovecot tries to find mail under ~/Maildir. In a chroot environment, the link is broken. Thus Dovecot simply "sees" an empty Maildir file. Plus there are a number of programs that assume the home directory in the passwd file is accurate and consistent.

The design team seems to have gone through a lot of effort to make the admin directory the top level directory by linking all of the necessary files from the /user folder the the top level. The problem is the links break in a chroot environment causing a big mess.

What was the reasoning for making the admin's home directory the root directory of the site?

Thanks for your help!

Paul
Reply With Quote
  #10  
Old 7th October 2007, 19:47
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
 
Default

Quote:
Originally Posted by PacketPaul
What was the reasoning for making the admin's home directory the root directory of the site?
We did this so that the admin can browse all directories within the root.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix & mail forwarding loop varnik Server Operation 21 9th December 2008 15:13
Postfix reject connections gabrix Server Operation 27 25th January 2007 08:37
postfix-tls sasl2 mysql courier-authmysql gabrix Server Operation 4 12th January 2007 22:09
Core 4: Error Messages on Fresh Install re CTX/SSL jjw Installation/Configuration 30 6th September 2006 12:16
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs ebbay Installation/Configuration 9 4th March 2006 11:47


All times are GMT +2. The time now is 11:22.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.