Menu

#4474 Maildir directory not created in virtual server owners' home but instead in "/"

All
closed-fixed
nobody
5
2014-09-17
2014-09-16
No

On Ubuntu, by default, Postfix puts mailboxes in /var/mail/$LOGNAME. I wanted to change it to Maildir inside users home so I added "home_mailbox = Maildir/" to Postfix's "mail.cf". Virtualmin picked this nicely and generated a new "/etc/procmailrc" with these lines:

ORGMAIL=$HOME/Maildir/
DEFAULT=$HOME/Maildir/

Postfix seems to be working correctly and delivers messages to proper place.

The problem is when new virtual server is created. Virtualmin tries to creates Maildir directory with appropriate subdirectories and "subscription" file for a new user, but it's created in wrong place. Maildir directory is created in "/Maildir" with root:root ownership instead in "/home/owner/Maildir" with proper ownership. Only virtual server owners are affected. Mailbox only users get their Maildir directory created properly in "/home/owner/homes/mbuser/Maildir".

What can I do to debug this? Webmin action log and even debug log doesn't show anything regarding this.

Thanks.

Discussion

  • Jamie Cameron

    Jamie Cameron - 2014-09-16

    Does a Maildir directory also get created under the virtual server owner's home, or only in / ?

     
  • Bojan Vitnik

    Bojan Vitnik - 2014-09-16

    Only in "/".

     
  • Jamie Cameron

    Jamie Cameron - 2014-09-16

    Check if the nscd process is running on your system - this could be caused by the newly created user not being visible to Postfix / Virtualmin.

     
  • Bojan Vitnik

    Bojan Vitnik - 2014-09-16

    Nscd is not running. I'm not using LDAP for user authentication, just plain Unix users (/etc/passwd|shadow).

    I'll try to pinpoint the buggy code. I guess that the code that makes Maildir is found in "feature-mail.pl"? Programing is not foreign to me but I never learned Perl. Syntax is a little weird. Time to learn one more programing language I guess :[.

     
  • Jamie Cameron

    Jamie Cameron - 2014-09-17

    Ok, I found a case in which this could happen - it will be fixed in the next Virtualmin release (version 4.11).

     
  • Jamie Cameron

    Jamie Cameron - 2014-09-17
    • status: open --> closed-fixed
     
  • Bojan Vitnik

    Bojan Vitnik - 2014-09-17

    Nice. Thanks. I think I located the problem myself. This line in "feature-dir.pl":

    &create_mail_file(\%uinfo, $_[0]);

    should have been:

    &create_mail_file($uinfo, $_[0]);

    Am I close :)?

     

    Last edit: Bojan Vitnik 2014-09-17
  • Jamie Cameron

    Jamie Cameron - 2014-09-17

    That wasn't the cause of the issue - however, it is also incorrect and needs fixing.

     
  • Bojan Vitnik

    Bojan Vitnik - 2014-09-17

    Than there were two separate issues causing this problem because fixing the line mentioned above solved the problem for me. I've tested it thoroughly.

    There are some separate issues thou. Some activities regarding creation of new users are not logged in Webmin action log. Creation of Maildir is one of them.

    Thanks again.

     

    Last edit: Bojan Vitnik 2014-09-17

Log in to post a comment.