Picon
Gravatar

Unsusbcribe

unsubscribe

--
¬¬
----

Layn | 1 Oct 2005 17:19
Favicon

Automaildir.

    I know this is a comun problem, i have read similar post in this 
list and anothers, but, i cant fix this error. So please if you have any 
idea about its, please tell me.

    My problem is the next:

    When i send a mail to a local users (no sistem local, local of my 
domains, defined in my ldap), i get the next error:

    deferral: 
Unable_to_switch_to_/var/qmail/maildirs/watashi3:_file_does_not_exist._(#4.3.0) 

    If i create this directory:

   shuhi:/var/qmail# bin/dirmaker maildirs/watashi3
   shuhi:/var/qmail# chown -R vmail:vmail maildirs
   shuhi:/var/qmail# ls -l maildirs/
   total 4
   drwx------  2 vmail vmail 4096 2005-10-01 16:53 watashi3

    The result is:

    deferral: Unable_to_chdir_to_maildir._(#4.2.1)

    It could be a problem of privilege, but if u see, the directory is 
of vmail:vmail, so its correct, no problem with privilege.
    And now i create Maildir with maildirmake:

    shuhi:/var/qmail# bin/maildirmake maildirs/watashi3/Maildir
    shuhi:/var/qmail# chown -R vmail:vmail maildirs

    The result is:

    success: did_1+0+0/

    Correct!!! But no automatic.

    The ldap's user configuration is:

dn: uid=watashi3,dc=example,dc=com
cn: watashi3
sn: lin2
objectClass: person
objectClass: top
objectClass: inetOrgPerson
objectClass: qmailUser
o: example
uid: watashi3
mail: watashi3 <at> example.com
mailHost: smtp.example.com
mailMessageStore: /var/qmail/maildirs/watashi3
userPassword:: 123456

If i put the homeDirectory's attribute, and i create the homeDirectory, 
this automaty crea the mailbox, but the mailbox and i want maildir, no 
mailbox.

Control's files of interest:

defaultdelivery                ./Maildir/
ldapgid                              2110  (vmail uid)
ldapmessagestore            /var/qmail/maildirs
ldapobjectclass                  qmailUser
ldaprebind                        1
ldapuid                              11184 (vmail gid=
dirmaker                           /var/qmail/bin/dirmaker

And dirmaker's script:

#!/bin/sh
mkdir -m 700 -p $1

And for last, the more important, the Makefile of qmail-1.03, in this 
file i have uncommentd the next lines:

       MDIRMAKE=DAUTOMAILDIRMAKE
       HDIRMAKE=DAUTOHOMEDIRMAKE

I hope you can help me i dont know where to read now.

Thanks and regards,
Layn.

Amit | 1 Oct 2005 17:52

Re: Automaildir.


Hi Layn,

Solution is quite simple - I'll just point it out one by one

1. In your qmail-1.03 source directory, locate the file 'qmail-ldap.h'.
2. In this file, locate the parameter 'LDAP_HOMEDIR' and change its value to
'mailMessageStore'
3. Now go to the qmail source directory and recompile qmail-ldap with the
command -
make setup check
4. In the directory /var/qmail/control, make sure u have the following
control files with the contents given along with this...

(I) ldapserver  - localhost
(II) ldaplogin - 'cn=Manager,dc=yourdomain,dc=com'
(III) ldappassword - 'yoursecretpassword'
(IV) ldapbasedn - 'dc=yourdomain,dc=com'
(V) ldaplocaldelivery - 1
(VI) make sure localdomains and rcpthosts contain the name of ur domain

5. chown root:qmail /var/qmail/control/ldap*

Also make sure that your /etc/ldap.conf has enabled authentication for the
domain manager i.e cn=Manager,dc=yourdomain,dc=com...Locate related entries
in this file and make changes accordingly...

rootbinddn cn=Manager,dc=yourdomain,dc=com
Also uncomment the entry for password

Now, when you create a new user, qmail will automatically create the user's
home directory, which is also the maildir of user 'watashi' (
/var/qmail/maildirs/watashi.  ). So the directory 'watashi' will be created
as a maildir and not a mailbox directory.

In case the maildir is not created, just send a mail to this newly created
user 'watashi' with any demo text. qmail will then automatically create the
desired maildir.

Hope that helps. Good luck with your qmail-ldap installation.

Regards,

Amit

----- Original Message ----- 
From: "Layn" <Layn <at> oscuridad.com>
To: <qmail-ldap <at> qmail-ldap.org>
Sent: Saturday, October 01, 2005 8:49 PM
Subject: Automaildir.

>     I know this is a comun problem, i have read similar post in this
> list and anothers, but, i cant fix this error. So please if you have any
> idea about its, please tell me.
>
>     My problem is the next:
>
>     When i send a mail to a local users (no sistem local, local of my
> domains, defined in my ldap), i get the next error:
>
>     deferral:
>
Unable_to_switch_to_/var/qmail/maildirs/watashi3:_file_does_not_exist._(#4.3
.0)
>
>
>     If i create this directory:
>
>    shuhi:/var/qmail# bin/dirmaker maildirs/watashi3
>    shuhi:/var/qmail# chown -R vmail:vmail maildirs
>    shuhi:/var/qmail# ls -l maildirs/
>    total 4
>    drwx------  2 vmail vmail 4096 2005-10-01 16:53 watashi3
>
>     The result is:
>
>     deferral: Unable_to_chdir_to_maildir._(#4.2.1)
>
>     It could be a problem of privilege, but if u see, the directory is
> of vmail:vmail, so its correct, no problem with privilege.
>     And now i create Maildir with maildirmake:
>
>     shuhi:/var/qmail# bin/maildirmake maildirs/watashi3/Maildir
>     shuhi:/var/qmail# chown -R vmail:vmail maildirs
>
>     The result is:
>
>     success: did_1+0+0/
>
>     Correct!!! But no automatic.
>
>     The ldap's user configuration is:
>
> dn: uid=watashi3,dc=example,dc=com
> cn: watashi3
> sn: lin2
> objectClass: person
> objectClass: top
> objectClass: inetOrgPerson
> objectClass: qmailUser
> o: example
> uid: watashi3
> mail: watashi3 <at> example.com
> mailHost: smtp.example.com
> mailMessageStore: /var/qmail/maildirs/watashi3
> userPassword:: 123456
>
> If i put the homeDirectory's attribute, and i create the homeDirectory,
> this automaty crea the mailbox, but the mailbox and i want maildir, no
> mailbox.
>
> Control's files of interest:
>
> defaultdelivery                ./Maildir/
> ldapgid                              2110  (vmail uid)
> ldapmessagestore            /var/qmail/maildirs
> ldapobjectclass                  qmailUser
> ldaprebind                        1
> ldapuid                              11184 (vmail gid=
> dirmaker                           /var/qmail/bin/dirmaker
>
> And dirmaker's script:
>
> #!/bin/sh
> mkdir -m 700 -p $1
>
> And for last, the more important, the Makefile of qmail-1.03, in this
> file i have uncommentd the next lines:
>
>        MDIRMAKE=DAUTOMAILDIRMAKE
>        HDIRMAKE=DAUTOHOMEDIRMAKE
>
>
> I hope you can help me i dont know where to read now.
>
> Thanks and regards,
> Layn.

Layn | 1 Oct 2005 18:24
Favicon

Re: Automaildir.

    Thansk for your faster reply, now the directory is created:

    drwx------  3 vmail vmail 4096 2005-10-01 18:20 anata

    This directory is empty, no Maildir, no cur, no new, no tmp...

    And the log say:

    deferral: 
Unable_to_open_/var/qmail/maildirs/anata2:_is_a_directory._(#4.2.1)

    If manually i do the Maildir directory the answer is the same:

    deferral: 
Unable_to_open_/var/qmail/maildirs/anata2:_is_a_directory._(#4.2.1)

    The anata user:

dn: uid=anata2,dc=example,dc=com
cn: anata2
sn: anata2
objectClass: person
objectClass: top
objectClass: inetOrgPerson
objectClass: qmailUser
o: example
uid: anata2
mail: anata2 <at> example.com
mailHost: smtp.example.com
homeDirectory: /var/qmail/maildirs/anata2
mailMessageStore: /var/qmail/maildirs/anata2
userPassword: 123456

    Regards,
    Layn.

>Hi Layn,
>
>Solution is quite simple - I'll just point it out one by one
>
>1. In your qmail-1.03 source directory, locate the file 'qmail-ldap.h'.
>2. In this file, locate the parameter 'LDAP_HOMEDIR' and change its value to
>'mailMessageStore'
>3. Now go to the qmail source directory and recompile qmail-ldap with the
>command -
>make setup check
>4. In the directory /var/qmail/control, make sure u have the following
>control files with the contents given along with this...
>
>(I) ldapserver  - localhost
>(II) ldaplogin - 'cn=Manager,dc=yourdomain,dc=com'
>(III) ldappassword - 'yoursecretpassword'
>(IV) ldapbasedn - 'dc=yourdomain,dc=com'
>(V) ldaplocaldelivery - 1
>(VI) make sure localdomains and rcpthosts contain the name of ur domain
>
>5. chown root:qmail /var/qmail/control/ldap*
>
>Also make sure that your /etc/ldap.conf has enabled authentication for the
>domain manager i.e cn=Manager,dc=yourdomain,dc=com...Locate related entries
>in this file and make changes accordingly...
>
>rootbinddn cn=Manager,dc=yourdomain,dc=com
>Also uncomment the entry for password
>
>Now, when you create a new user, qmail will automatically create the user's
>home directory, which is also the maildir of user 'watashi' (
>/var/qmail/maildirs/watashi.  ). So the directory 'watashi' will be created
>as a maildir and not a mailbox directory.
>
>In case the maildir is not created, just send a mail to this newly created
>user 'watashi' with any demo text. qmail will then automatically create the
>desired maildir.
>
>Hope that helps. Good luck with your qmail-ldap installation.
>
>Regards,
>
>Amit
>
>----- Original Message ----- 
>From: "Layn" <Layn <at> oscuridad.com>
>To: <qmail-ldap <at> qmail-ldap.org>
>Sent: Saturday, October 01, 2005 8:49 PM
>Subject: Automaildir.
>
>
>  
>
>>    I know this is a comun problem, i have read similar post in this
>>list and anothers, but, i cant fix this error. So please if you have any
>>idea about its, please tell me.
>>
>>    My problem is the next:
>>
>>    When i send a mail to a local users (no sistem local, local of my
>>domains, defined in my ldap), i get the next error:
>>
>>    deferral:
>>
>>    
>>
>Unable_to_switch_to_/var/qmail/maildirs/watashi3:_file_does_not_exist._(#4.3
>.0)
>  
>
>>    If i create this directory:
>>
>>   shuhi:/var/qmail# bin/dirmaker maildirs/watashi3
>>   shuhi:/var/qmail# chown -R vmail:vmail maildirs
>>   shuhi:/var/qmail# ls -l maildirs/
>>   total 4
>>   drwx------  2 vmail vmail 4096 2005-10-01 16:53 watashi3
>>
>>    The result is:
>>
>>    deferral: Unable_to_chdir_to_maildir._(#4.2.1)
>>
>>    It could be a problem of privilege, but if u see, the directory is
>>of vmail:vmail, so its correct, no problem with privilege.
>>    And now i create Maildir with maildirmake:
>>
>>    shuhi:/var/qmail# bin/maildirmake maildirs/watashi3/Maildir
>>    shuhi:/var/qmail# chown -R vmail:vmail maildirs
>>
>>    The result is:
>>
>>    success: did_1+0+0/
>>
>>    Correct!!! But no automatic.
>>
>>    The ldap's user configuration is:
>>
>>dn: uid=watashi3,dc=example,dc=com
>>cn: watashi3
>>sn: lin2
>>objectClass: person
>>objectClass: top
>>objectClass: inetOrgPerson
>>objectClass: qmailUser
>>o: example
>>uid: watashi3
>>mail: watashi3 <at> example.com
>>mailHost: smtp.example.com
>>mailMessageStore: /var/qmail/maildirs/watashi3
>>userPassword:: 123456
>>
>>If i put the homeDirectory's attribute, and i create the homeDirectory,
>>this automaty crea the mailbox, but the mailbox and i want maildir, no
>>mailbox.
>>
>>Control's files of interest:
>>
>>defaultdelivery                ./Maildir/
>>ldapgid                              2110  (vmail uid)
>>ldapmessagestore            /var/qmail/maildirs
>>ldapobjectclass                  qmailUser
>>ldaprebind                        1
>>ldapuid                              11184 (vmail gid=
>>dirmaker                           /var/qmail/bin/dirmaker
>>
>>And dirmaker's script:
>>
>>#!/bin/sh
>>mkdir -m 700 -p $1
>>
>>And for last, the more important, the Makefile of qmail-1.03, in this
>>file i have uncommentd the next lines:
>>
>>       MDIRMAKE=DAUTOMAILDIRMAKE
>>       HDIRMAKE=DAUTOHOMEDIRMAKE
>>
>>
>>I hope you can help me i dont know where to read now.
>>
>>Thanks and regards,
>>Layn.
>>    
>>
>
>
>
>
>  
>

Amit | 1 Oct 2005 18:52

Re: Automaildir.

Hi,

The 'accountStatus' attribute is missing from your user data output. For
this account to be operational, the following attribute must be set for
every mail user. You must include this attribute:value pair in the base ldif
file that you create for every system user -

accountStatus: Active

The accountStatus attribute comes as a part of qmail schema. Have you
included qmail.schema directive in /etc/openldap/slapd.conf ? If not, you
have to define the following in slapd.conf

include /etc/openldap/schema/qmail.schema

Along with that, copy the file qmail.schema to /etc/openldap/schema/

Finally, send a mail to this newly created user. I am sure it will work.

Regards,

Amit

----- Original Message ----- 
From: "Layn" <Layn <at> oscuridad.com>
To: <qmail-ldap <at> qmail-ldap.org>
Sent: Saturday, October 01, 2005 9:54 PM
Subject: Re: Automaildir.

>     Thansk for your faster reply, now the directory is created:
>
>     drwx------  3 vmail vmail 4096 2005-10-01 18:20 anata
>
>     This directory is empty, no Maildir, no cur, no new, no tmp...
>
>     And the log say:
>
>     deferral:
> Unable_to_open_/var/qmail/maildirs/anata2:_is_a_directory._(#4.2.1)
>
>     If manually i do the Maildir directory the answer is the same:
>
>     deferral:
> Unable_to_open_/var/qmail/maildirs/anata2:_is_a_directory._(#4.2.1)
>
>
>     The anata user:
>
> dn: uid=anata2,dc=example,dc=com
> cn: anata2
> sn: anata2
> objectClass: person
> objectClass: top
> objectClass: inetOrgPerson
> objectClass: qmailUser
> o: example
> uid: anata2
> mail: anata2 <at> example.com
> mailHost: smtp.example.com
> homeDirectory: /var/qmail/maildirs/anata2
> mailMessageStore: /var/qmail/maildirs/anata2
> userPassword: 123456
>
>     Regards,
>     Layn.
>
> >Hi Layn,
> >
> >Solution is quite simple - I'll just point it out one by one
> >
> >1. In your qmail-1.03 source directory, locate the file 'qmail-ldap.h'.
> >2. In this file, locate the parameter 'LDAP_HOMEDIR' and change its value
to
> >'mailMessageStore'
> >3. Now go to the qmail source directory and recompile qmail-ldap with the
> >command -
> >make setup check
> >4. In the directory /var/qmail/control, make sure u have the following
> >control files with the contents given along with this...
> >
> >(I) ldapserver  - localhost
> >(II) ldaplogin - 'cn=Manager,dc=yourdomain,dc=com'
> >(III) ldappassword - 'yoursecretpassword'
> >(IV) ldapbasedn - 'dc=yourdomain,dc=com'
> >(V) ldaplocaldelivery - 1
> >(VI) make sure localdomains and rcpthosts contain the name of ur domain
> >
> >5. chown root:qmail /var/qmail/control/ldap*
> >
> >Also make sure that your /etc/ldap.conf has enabled authentication for
the
> >domain manager i.e cn=Manager,dc=yourdomain,dc=com...Locate related
entries
> >in this file and make changes accordingly...
> >
> >rootbinddn cn=Manager,dc=yourdomain,dc=com
> >Also uncomment the entry for password
> >
> >Now, when you create a new user, qmail will automatically create the
user's
> >home directory, which is also the maildir of user 'watashi' (
> >/var/qmail/maildirs/watashi.  ). So the directory 'watashi' will be
created
> >as a maildir and not a mailbox directory.
> >
> >In case the maildir is not created, just send a mail to this newly
created
> >user 'watashi' with any demo text. qmail will then automatically create
the
> >desired maildir.
> >
> >Hope that helps. Good luck with your qmail-ldap installation.
> >
> >Regards,
> >
> >Amit
> >
> >----- Original Message ----- 
> >From: "Layn" <Layn <at> oscuridad.com>
> >To: <qmail-ldap <at> qmail-ldap.org>
> >Sent: Saturday, October 01, 2005 8:49 PM
> >Subject: Automaildir.
> >
> >
> >
> >
> >>    I know this is a comun problem, i have read similar post in this
> >>list and anothers, but, i cant fix this error. So please if you have any
> >>idea about its, please tell me.
> >>
> >>    My problem is the next:
> >>
> >>    When i send a mail to a local users (no sistem local, local of my
> >>domains, defined in my ldap), i get the next error:
> >>
> >>    deferral:
> >>
> >>
> >>
>
>Unable_to_switch_to_/var/qmail/maildirs/watashi3:_file_does_not_exist._(#4.
3
> >.0)
> >
> >
> >>    If i create this directory:
> >>
> >>   shuhi:/var/qmail# bin/dirmaker maildirs/watashi3
> >>   shuhi:/var/qmail# chown -R vmail:vmail maildirs
> >>   shuhi:/var/qmail# ls -l maildirs/
> >>   total 4
> >>   drwx------  2 vmail vmail 4096 2005-10-01 16:53 watashi3
> >>
> >>    The result is:
> >>
> >>    deferral: Unable_to_chdir_to_maildir._(#4.2.1)
> >>
> >>    It could be a problem of privilege, but if u see, the directory is
> >>of vmail:vmail, so its correct, no problem with privilege.
> >>    And now i create Maildir with maildirmake:
> >>
> >>    shuhi:/var/qmail# bin/maildirmake maildirs/watashi3/Maildir
> >>    shuhi:/var/qmail# chown -R vmail:vmail maildirs
> >>
> >>    The result is:
> >>
> >>    success: did_1+0+0/
> >>
> >>    Correct!!! But no automatic.
> >>
> >>    The ldap's user configuration is:
> >>
> >>dn: uid=watashi3,dc=example,dc=com
> >>cn: watashi3
> >>sn: lin2
> >>objectClass: person
> >>objectClass: top
> >>objectClass: inetOrgPerson
> >>objectClass: qmailUser
> >>o: example
> >>uid: watashi3
> >>mail: watashi3 <at> example.com
> >>mailHost: smtp.example.com
> >>mailMessageStore: /var/qmail/maildirs/watashi3
> >>userPassword:: 123456
> >>
> >>If i put the homeDirectory's attribute, and i create the homeDirectory,
> >>this automaty crea the mailbox, but the mailbox and i want maildir, no
> >>mailbox.
> >>
> >>Control's files of interest:
> >>
> >>defaultdelivery                ./Maildir/
> >>ldapgid                              2110  (vmail uid)
> >>ldapmessagestore            /var/qmail/maildirs
> >>ldapobjectclass                  qmailUser
> >>ldaprebind                        1
> >>ldapuid                              11184 (vmail gid=
> >>dirmaker                           /var/qmail/bin/dirmaker
> >>
> >>And dirmaker's script:
> >>
> >>#!/bin/sh
> >>mkdir -m 700 -p $1
> >>
> >>And for last, the more important, the Makefile of qmail-1.03, in this
> >>file i have uncommentd the next lines:
> >>
> >>       MDIRMAKE=DAUTOMAILDIRMAKE
> >>       HDIRMAKE=DAUTOHOMEDIRMAKE
> >>
> >>
> >>I hope you can help me i dont know where to read now.
> >>
> >>Thanks and regards,
> >>Layn.
> >>
> >>
> >
> >
> >
> >
> >
> >
>

Favicon

Re: Automaildir.

Hope this can help you:

1. be sure that your Makefile on qmail after applying the patch has the following:

# to enable the auto-maildir-make feature uncomment the next line
MDIRMAKE=-DAUTOMAILDIRMAKE

# to enable the auto-homedir-make feature uncomment the next line
HDIRMAKE=-DAUTOHOMEDIRMAKE


2. After installing qmail-ldap go to you control files normally located at /var/qmail/control

then add this to that file

cat  > /var/qmail/control/dirmaker
/var/qmail/bin/dirmaker

create the file /var/qmail/bin/dirmaker and put this on it: ( it may change according to your installation)

#!/bin/sh
echo '---------------------------------------------' >> /usr/home/qmail/dirmaker.log
date >> /usr/home/qmail/dirmaker.log
echo $1 >> /usr/home/qmail/dirmaker.log
id >> /usr/home/qmail/dirmaker.log
mkdir -m 700 -p $1
/var/qmail/bin/maildirmake $1/Maildir

that file is owned by root:qmail:
% ll /var/qmail/bin/dirmaker 
-rwxr-xr-x  1 root  qmail  264 Jun 16 11:53 dirmaker*

also check the ldapmessagestore, on my case is : 

/usr/home/qmail/maildirs  (directory owned by vmail:vmail)

% ll /usr/home/qmail/
-rw-r--r--  1 vmail  vmail  3562 Sep 12 23:13 dirmaker.log
drwxr-xr-x  4 vmail  vmail   512 Sep 12 22:48 maildirs/


3. verify the perms
on my case /usr/home/qmail/* is owned by vmail:vmail

4. here is an example of ldif:

dn: uid=nbari <at> ejemplo.org,ou=ejemplo.org,ou=qmail,o=EJEMPLO,c=CA
objectClass: top
objectClass: person
objectClass: inetOrgPerson
objectClass: qmailUser
cn: nbari
sn: nbari
accountStatus: active
mailHost: ejemplo.org
mailMessageStore: ejemplo.org/nbari
deliveryMode: noprogram
mailAlternateAddress: catchall <at> ejemplo.org




  • dirmaker
  • Dirmaker (which we altered our makefile for) allows us to declare a script that will autocreate home directories for us upon receipt of first email on a new account. So, create an LDAP account for jasonpanopolous <at> glaven.org, with a mailbox of /mail/glaven.org/users/j/jasonpanopolous and dirmaker will automagically create the directory (and tree), set permissions, and deliver the mail there. I created /var/qmail/bin/dirmaker, and put that path in my dirmaker control file. Here is the contents of my dirmaker script


Hope this can help you.

Regards.



On Oct 1, 2005, at 11:24 AM, Layn wrote:

   Thansk for your faster reply, now the directory is created:

   drwx------  3 vmail vmail 4096 2005-10-01 18:20 anata

   This directory is empty, no Maildir, no cur, no new, no tmp...

   And the log say:

   deferral: Unable_to_open_/var/qmail/maildirs/anata2:_is_a_directory._(#4.2.1)

   If manually i do the Maildir directory the answer is the same:

   deferral: Unable_to_open_/var/qmail/maildirs/anata2:_is_a_directory._(#4.2.1)

  

   The anata user:

dn: uid=anata2,dc=example,dc=com
cn: anata2
sn: anata2
objectClass: person
objectClass: top
objectClass: inetOrgPerson
objectClass: qmailUser
o: example
uid: anata2
mailHost: smtp.example.com
homeDirectory: /var/qmail/maildirs/anata2
mailMessageStore: /var/qmail/maildirs/anata2
userPassword: 123456

   Regards,
   Layn.


Hi Layn,

Solution is quite simple - I'll just point it out one by one

1. In your qmail-1.03 source directory, locate the file 'qmail-ldap.h'.
2. In this file, locate the parameter 'LDAP_HOMEDIR' and change its value to
'mailMessageStore'
3. Now go to the qmail source directory and recompile qmail-ldap with the
command -
make setup check
4. In the directory /var/qmail/control, make sure u have the following
control files with the contents given along with this...

(I) ldapserver  - localhost
(II) ldaplogin - 'cn=Manager,dc=yourdomain,dc=com'
(III) ldappassword - 'yoursecretpassword'
(IV) ldapbasedn - 'dc=yourdomain,dc=com'
(V) ldaplocaldelivery - 1
(VI) make sure localdomains and rcpthosts contain the name of ur domain

5. chown root:qmail /var/qmail/control/ldap*

Also make sure that your /etc/ldap.conf has enabled authentication for the
domain manager i.e cn=Manager,dc=yourdomain,dc=com...Locate related entries
in this file and make changes accordingly...

rootbinddn cn=Manager,dc=yourdomain,dc=com
Also uncomment the entry for password

Now, when you create a new user, qmail will automatically create the user's
home directory, which is also the maildir of user 'watashi' (
/var/qmail/maildirs/watashi.  ). So the directory 'watashi' will be created
as a maildir and not a mailbox directory.

In case the maildir is not created, just send a mail to this newly created
user 'watashi' with any demo text. qmail will then automatically create the
desired maildir.

Hope that helps. Good luck with your qmail-ldap installation.

Regards,

Amit

----- Original Message ----- From: "Layn" <Layn <at> oscuridad.com>
Sent: Saturday, October 01, 2005 8:49 PM
Subject: Automaildir.


 


   I know this is a comun problem, i have read similar post in this
list and anothers, but, i cant fix this error. So please if you have any
idea about its, please tell me.

   My problem is the next:

   When i send a mail to a local users (no sistem local, local of my
domains, defined in my ldap), i get the next error:

   deferral:

   


Unable_to_switch_to_/var/qmail/maildirs/watashi3:_file_does_not_exist._(#4.3
.0)

 


   If i create this directory:

  shuhi:/var/qmail# bin/dirmaker maildirs/watashi3
  shuhi:/var/qmail# chown -R vmail:vmail maildirs
  shuhi:/var/qmail# ls -l maildirs/
  total 4
  drwx------  2 vmail vmail 4096 2005-10-01 16:53 watashi3

   The result is:

   deferral: Unable_to_chdir_to_maildir._(#4.2.1)

   It could be a problem of privilege, but if u see, the directory is
of vmail:vmail, so its correct, no problem with privilege.
   And now i create Maildir with maildirmake:

   shuhi:/var/qmail# bin/maildirmake maildirs/watashi3/Maildir
   shuhi:/var/qmail# chown -R vmail:vmail maildirs

   The result is:

   success: did_1+0+0/

   Correct!!! But no automatic.

   The ldap's user configuration is:

dn: uid=watashi3,dc=example,dc=com
cn: watashi3
sn: lin2
objectClass: person
objectClass: top
objectClass: inetOrgPerson
objectClass: qmailUser
o: example
uid: watashi3
mailHost: smtp.example.com
mailMessageStore: /var/qmail/maildirs/watashi3
userPassword:: 123456

If i put the homeDirectory's attribute, and i create the homeDirectory,
this automaty crea the mailbox, but the mailbox and i want maildir, no
mailbox.

Control's files of interest:

defaultdelivery                ./Maildir/
ldapgid                              2110  (vmail uid)
ldapmessagestore            /var/qmail/maildirs
ldapobjectclass                  qmailUser
ldaprebind                        1
ldapuid                              11184 (vmail gid=
dirmaker                           /var/qmail/bin/dirmaker

And dirmaker's script:

#!/bin/sh
mkdir -m 700 -p $1

And for last, the more important, the Makefile of qmail-1.03, in this
file i have uncommentd the next lines:

      MDIRMAKE=DAUTOMAILDIRMAKE
      HDIRMAKE=DAUTOHOMEDIRMAKE


I hope you can help me i dont know where to read now.

Thanks and regards,
Layn.

   






 






Layn | 2 Oct 2005 00:38
Favicon

Re: Automaildir.

    Nothing, its the same:

    deferral: 
Unable_to_open_/var/qmail/maildirs/kare2:_is_a_directory._(#4.2.1)/

    This is the ldap's kare2 users:

shuhi:/var/qmail# /var/qmail/bin/qmail-ldaplookup -d 255 -m 
kare2 <at> example.com
Searching ldap for: 
(&(objectClass=qmailUser)(|(mail=kare2 <at> example.com)(mailAlternateAddress=kare2 <at> example.com)))
under dn: dc=example,dc=com
Found 1 entry:

dn: uid=kare2 <at> example.com,dc=example,dc=com
-------------------------------------------------------
objectClass: person
objectClass: top
objectClass: inetOrgPerson
objectClass: qmailUser
mail: kare2 <at> example.com
uid: kare2 <at> example.com
accountStatus: active
mailHost: smtp.example.com
homeDirectory: /var/qmail/maildirs/kare2
aliasEmpty: /var/qmail/maildirs/kare2
qmailDotMode: ldaponly
qmailUID: 11184
qmailGID: 2110
mailQuotaSize: 1000000
mailQuotaCount: 1000
mailSizeMax: 0 (unlimited)
deliveryMode: noprogram
mailReplyText: undefined

And it was create with the next attributes:

shuhi:/var/qmail# cat /tmp/user.ldif
dn: uid=kare2 <at> example.com,dc=example,dc=com
cn: kare2
sn: kare2
objectClass: person
objectClass: top
objectClass: inetOrgPerson
objectClass: qmailUser
o: example
uid: kare2 <at> example.com
mail: kare2 <at> example.com
mailHost: smtp.example.com
homeDirectory: /var/qmail/maildirs/kare2
mailMessageStore: /var/qmail/maildirs/kare2
userPassword: 123456
deliveryMode: noprogram
accountStatus: Active

ldapadd -x -H ldap://localhost/ -D "cn=admin,dc=example,dc=com" -W -f 
/tmp/user.ldif

And now, send a  mail to kare2:

#echo To: kare2 <at> example.com | /var/qmail/bin/qmail-inject

And the log:

 <at> 40000000433f09da0e33a49c info msg 811919: bytes 206 from 
<root <at> mail.example.com> qp 6269 uid 0
 <at> 40000000433f09da0f1e6a2c starting delivery 193: msg 811919 to local 
kare2 <at> example.com
 <at> 40000000433f09da0f2090f4 status: local 1/10 remote 0/20
 <at> 40000000433f09da115bee7c delivery 193: deferral: 
Unable_to_open_/var/qmail/maildirs/kare2:_is_a_directory._(#4.2.1)/

I have used the normal /var/qmail/bin/dirmaker and this:
#!/bin/sh
mkdir -m 700 -p $1
/var/qmail/bin/maildirmake $1/Maildir
chown -R vmail:vmail $1
chmod -R 700 $1

But the dir is ok:

    # ls -l /var/qmail/maildirs/
total 24
drwx------  3 vmail vmail 4096 2005-10-01 18:20 anata
drwx------  3 vmail vmail 4096 2005-10-01 18:20 anata2
drwx------  3 vmail vmail 4096 2005-10-01 18:23 anata3
drwx------  3 vmail vmail 4096 2005-10-02 00:08 kare
drwx------  3 vmail vmail 4096 2005-10-02 00:12 kare2
drwx------  3 vmail vmail 4096 2005-10-01 18:20 watashi3

# ls -l /var/qmail/maildirs/kare2/
total 4
drwx------  5 vmail vmail 4096 2005-10-01 18:20 Maildir

# ls -l /var/qmail/maildirs/kare2/Maildir/
total 12
drwx------  2 vmail vmail 4096 2005-10-01 18:20 cur
drwx------  2 vmail vmail 4096 2005-10-01 18:20 new
drwx------  2 vmail vmail 4096 2005-10-01 18:20 tmp

    Where can the problem be ?

    This is my /etc/ldap/slapd.conf:

# cat /etc/ldap/slapd.conf
# This is the main slapd configuration file. See slapd.conf(5) for more
# info on the configuration options.

#######################################################################
# Global Directives:

# Features to permit
#allow bind_v2

# Schema and objectClass definitions
include         /etc/ldap/schema/core.schema
include         /etc/ldap/schema/cosine.schema
include         /etc/ldap/schema/nis.schema
include         /etc/ldap/schema/inetorgperson.schema
include         /etc/ldap/schema/qmail.schema

# Schema check allows for forcing entries to
# match schemas for their objectClasses's
schemacheck     on

# Where the pid file is put. The init.d script
# will not stop the server if you change this.
pidfile         /var/run/slapd/slapd.pid

# List of arguments that were passed to the server
argsfile        /var/run/slapd.args

# Read slapd.conf(5) for possible values
loglevel        0

# Where the dynamically loaded modules are stored
modulepath      /usr/lib/ldap
moduleload      back_ldbm

#######################################################################
# Specific Backend Directives for ldbm:
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
backend         ldbm

#######################################################################
# Specific Directives for database #1, of type ldbm:
# Database specific directives apply to this databasse until another
# 'database' directive occurs
database        ldbm
suffix          "dc=example,dc=com"
#suffix         "o=example"
directory       "/var/lib/ldap"
index           objectClass eq
rootdn          "cn=admin,dc=example,dc=com"
rootbinddn      "cn=admin,dc=example,dc=com"
#rootpw         {SSHA}4162+KLfc6cKgOg7g6Os0lnfVKk6bHa8
rootpw          1234

    If a comment the rootpw directive i get the next error:

 <at> 40000000433f0e7a181707c4 info msg 811843: bytes 206 from 
<root <at> mail.example.com> qp 6326 uid 0
 <at> 40000000433f0e7a19025ddc starting delivery 207: msg 811843 to local 
kare2 <at> example.com
 <at> 40000000433f0e7a190484a4 status: local 1/10 remote 0/20
 <at> 40000000433f0e7a1a2c14b4 delivery 207: deferral: 
Unable_to_login_into_LDAP_server,_bad_credentials._(#4.4.3)/
 <at> 40000000433f0e7a1a2c37dc status: local 0/10 remote 0/20

    So i put uncoment.

    I dont think that the error is in slapd.conf, because, before (now 
no) if i created user/Maildir, it run, so i thinks the server is good, 
maybe a bad configuration with user definition or, Makefile of 
qmail-1.03 source i dont know, in Makefile i have do:

LDAPLIBS=-L/usr/local/lib -lldap -llber -lresolv (añadir -lresolv que no 
estaba).
MDIRMAKE=DAUTOMAILDIRMAKE
HDIRMAKE=DAUTOHOMEDIRMAKE

    And in qmail-ldap.h:

# cat /usr/local/src/qmail-1.03/qmail-ldap.h |grep LDAP_HOMEDIR
#define LDAP_HOMEDIR            "mailMessageStore"

    Thanks and regards.
    Layn.

>Hi,
>
>The 'accountStatus' attribute is missing from your user data output. For
>this account to be operational, the following attribute must be set for
>every mail user. You must include this attribute:value pair in the base ldif
>file that you create for every system user -
>
>accountStatus: Active
>
>The accountStatus attribute comes as a part of qmail schema. Have you
>included qmail.schema directive in /etc/openldap/slapd.conf ? If not, you
>have to define the following in slapd.conf
>
>include /etc/openldap/schema/qmail.schema
>
>Along with that, copy the file qmail.schema to /etc/openldap/schema/
>
>Finally, send a mail to this newly created user. I am sure it will work.
>
>Regards,
>
>Amit
>
>
>----- Original Message ----- 
>From: "Layn" <Layn <at> oscuridad.com>
>To: <qmail-ldap <at> qmail-ldap.org>
>Sent: Saturday, October 01, 2005 9:54 PM
>Subject: Re: Automaildir.
>
>
>  
>
>>    Thansk for your faster reply, now the directory is created:
>>
>>    drwx------  3 vmail vmail 4096 2005-10-01 18:20 anata
>>
>>    This directory is empty, no Maildir, no cur, no new, no tmp...
>>
>>    And the log say:
>>
>>    deferral:
>>Unable_to_open_/var/qmail/maildirs/anata2:_is_a_directory._(#4.2.1)
>>
>>    If manually i do the Maildir directory the answer is the same:
>>
>>    deferral:
>>Unable_to_open_/var/qmail/maildirs/anata2:_is_a_directory._(#4.2.1)
>>
>>
>>    The anata user:
>>
>>dn: uid=anata2,dc=example,dc=com
>>cn: anata2
>>sn: anata2
>>objectClass: person
>>objectClass: top
>>objectClass: inetOrgPerson
>>objectClass: qmailUser
>>o: example
>>uid: anata2
>>mail: anata2 <at> example.com
>>mailHost: smtp.example.com
>>homeDirectory: /var/qmail/maildirs/anata2
>>mailMessageStore: /var/qmail/maildirs/anata2
>>userPassword: 123456
>>
>>    Regards,
>>    Layn.
>>
>>    
>>
>>>Hi Layn,
>>>
>>>Solution is quite simple - I'll just point it out one by one
>>>
>>>1. In your qmail-1.03 source directory, locate the file 'qmail-ldap.h'.
>>>2. In this file, locate the parameter 'LDAP_HOMEDIR' and change its value
>>>      
>>>
>to
>  
>
>>>'mailMessageStore'
>>>3. Now go to the qmail source directory and recompile qmail-ldap with the
>>>command -
>>>make setup check
>>>4. In the directory /var/qmail/control, make sure u have the following
>>>control files with the contents given along with this...
>>>
>>>(I) ldapserver  - localhost
>>>(II) ldaplogin - 'cn=Manager,dc=yourdomain,dc=com'
>>>(III) ldappassword - 'yoursecretpassword'
>>>(IV) ldapbasedn - 'dc=yourdomain,dc=com'
>>>(V) ldaplocaldelivery - 1
>>>(VI) make sure localdomains and rcpthosts contain the name of ur domain
>>>
>>>5. chown root:qmail /var/qmail/control/ldap*
>>>
>>>Also make sure that your /etc/ldap.conf has enabled authentication for
>>>      
>>>
>the
>  
>
>>>domain manager i.e cn=Manager,dc=yourdomain,dc=com...Locate related
>>>      
>>>
>entries
>  
>
>>>in this file and make changes accordingly...
>>>
>>>rootbinddn cn=Manager,dc=yourdomain,dc=com
>>>Also uncomment the entry for password
>>>
>>>Now, when you create a new user, qmail will automatically create the
>>>      
>>>
>user's
>  
>
>>>home directory, which is also the maildir of user 'watashi' (
>>>/var/qmail/maildirs/watashi.  ). So the directory 'watashi' will be
>>>      
>>>
>created
>  
>
>>>as a maildir and not a mailbox directory.
>>>
>>>In case the maildir is not created, just send a mail to this newly
>>>      
>>>
>created
>  
>
>>>user 'watashi' with any demo text. qmail will then automatically create
>>>      
>>>
>the
>  
>
>>>desired maildir.
>>>
>>>Hope that helps. Good luck with your qmail-ldap installation.
>>>
>>>Regards,
>>>
>>>Amit
>>>
>>>----- Original Message ----- 
>>>From: "Layn" <Layn <at> oscuridad.com>
>>>To: <qmail-ldap <at> qmail-ldap.org>
>>>Sent: Saturday, October 01, 2005 8:49 PM
>>>Subject: Automaildir.
>>>
>>>
>>>
>>>
>>>      
>>>
>>>>   I know this is a comun problem, i have read similar post in this
>>>>list and anothers, but, i cant fix this error. So please if you have any
>>>>idea about its, please tell me.
>>>>
>>>>   My problem is the next:
>>>>
>>>>   When i send a mail to a local users (no sistem local, local of my
>>>>domains, defined in my ldap), i get the next error:
>>>>
>>>>   deferral:
>>>>
>>>>
>>>>
>>>>        
>>>>
>>Unable_to_switch_to_/var/qmail/maildirs/watashi3:_file_does_not_exist._(#4.
>>    
>>
>3
>  
>
>>>.0)
>>>
>>>
>>>      
>>>
>>>>   If i create this directory:
>>>>
>>>>  shuhi:/var/qmail# bin/dirmaker maildirs/watashi3
>>>>  shuhi:/var/qmail# chown -R vmail:vmail maildirs
>>>>  shuhi:/var/qmail# ls -l maildirs/
>>>>  total 4
>>>>  drwx------  2 vmail vmail 4096 2005-10-01 16:53 watashi3
>>>>
>>>>   The result is:
>>>>
>>>>   deferral: Unable_to_chdir_to_maildir._(#4.2.1)
>>>>
>>>>   It could be a problem of privilege, but if u see, the directory is
>>>>of vmail:vmail, so its correct, no problem with privilege.
>>>>   And now i create Maildir with maildirmake:
>>>>
>>>>   shuhi:/var/qmail# bin/maildirmake maildirs/watashi3/Maildir
>>>>   shuhi:/var/qmail# chown -R vmail:vmail maildirs
>>>>
>>>>   The result is:
>>>>
>>>>   success: did_1+0+0/
>>>>
>>>>   Correct!!! But no automatic.
>>>>
>>>>   The ldap's user configuration is:
>>>>
>>>>dn: uid=watashi3,dc=example,dc=com
>>>>cn: watashi3
>>>>sn: lin2
>>>>objectClass: person
>>>>objectClass: top
>>>>objectClass: inetOrgPerson
>>>>objectClass: qmailUser
>>>>o: example
>>>>uid: watashi3
>>>>mail: watashi3 <at> example.com
>>>>mailHost: smtp.example.com
>>>>mailMessageStore: /var/qmail/maildirs/watashi3
>>>>userPassword:: 123456
>>>>
>>>>If i put the homeDirectory's attribute, and i create the homeDirectory,
>>>>this automaty crea the mailbox, but the mailbox and i want maildir, no
>>>>mailbox.
>>>>
>>>>Control's files of interest:
>>>>
>>>>defaultdelivery                ./Maildir/
>>>>ldapgid                              2110  (vmail uid)
>>>>ldapmessagestore            /var/qmail/maildirs
>>>>ldapobjectclass                  qmailUser
>>>>ldaprebind                        1
>>>>ldapuid                              11184 (vmail gid=
>>>>dirmaker                           /var/qmail/bin/dirmaker
>>>>
>>>>And dirmaker's script:
>>>>
>>>>#!/bin/sh
>>>>mkdir -m 700 -p $1
>>>>
>>>>And for last, the more important, the Makefile of qmail-1.03, in this
>>>>file i have uncommentd the next lines:
>>>>
>>>>      MDIRMAKE=DAUTOMAILDIRMAKE
>>>>      HDIRMAKE=DAUTOHOMEDIRMAKE
>>>>
>>>>
>>>>I hope you can help me i dont know where to read now.
>>>>
>>>>Thanks and regards,
>>>>Layn.
>>>>
>>>>
>>>>        
>>>>
>>>
>>>
>>>
>>>
>>>      
>>>
>
>
>
>
>  
>

Layn | 2 Oct 2005 00:39
Favicon

Re: Automaildir.

    Thanks, i already did everythings, i have change my dirmaker script 
for create Maildir subdirectory, whitout any results.

    Any other idea ?

    Thanks.
    Layn.

> Hope this can help you:
>
> 1. be sure that your Makefile on qmail after applying the patch has 
> the following:
>
> # to enable the auto-maildir-make feature uncomment the next line
> MDIRMAKE=-DAUTOMAILDIRMAKE
>
> # to enable the auto-homedir-make feature uncomment the next line
> HDIRMAKE=-DAUTOHOMEDIRMAKE
>
>
> 2. After installing qmail-ldap go to you control files normally 
> located at /var/qmail/control
>
> then add this to that file
>
> cat  > /var/qmail/control/dirmaker
> /var/qmail/bin/dirmaker
>
> create the file /var/qmail/bin/dirmaker and put this on it: ( it may 
> change according to your installation)
>
> #!/bin/sh
> echo '---------------------------------------------' >> 
> /usr/home/qmail/dirmaker.log
> date >> /usr/home/qmail/dirmaker.log
> echo $1 >> /usr/home/qmail/dirmaker.log
> id >> /usr/home/qmail/dirmaker.log
> mkdir -m 700 -p $1
> /var/qmail/bin/maildirmake $1/Maildir
>
> that file is owned by root:qmail:
> % ll /var/qmail/bin/dirmaker 
> -rwxr-xr-x  1 root  qmail  264 Jun 16 11:53 dirmaker*
>
> also check the ldapmessagestore, on my case is : 
>
> /usr/home/qmail/maildirs  (directory owned by vmail:vmail)
>
> % ll /usr/home/qmail/
> -rw-r--r--  1 vmail  vmail  3562 Sep 12 23:13 dirmaker.log
> drwxr-xr-x  4 vmail  vmail   512 Sep 12 22:48 maildirs/
>
>
> 3. verify the perms
> on my case /usr/home/qmail/* is owned by vmail:vmail
>
> 4. here is an example of ldif:
>
> dn: uid=nbari <at> ejemplo.org 
> <mailto:nbari <at> ejemplo.org>,ou=ejemplo.org,ou=qmail,o=EJEMPLO,c=CA
> objectClass: top
> objectClass: person
> objectClass: inetOrgPerson
> objectClass: qmailUser
> uid: nbari <at> ejemplo.org <mailto:nbari <at> ejemplo.org>
> cn: nbari
> sn: nbari
> accountStatus: active
> mail: nbari <at> ejemplo.org <mailto:nbari <at> ejemplo.org>
> mailHost: ejemplo.org
> mailMessageStore: ejemplo.org/nbari
> deliveryMode: noprogram
> mailAlternateAddress: catchall <at> ejemplo.org <mailto:catchall <at> ejemplo.org>
>
>
>
>
> from: http://www.glaven.org/qmail-ldap.html
>
>     * dirmaker
>     * Dirmaker (which we altered our makefile for) allows us to
>       declare a script that will autocreate home directories for us
>       upon receipt of first email on a new account. So, create an LDAP
>       account for jasonpanopolous <at> glaven.org
>       <mailto:jasonpanopolous <at> glaven.org>, with a mailbox of
>       /mail/glaven.org/users/j/jasonpanopolous and dirmaker will
>       automagically create the directory (and tree), set permissions,
>       and deliver the mail there. I created /var/qmail/bin/dirmaker,
>       and put that path in my dirmaker control file. Here is the
>       contents of my dirmaker script
>
>
>
> Hope this can help you.
>
> Regards.
>
>
>
> On Oct 1, 2005, at 11:24 AM, Layn wrote:
>
>>    Thansk for your faster reply, now the directory is created:
>>
>>    drwx------  3 vmail vmail 4096 2005-10-01 18:20 anata
>>
>>    This directory is empty, no Maildir, no cur, no new, no tmp...
>>
>>    And the log say:
>>
>>    deferral: 
>> Unable_to_open_/var/qmail/maildirs/anata2:_is_a_directory._(#4.2.1)
>>
>>    If manually i do the Maildir directory the answer is the same:
>>
>>    deferral: 
>> Unable_to_open_/var/qmail/maildirs/anata2:_is_a_directory._(#4.2.1)
>>
>>   
>>
>>    The anata user:
>>
>> dn: uid=anata2,dc=example,dc=com
>> cn: anata2
>> sn: anata2
>> objectClass: person
>> objectClass: top
>> objectClass: inetOrgPerson
>> objectClass: qmailUser
>> o: example
>> uid: anata2
>> mail: anata2 <at> example.com <mailto:anata2 <at> example.com>
>> mailHost: smtp.example.com
>> homeDirectory: /var/qmail/maildirs/anata2
>> mailMessageStore: /var/qmail/maildirs/anata2
>> userPassword: 123456
>>
>>    Regards,
>>    Layn.
>>
>>
>>> Hi Layn,
>>>
>>> Solution is quite simple - I'll just point it out one by one
>>>
>>> 1. In your qmail-1.03 source directory, locate the file 'qmail-ldap.h'.
>>> 2. In this file, locate the parameter 'LDAP_HOMEDIR' and change its 
>>> value to
>>> 'mailMessageStore'
>>> 3. Now go to the qmail source directory and recompile qmail-ldap 
>>> with the
>>> command -
>>> make setup check
>>> 4. In the directory /var/qmail/control, make sure u have the following
>>> control files with the contents given along with this...
>>>
>>> (I) ldapserver  - localhost
>>> (II) ldaplogin - 'cn=Manager,dc=yourdomain,dc=com'
>>> (III) ldappassword - 'yoursecretpassword'
>>> (IV) ldapbasedn - 'dc=yourdomain,dc=com'
>>> (V) ldaplocaldelivery - 1
>>> (VI) make sure localdomains and rcpthosts contain the name of ur domain
>>>
>>> 5. chown root:qmail /var/qmail/control/ldap*
>>>
>>> Also make sure that your /etc/ldap.conf has enabled authentication 
>>> for the
>>> domain manager i.e cn=Manager,dc=yourdomain,dc=com...Locate related 
>>> entries
>>> in this file and make changes accordingly...
>>>
>>> rootbinddn cn=Manager,dc=yourdomain,dc=com
>>> Also uncomment the entry for password
>>>
>>> Now, when you create a new user, qmail will automatically create the 
>>> user's
>>> home directory, which is also the maildir of user 'watashi' (
>>> /var/qmail/maildirs/watashi.  ). So the directory 'watashi' will be 
>>> created
>>> as a maildir and not a mailbox directory.
>>>
>>> In case the maildir is not created, just send a mail to this newly 
>>> created
>>> user 'watashi' with any demo text. qmail will then automatically 
>>> create the
>>> desired maildir.
>>>
>>> Hope that helps. Good luck with your qmail-ldap installation.
>>>
>>> Regards,
>>>
>>> Amit
>>>
>>> ----- Original Message ----- From: "Layn" <Layn <at> oscuridad.com 
>>> <mailto:Layn <at> oscuridad.com>>
>>> To: <qmail-ldap <at> qmail-ldap.org <mailto:qmail-ldap <at> qmail-ldap.org>>
>>> Sent: Saturday, October 01, 2005 8:49 PM
>>> Subject: Automaildir.
>>>
>>>
>>>  
>>>
>>>
>>>>    I know this is a comun problem, i have read similar post in this
>>>> list and anothers, but, i cant fix this error. So please if you 
>>>> have any
>>>> idea about its, please tell me.
>>>>
>>>>    My problem is the next:
>>>>
>>>>    When i send a mail to a local users (no sistem local, local of my
>>>> domains, defined in my ldap), i get the next error:
>>>>
>>>>    deferral:
>>>>
>>>>    
>>>>
>>>>
>>> Unable_to_switch_to_/var/qmail/maildirs/watashi3:_file_does_not_exist._(#4.3
>>> .0)
>>>
>>>  
>>>
>>>
>>>>    If i create this directory:
>>>>
>>>>   shuhi:/var/qmail# bin/dirmaker maildirs/watashi3
>>>>   shuhi:/var/qmail# chown -R vmail:vmail maildirs
>>>>   shuhi:/var/qmail# ls -l maildirs/
>>>>   total 4
>>>>   drwx------  2 vmail vmail 4096 2005-10-01 16:53 watashi3
>>>>
>>>>    The result is:
>>>>
>>>>    deferral: Unable_to_chdir_to_maildir._(#4.2.1)
>>>>
>>>>    It could be a problem of privilege, but if u see, the directory is
>>>> of vmail:vmail, so its correct, no problem with privilege.
>>>>    And now i create Maildir with maildirmake:
>>>>
>>>>    shuhi:/var/qmail# bin/maildirmake maildirs/watashi3/Maildir
>>>>    shuhi:/var/qmail# chown -R vmail:vmail maildirs
>>>>
>>>>    The result is:
>>>>
>>>>    success: did_1+0+0/
>>>>
>>>>    Correct!!! But no automatic.
>>>>
>>>>    The ldap's user configuration is:
>>>>
>>>> dn: uid=watashi3,dc=example,dc=com
>>>> cn: watashi3
>>>> sn: lin2
>>>> objectClass: person
>>>> objectClass: top
>>>> objectClass: inetOrgPerson
>>>> objectClass: qmailUser
>>>> o: example
>>>> uid: watashi3
>>>> mail: watashi3 <at> example.com <mailto:watashi3 <at> example.com>
>>>> mailHost: smtp.example.com
>>>> mailMessageStore: /var/qmail/maildirs/watashi3
>>>> userPassword:: 123456
>>>>
>>>> If i put the homeDirectory's attribute, and i create the homeDirectory,
>>>> this automaty crea the mailbox, but the mailbox and i want maildir, no
>>>> mailbox.
>>>>
>>>> Control's files of interest:
>>>>
>>>> defaultdelivery                ./Maildir/
>>>> ldapgid                              2110  (vmail uid)
>>>> ldapmessagestore            /var/qmail/maildirs
>>>> ldapobjectclass                  qmailUser
>>>> ldaprebind                        1
>>>> ldapuid                              11184 (vmail gid=
>>>> dirmaker                           /var/qmail/bin/dirmaker
>>>>
>>>> And dirmaker's script:
>>>>
>>>> #!/bin/sh
>>>> mkdir -m 700 -p $1
>>>>
>>>> And for last, the more important, the Makefile of qmail-1.03, in this
>>>> file i have uncommentd the next lines:
>>>>
>>>>       MDIRMAKE=DAUTOMAILDIRMAKE
>>>>       HDIRMAKE=DAUTOHOMEDIRMAKE
>>>>
>>>>
>>>> I hope you can help me i dont know where to read now.
>>>>
>>>> Thanks and regards,
>>>> Layn.
>>>>
>>>>    
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>  
>>>
>>>
>>
>>
>>
>

Layn | 2 Oct 2005 01:00
Favicon

Re: Automaildir.

    More info, i have been modified the attribute deliveryMode in the 
ldap's user configuration, with this resultados:

    no deliveryMode:

    deferral: 
Unable_to_open_/var/qmail/maildirs/nekochan:_is_a_directory._(#4.2.1)/

    deliveryMode: noprogram

    deferral: 
Unable_to_open_/var/qmail/maildirs/nekochan3:_is_a_directory._(#4.2.1)/

    deliveryMode: nolocal

 <at> 40000000433f134506eb52fc starting delivery 238: msg 811947 to local 
neko2 <at> example.com
 <at> 40000000433f134506ed8d4c status: local 1/10 remote 0/20
 <at> 40000000433f1345082486ac delivery 238: success: did_0+0+0/
 <at> 40000000433f13450824a204 status: local 0/10 remote 0/20

    It look ok, but, the directory is empty :(

shuhi:/var/qmail/maildirs# ls -la neko2/Maildir/*/
neko2/Maildir/cur/:
total 8
drwx------  2 vmail vmail 4096 2005-10-02 00:51 .
drwx------  5 vmail vmail 4096 2005-10-02 00:51 ..

neko2/Maildir/new/:
total 8
drwx------  2 vmail vmail 4096 2005-10-02 00:51 .
drwx------  5 vmail vmail 4096 2005-10-02 00:51 ..

neko2/Maildir/tmp/:
total 8
drwx------  2 vmail vmail 4096 2005-10-02 00:51 .
drwx------  5 vmail vmail 4096 2005-10-02 00:51 ..

    Can the problem be in this attribute?

>    Nothing, its the same:
>
>    deferral: 
> Unable_to_open_/var/qmail/maildirs/kare2:_is_a_directory._(#4.2.1)/
>
>    This is the ldap's kare2 users:
>
> shuhi:/var/qmail# /var/qmail/bin/qmail-ldaplookup -d 255 -m 
> kare2 <at> example.com
> Searching ldap for: 
>
(&(objectClass=qmailUser)(|(mail=kare2 <at> example.com)(mailAlternateAddress=kare2 <at> example.com))) 
>
> under dn: dc=example,dc=com
> Found 1 entry:
>
> dn: uid=kare2 <at> example.com,dc=example,dc=com
> -------------------------------------------------------
> objectClass: person
> objectClass: top
> objectClass: inetOrgPerson
> objectClass: qmailUser
> mail: kare2 <at> example.com
> uid: kare2 <at> example.com
> accountStatus: active
> mailHost: smtp.example.com
> homeDirectory: /var/qmail/maildirs/kare2
> aliasEmpty: /var/qmail/maildirs/kare2
> qmailDotMode: ldaponly
> qmailUID: 11184
> qmailGID: 2110
> mailQuotaSize: 1000000
> mailQuotaCount: 1000
> mailSizeMax: 0 (unlimited)
> deliveryMode: noprogram
> mailReplyText: undefined
>
>
> And it was create with the next attributes:
>
> shuhi:/var/qmail# cat /tmp/user.ldif
> dn: uid=kare2 <at> example.com,dc=example,dc=com
> cn: kare2
> sn: kare2
> objectClass: person
> objectClass: top
> objectClass: inetOrgPerson
> objectClass: qmailUser
> o: example
> uid: kare2 <at> example.com
> mail: kare2 <at> example.com
> mailHost: smtp.example.com
> homeDirectory: /var/qmail/maildirs/kare2
> mailMessageStore: /var/qmail/maildirs/kare2
> userPassword: 123456
> deliveryMode: noprogram
> accountStatus: Active
>
> ldapadd -x -H ldap://localhost/ -D "cn=admin,dc=example,dc=com" -W -f 
> /tmp/user.ldif
>
> And now, send a  mail to kare2:
>
> #echo To: kare2 <at> example.com | /var/qmail/bin/qmail-inject
>
> And the log:
>
>  <at> 40000000433f09da0e33a49c info msg 811919: bytes 206 from 
> <root <at> mail.example.com> qp 6269 uid 0
>  <at> 40000000433f09da0f1e6a2c starting delivery 193: msg 811919 to local 
> kare2 <at> example.com
>  <at> 40000000433f09da0f2090f4 status: local 1/10 remote 0/20
>  <at> 40000000433f09da115bee7c delivery 193: deferral: 
> Unable_to_open_/var/qmail/maildirs/kare2:_is_a_directory._(#4.2.1)/
>
>
> I have used the normal /var/qmail/bin/dirmaker and this:
> #!/bin/sh
> mkdir -m 700 -p $1
> /var/qmail/bin/maildirmake $1/Maildir
> chown -R vmail:vmail $1
> chmod -R 700 $1
>
> But the dir is ok:
>
>    # ls -l /var/qmail/maildirs/
> total 24
> drwx------  3 vmail vmail 4096 2005-10-01 18:20 anata
> drwx------  3 vmail vmail 4096 2005-10-01 18:20 anata2
> drwx------  3 vmail vmail 4096 2005-10-01 18:23 anata3
> drwx------  3 vmail vmail 4096 2005-10-02 00:08 kare
> drwx------  3 vmail vmail 4096 2005-10-02 00:12 kare2
> drwx------  3 vmail vmail 4096 2005-10-01 18:20 watashi3
>
> # ls -l /var/qmail/maildirs/kare2/
> total 4
> drwx------  5 vmail vmail 4096 2005-10-01 18:20 Maildir
>
> # ls -l /var/qmail/maildirs/kare2/Maildir/
> total 12
> drwx------  2 vmail vmail 4096 2005-10-01 18:20 cur
> drwx------  2 vmail vmail 4096 2005-10-01 18:20 new
> drwx------  2 vmail vmail 4096 2005-10-01 18:20 tmp
>
>    Where can the problem be ?
>      This is my /etc/ldap/slapd.conf:
>
> # cat /etc/ldap/slapd.conf
> # This is the main slapd configuration file. See slapd.conf(5) for more
> # info on the configuration options.
>
> #######################################################################
> # Global Directives:
>
> # Features to permit
> #allow bind_v2
>
> # Schema and objectClass definitions
> include         /etc/ldap/schema/core.schema
> include         /etc/ldap/schema/cosine.schema
> include         /etc/ldap/schema/nis.schema
> include         /etc/ldap/schema/inetorgperson.schema
> include         /etc/ldap/schema/qmail.schema
>
> # Schema check allows for forcing entries to
> # match schemas for their objectClasses's
> schemacheck     on
>
> # Where the pid file is put. The init.d script
> # will not stop the server if you change this.
> pidfile         /var/run/slapd/slapd.pid
>
> # List of arguments that were passed to the server
> argsfile        /var/run/slapd.args
>
> # Read slapd.conf(5) for possible values
> loglevel        0
>
> # Where the dynamically loaded modules are stored
> modulepath      /usr/lib/ldap
> moduleload      back_ldbm
>
> #######################################################################
> # Specific Backend Directives for ldbm:
> # Backend specific directives apply to this backend until another
> # 'backend' directive occurs
> backend         ldbm
>
> #######################################################################
> # Specific Directives for database #1, of type ldbm:
> # Database specific directives apply to this databasse until another
> # 'database' directive occurs
> database        ldbm
> suffix          "dc=example,dc=com"
> #suffix         "o=example"
> directory       "/var/lib/ldap"
> index           objectClass eq
> rootdn          "cn=admin,dc=example,dc=com"
> rootbinddn      "cn=admin,dc=example,dc=com"
> #rootpw         {SSHA}4162+KLfc6cKgOg7g6Os0lnfVKk6bHa8
> rootpw          1234
>
>
>
>    If a comment the rootpw directive i get the next error:
>
>  <at> 40000000433f0e7a181707c4 info msg 811843: bytes 206 from 
> <root <at> mail.example.com> qp 6326 uid 0
>  <at> 40000000433f0e7a19025ddc starting delivery 207: msg 811843 to local 
> kare2 <at> example.com
>  <at> 40000000433f0e7a190484a4 status: local 1/10 remote 0/20
>  <at> 40000000433f0e7a1a2c14b4 delivery 207: deferral: 
> Unable_to_login_into_LDAP_server,_bad_credentials._(#4.4.3)/
>  <at> 40000000433f0e7a1a2c37dc status: local 0/10 remote 0/20
>
>    So i put uncoment.
>
>    I dont think that the error is in slapd.conf, because, before (now 
> no) if i created user/Maildir, it run, so i thinks the server is good, 
> maybe a bad configuration with user definition or, Makefile of 
> qmail-1.03 source i dont know, in Makefile i have do:
>
> LDAPLIBS=-L/usr/local/lib -lldap -llber -lresolv (añadir -lresolv que 
> no estaba).
> MDIRMAKE=DAUTOMAILDIRMAKE
> HDIRMAKE=DAUTOHOMEDIRMAKE
>
>    And in qmail-ldap.h:
>
> # cat /usr/local/src/qmail-1.03/qmail-ldap.h |grep LDAP_HOMEDIR
> #define LDAP_HOMEDIR            "mailMessageStore"
>
>
>
>    Thanks and regards.
>    Layn.
>
>> Hi,
>>
>> The 'accountStatus' attribute is missing from your user data output. For
>> this account to be operational, the following attribute must be set for
>> every mail user. You must include this attribute:value pair in the 
>> base ldif
>> file that you create for every system user -
>>
>> accountStatus: Active
>>
>> The accountStatus attribute comes as a part of qmail schema. Have you
>> included qmail.schema directive in /etc/openldap/slapd.conf ? If not, 
>> you
>> have to define the following in slapd.conf
>>
>> include /etc/openldap/schema/qmail.schema
>>
>> Along with that, copy the file qmail.schema to /etc/openldap/schema/
>>
>> Finally, send a mail to this newly created user. I am sure it will work.
>>
>> Regards,
>>
>> Amit
>>
>>
>> ----- Original Message ----- From: "Layn" <Layn <at> oscuridad.com>
>> To: <qmail-ldap <at> qmail-ldap.org>
>> Sent: Saturday, October 01, 2005 9:54 PM
>> Subject: Re: Automaildir.
>>
>>
>>  
>>
>>>    Thansk for your faster reply, now the directory is created:
>>>
>>>    drwx------  3 vmail vmail 4096 2005-10-01 18:20 anata
>>>
>>>    This directory is empty, no Maildir, no cur, no new, no tmp...
>>>
>>>    And the log say:
>>>
>>>    deferral:
>>> Unable_to_open_/var/qmail/maildirs/anata2:_is_a_directory._(#4.2.1)
>>>
>>>    If manually i do the Maildir directory the answer is the same:
>>>
>>>    deferral:
>>> Unable_to_open_/var/qmail/maildirs/anata2:_is_a_directory._(#4.2.1)
>>>
>>>
>>>    The anata user:
>>>
>>> dn: uid=anata2,dc=example,dc=com
>>> cn: anata2
>>> sn: anata2
>>> objectClass: person
>>> objectClass: top
>>> objectClass: inetOrgPerson
>>> objectClass: qmailUser
>>> o: example
>>> uid: anata2
>>> mail: anata2 <at> example.com
>>> mailHost: smtp.example.com
>>> homeDirectory: /var/qmail/maildirs/anata2
>>> mailMessageStore: /var/qmail/maildirs/anata2
>>> userPassword: 123456
>>>
>>>    Regards,
>>>    Layn.
>>>
>>>   
>>>
>>>> Hi Layn,
>>>>
>>>> Solution is quite simple - I'll just point it out one by one
>>>>
>>>> 1. In your qmail-1.03 source directory, locate the file 
>>>> 'qmail-ldap.h'.
>>>> 2. In this file, locate the parameter 'LDAP_HOMEDIR' and change its 
>>>> value
>>>>     
>>>
>> to
>>  
>>
>>>> 'mailMessageStore'
>>>> 3. Now go to the qmail source directory and recompile qmail-ldap 
>>>> with the
>>>> command -
>>>> make setup check
>>>> 4. In the directory /var/qmail/control, make sure u have the following
>>>> control files with the contents given along with this...
>>>>
>>>> (I) ldapserver  - localhost
>>>> (II) ldaplogin - 'cn=Manager,dc=yourdomain,dc=com'
>>>> (III) ldappassword - 'yoursecretpassword'
>>>> (IV) ldapbasedn - 'dc=yourdomain,dc=com'
>>>> (V) ldaplocaldelivery - 1
>>>> (VI) make sure localdomains and rcpthosts contain the name of ur 
>>>> domain
>>>>
>>>> 5. chown root:qmail /var/qmail/control/ldap*
>>>>
>>>> Also make sure that your /etc/ldap.conf has enabled authentication for
>>>>     
>>>
>> the
>>  
>>
>>>> domain manager i.e cn=Manager,dc=yourdomain,dc=com...Locate related
>>>>     
>>>
>> entries
>>  
>>
>>>> in this file and make changes accordingly...
>>>>
>>>> rootbinddn cn=Manager,dc=yourdomain,dc=com
>>>> Also uncomment the entry for password
>>>>
>>>> Now, when you create a new user, qmail will automatically create the
>>>>     
>>>
>> user's
>>  
>>
>>>> home directory, which is also the maildir of user 'watashi' (
>>>> /var/qmail/maildirs/watashi.  ). So the directory 'watashi' will be
>>>>     
>>>
>> created
>>  
>>
>>>> as a maildir and not a mailbox directory.
>>>>
>>>> In case the maildir is not created, just send a mail to this newly
>>>>     
>>>
>> created
>>  
>>
>>>> user 'watashi' with any demo text. qmail will then automatically 
>>>> create
>>>>     
>>>
>> the
>>  
>>
>>>> desired maildir.
>>>>
>>>> Hope that helps. Good luck with your qmail-ldap installation.
>>>>
>>>> Regards,
>>>>
>>>> Amit
>>>>
>>>> ----- Original Message ----- From: "Layn" <Layn <at> oscuridad.com>
>>>> To: <qmail-ldap <at> qmail-ldap.org>
>>>> Sent: Saturday, October 01, 2005 8:49 PM
>>>> Subject: Automaildir.
>>>>
>>>>
>>>>
>>>>
>>>>     
>>>>
>>>>>   I know this is a comun problem, i have read similar post in this
>>>>> list and anothers, but, i cant fix this error. So please if you 
>>>>> have any
>>>>> idea about its, please tell me.
>>>>>
>>>>>   My problem is the next:
>>>>>
>>>>>   When i send a mail to a local users (no sistem local, local of my
>>>>> domains, defined in my ldap), i get the next error:
>>>>>
>>>>>   deferral:
>>>>>
>>>>>
>>>>>
>>>>>       
>>>>
>>> Unable_to_switch_to_/var/qmail/maildirs/watashi3:_file_does_not_exist._(#4. 
>>>
>>>   
>>
>> 3
>>  
>>
>>>> .0)
>>>>
>>>>
>>>>     
>>>>
>>>>>   If i create this directory:
>>>>>
>>>>>  shuhi:/var/qmail# bin/dirmaker maildirs/watashi3
>>>>>  shuhi:/var/qmail# chown -R vmail:vmail maildirs
>>>>>  shuhi:/var/qmail# ls -l maildirs/
>>>>>  total 4
>>>>>  drwx------  2 vmail vmail 4096 2005-10-01 16:53 watashi3
>>>>>
>>>>>   The result is:
>>>>>
>>>>>   deferral: Unable_to_chdir_to_maildir._(#4.2.1)
>>>>>
>>>>>   It could be a problem of privilege, but if u see, the directory is
>>>>> of vmail:vmail, so its correct, no problem with privilege.
>>>>>   And now i create Maildir with maildirmake:
>>>>>
>>>>>   shuhi:/var/qmail# bin/maildirmake maildirs/watashi3/Maildir
>>>>>   shuhi:/var/qmail# chown -R vmail:vmail maildirs
>>>>>
>>>>>   The result is:
>>>>>
>>>>>   success: did_1+0+0/
>>>>>
>>>>>   Correct!!! But no automatic.
>>>>>
>>>>>   The ldap's user configuration is:
>>>>>
>>>>> dn: uid=watashi3,dc=example,dc=com
>>>>> cn: watashi3
>>>>> sn: lin2
>>>>> objectClass: person
>>>>> objectClass: top
>>>>> objectClass: inetOrgPerson
>>>>> objectClass: qmailUser
>>>>> o: example
>>>>> uid: watashi3
>>>>> mail: watashi3 <at> example.com
>>>>> mailHost: smtp.example.com
>>>>> mailMessageStore: /var/qmail/maildirs/watashi3
>>>>> userPassword:: 123456
>>>>>
>>>>> If i put the homeDirectory's attribute, and i create the 
>>>>> homeDirectory,
>>>>> this automaty crea the mailbox, but the mailbox and i want 
>>>>> maildir, no
>>>>> mailbox.
>>>>>
>>>>> Control's files of interest:
>>>>>
>>>>> defaultdelivery                ./Maildir/
>>>>> ldapgid                              2110  (vmail uid)
>>>>> ldapmessagestore            /var/qmail/maildirs
>>>>> ldapobjectclass                  qmailUser
>>>>> ldaprebind                        1
>>>>> ldapuid                              11184 (vmail gid=
>>>>> dirmaker                           /var/qmail/bin/dirmaker
>>>>>
>>>>> And dirmaker's script:
>>>>>
>>>>> #!/bin/sh
>>>>> mkdir -m 700 -p $1
>>>>>
>>>>> And for last, the more important, the Makefile of qmail-1.03, in this
>>>>> file i have uncommentd the next lines:
>>>>>
>>>>>      MDIRMAKE=DAUTOMAILDIRMAKE
>>>>>      HDIRMAKE=DAUTOHOMEDIRMAKE
>>>>>
>>>>>
>>>>> I hope you can help me i dont know where to read now.
>>>>>
>>>>> Thanks and regards,
>>>>> Layn.
>>>>>
>>>>>
>>>>>       
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>     
>>>
>>
>>
>>
>>
>>  
>>
>
>
>

Favicon

Re: Automaildir.

On mailMessageStore: just put the domain name and the user do not put  
the full path, something like this:

mailMessageStore:  kare2

do not put /var/qmail/maildirs/kare2

ldap will use the info that is on ldapmessagestore for going to the  
users home.

regards.

On Oct 1, 2005, at 5:38 PM, Layn wrote:

>    Nothing, its the same:
>
>    deferral: Unable_to_open_/var/qmail/maildirs/ 
> kare2:_is_a_directory._(#4.2.1)/
>
>    This is the ldap's kare2 users:
>
> shuhi:/var/qmail# /var/qmail/bin/qmail-ldaplookup -d 255 -m  
> kare2 <at> example.com
> Searching ldap for: (&(objectClass=qmailUser)(| 
> (mail=kare2 <at> example.com)(mailAlternateAddress=kare2 <at> example.com)))
> under dn: dc=example,dc=com
> Found 1 entry:
>
> dn: uid=kare2 <at> example.com,dc=example,dc=com
> -------------------------------------------------------
> objectClass: person
> objectClass: top
> objectClass: inetOrgPerson
> objectClass: qmailUser
> mail: kare2 <at> example.com
> uid: kare2 <at> example.com
> accountStatus: active
> mailHost: smtp.example.com
> homeDirectory: /var/qmail/maildirs/kare2
> aliasEmpty: /var/qmail/maildirs/kare2
> qmailDotMode: ldaponly
> qmailUID: 11184
> qmailGID: 2110
> mailQuotaSize: 1000000
> mailQuotaCount: 1000
> mailSizeMax: 0 (unlimited)
> deliveryMode: noprogram
> mailReplyText: undefined
>
>
> And it was create with the next attributes:
>
> shuhi:/var/qmail# cat /tmp/user.ldif
> dn: uid=kare2 <at> example.com,dc=example,dc=com
> cn: kare2
> sn: kare2
> objectClass: person
> objectClass: top
> objectClass: inetOrgPerson
> objectClass: qmailUser
> o: example
> uid: kare2 <at> example.com
> mail: kare2 <at> example.com
> mailHost: smtp.example.com
> homeDirectory: /var/qmail/maildirs/kare2
> mailMessageStore: /var/qmail/maildirs/kare2
> userPassword: 123456
> deliveryMode: noprogram
> accountStatus: Active
>
> ldapadd -x -H ldap://localhost/ -D "cn=admin,dc=example,dc=com" -W - 
> f /tmp/user.ldif
>
> And now, send a  mail to kare2:
>
> #echo To: kare2 <at> example.com | /var/qmail/bin/qmail-inject
>
> And the log:
>
>  <at> 40000000433f09da0e33a49c info msg 811919: bytes 206 from  
> <root <at> mail.example.com> qp 6269 uid 0
>  <at> 40000000433f09da0f1e6a2c starting delivery 193: msg 811919 to  
> local kare2 <at> example.com
>  <at> 40000000433f09da0f2090f4 status: local 1/10 remote 0/20
>  <at> 40000000433f09da115bee7c delivery 193: deferral: Unable_to_open_/ 
> var/qmail/maildirs/kare2:_is_a_directory._(#4.2.1)/
>
>
> I have used the normal /var/qmail/bin/dirmaker and this:
> #!/bin/sh
> mkdir -m 700 -p $1
> /var/qmail/bin/maildirmake $1/Maildir
> chown -R vmail:vmail $1
> chmod -R 700 $1
>
> But the dir is ok:
>
>    # ls -l /var/qmail/maildirs/
> total 24
> drwx------  3 vmail vmail 4096 2005-10-01 18:20 anata
> drwx------  3 vmail vmail 4096 2005-10-01 18:20 anata2
> drwx------  3 vmail vmail 4096 2005-10-01 18:23 anata3
> drwx------  3 vmail vmail 4096 2005-10-02 00:08 kare
> drwx------  3 vmail vmail 4096 2005-10-02 00:12 kare2
> drwx------  3 vmail vmail 4096 2005-10-01 18:20 watashi3
>
> # ls -l /var/qmail/maildirs/kare2/
> total 4
> drwx------  5 vmail vmail 4096 2005-10-01 18:20 Maildir
>
> # ls -l /var/qmail/maildirs/kare2/Maildir/
> total 12
> drwx------  2 vmail vmail 4096 2005-10-01 18:20 cur
> drwx------  2 vmail vmail 4096 2005-10-01 18:20 new
> drwx------  2 vmail vmail 4096 2005-10-01 18:20 tmp
>
>    Where can the problem be ?
>      This is my /etc/ldap/slapd.conf:
>
> # cat /etc/ldap/slapd.conf
> # This is the main slapd configuration file. See slapd.conf(5) for  
> more
> # info on the configuration options.
>
> ###################################################################### 
> #
> # Global Directives:
>
> # Features to permit
> #allow bind_v2
>
> # Schema and objectClass definitions
> include         /etc/ldap/schema/core.schema
> include         /etc/ldap/schema/cosine.schema
> include         /etc/ldap/schema/nis.schema
> include         /etc/ldap/schema/inetorgperson.schema
> include         /etc/ldap/schema/qmail.schema
>
> # Schema check allows for forcing entries to
> # match schemas for their objectClasses's
> schemacheck     on
>
> # Where the pid file is put. The init.d script
> # will not stop the server if you change this.
> pidfile         /var/run/slapd/slapd.pid
>
> # List of arguments that were passed to the server
> argsfile        /var/run/slapd.args
>
> # Read slapd.conf(5) for possible values
> loglevel        0
>
> # Where the dynamically loaded modules are stored
> modulepath      /usr/lib/ldap
> moduleload      back_ldbm
>
> ###################################################################### 
> #
> # Specific Backend Directives for ldbm:
> # Backend specific directives apply to this backend until another
> # 'backend' directive occurs
> backend         ldbm
>
> ###################################################################### 
> #
> # Specific Directives for database #1, of type ldbm:
> # Database specific directives apply to this databasse until another
> # 'database' directive occurs
> database        ldbm
> suffix          "dc=example,dc=com"
> #suffix         "o=example"
> directory       "/var/lib/ldap"
> index           objectClass eq
> rootdn          "cn=admin,dc=example,dc=com"
> rootbinddn      "cn=admin,dc=example,dc=com"
> #rootpw         {SSHA}4162+KLfc6cKgOg7g6Os0lnfVKk6bHa8
> rootpw          1234
>
>
>
>    If a comment the rootpw directive i get the next error:
>
>  <at> 40000000433f0e7a181707c4 info msg 811843: bytes 206 from  
> <root <at> mail.example.com> qp 6326 uid 0
>  <at> 40000000433f0e7a19025ddc starting delivery 207: msg 811843 to  
> local kare2 <at> example.com
>  <at> 40000000433f0e7a190484a4 status: local 1/10 remote 0/20
>  <at> 40000000433f0e7a1a2c14b4 delivery 207: deferral:  
> Unable_to_login_into_LDAP_server,_bad_credentials._(#4.4.3)/
>  <at> 40000000433f0e7a1a2c37dc status: local 0/10 remote 0/20
>
>    So i put uncoment.
>
>    I dont think that the error is in slapd.conf, because, before  
> (now no) if i created user/Maildir, it run, so i thinks the server  
> is good, maybe a bad configuration with user definition or,  
> Makefile of qmail-1.03 source i dont know, in Makefile i have do:
>
> LDAPLIBS=-L/usr/local/lib -lldap -llber -lresolv (añadir -lresolv  
> que no estaba).
> MDIRMAKE=DAUTOMAILDIRMAKE
> HDIRMAKE=DAUTOHOMEDIRMAKE
>
>    And in qmail-ldap.h:
>
> # cat /usr/local/src/qmail-1.03/qmail-ldap.h |grep LDAP_HOMEDIR
> #define LDAP_HOMEDIR            "mailMessageStore"
>
>
>
>    Thanks and regards.
>    Layn.
>
>
>> Hi,
>>
>> The 'accountStatus' attribute is missing from your user data  
>> output. For
>> this account to be operational, the following attribute must be  
>> set for
>> every mail user. You must include this attribute:value pair in the  
>> base ldif
>> file that you create for every system user -
>>
>> accountStatus: Active
>>
>> The accountStatus attribute comes as a part of qmail schema. Have you
>> included qmail.schema directive in /etc/openldap/slapd.conf ? If  
>> not, you
>> have to define the following in slapd.conf
>>
>> include /etc/openldap/schema/qmail.schema
>>
>> Along with that, copy the file qmail.schema to /etc/openldap/schema/
>>
>> Finally, send a mail to this newly created user. I am sure it will  
>> work.
>>
>> Regards,
>>
>> Amit
>>
>>
>> ----- Original Message ----- From: "Layn" <Layn <at> oscuridad.com>
>> To: <qmail-ldap <at> qmail-ldap.org>
>> Sent: Saturday, October 01, 2005 9:54 PM
>> Subject: Re: Automaildir.
>>
>>
>>
>>
>>>    Thansk for your faster reply, now the directory is created:
>>>
>>>    drwx------  3 vmail vmail 4096 2005-10-01 18:20 anata
>>>
>>>    This directory is empty, no Maildir, no cur, no new, no tmp...
>>>
>>>    And the log say:
>>>
>>>    deferral:
>>> Unable_to_open_/var/qmail/maildirs/anata2:_is_a_directory._(#4.2.1)
>>>
>>>    If manually i do the Maildir directory the answer is the same:
>>>
>>>    deferral:
>>> Unable_to_open_/var/qmail/maildirs/anata2:_is_a_directory._(#4.2.1)
>>>
>>>
>>>    The anata user:
>>>
>>> dn: uid=anata2,dc=example,dc=com
>>> cn: anata2
>>> sn: anata2
>>> objectClass: person
>>> objectClass: top
>>> objectClass: inetOrgPerson
>>> objectClass: qmailUser
>>> o: example
>>> uid: anata2
>>> mail: anata2 <at> example.com
>>> mailHost: smtp.example.com
>>> homeDirectory: /var/qmail/maildirs/anata2
>>> mailMessageStore: /var/qmail/maildirs/anata2
>>> userPassword: 123456
>>>
>>>    Regards,
>>>    Layn.
>>>
>>>
>>>
>>>> Hi Layn,
>>>>
>>>> Solution is quite simple - I'll just point it out one by one
>>>>
>>>> 1. In your qmail-1.03 source directory, locate the file 'qmail- 
>>>> ldap.h'.
>>>> 2. In this file, locate the parameter 'LDAP_HOMEDIR' and change  
>>>> its value
>>>>
>>>>
>> to
>>
>>
>>>> 'mailMessageStore'
>>>> 3. Now go to the qmail source directory and recompile qmail-ldap  
>>>> with the
>>>> command -
>>>> make setup check
>>>> 4. In the directory /var/qmail/control, make sure u have the  
>>>> following
>>>> control files with the contents given along with this...
>>>>
>>>> (I) ldapserver  - localhost
>>>> (II) ldaplogin - 'cn=Manager,dc=yourdomain,dc=com'
>>>> (III) ldappassword - 'yoursecretpassword'
>>>> (IV) ldapbasedn - 'dc=yourdomain,dc=com'
>>>> (V) ldaplocaldelivery - 1
>>>> (VI) make sure localdomains and rcpthosts contain the name of ur  
>>>> domain
>>>>
>>>> 5. chown root:qmail /var/qmail/control/ldap*
>>>>
>>>> Also make sure that your /etc/ldap.conf has enabled  
>>>> authentication for
>>>>
>>>>
>> the
>>
>>
>>>> domain manager i.e cn=Manager,dc=yourdomain,dc=com...Locate related
>>>>
>>>>
>> entries
>>
>>
>>>> in this file and make changes accordingly...
>>>>
>>>> rootbinddn cn=Manager,dc=yourdomain,dc=com
>>>> Also uncomment the entry for password
>>>>
>>>> Now, when you create a new user, qmail will automatically create  
>>>> the
>>>>
>>>>
>> user's
>>
>>
>>>> home directory, which is also the maildir of user 'watashi' (
>>>> /var/qmail/maildirs/watashi.  ). So the directory 'watashi' will be
>>>>
>>>>
>> created
>>
>>
>>>> as a maildir and not a mailbox directory.
>>>>
>>>> In case the maildir is not created, just send a mail to this newly
>>>>
>>>>
>> created
>>
>>
>>>> user 'watashi' with any demo text. qmail will then automatically  
>>>> create
>>>>
>>>>
>> the
>>
>>
>>>> desired maildir.
>>>>
>>>> Hope that helps. Good luck with your qmail-ldap installation.
>>>>
>>>> Regards,
>>>>
>>>> Amit
>>>>
>>>> ----- Original Message ----- From: "Layn" <Layn <at> oscuridad.com>
>>>> To: <qmail-ldap <at> qmail-ldap.org>
>>>> Sent: Saturday, October 01, 2005 8:49 PM
>>>> Subject: Automaildir.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>   I know this is a comun problem, i have read similar post in this
>>>>> list and anothers, but, i cant fix this error. So please if you  
>>>>> have any
>>>>> idea about its, please tell me.
>>>>>
>>>>>   My problem is the next:
>>>>>
>>>>>   When i send a mail to a local users (no sistem local, local  
>>>>> of my
>>>>> domains, defined in my ldap), i get the next error:
>>>>>
>>>>>   deferral:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>> Unable_to_switch_to_/var/qmail/maildirs/ 
>>> watashi3:_file_does_not_exist._(#4.
>>>
>>>
>> 3
>>
>>
>>>> .0)
>>>>
>>>>
>>>>
>>>>
>>>>>   If i create this directory:
>>>>>
>>>>>  shuhi:/var/qmail# bin/dirmaker maildirs/watashi3
>>>>>  shuhi:/var/qmail# chown -R vmail:vmail maildirs
>>>>>  shuhi:/var/qmail# ls -l maildirs/
>>>>>  total 4
>>>>>  drwx------  2 vmail vmail 4096 2005-10-01 16:53 watashi3
>>>>>
>>>>>   The result is:
>>>>>
>>>>>   deferral: Unable_to_chdir_to_maildir._(#4.2.1)
>>>>>
>>>>>   It could be a problem of privilege, but if u see, the  
>>>>> directory is
>>>>> of vmail:vmail, so its correct, no problem with privilege.
>>>>>   And now i create Maildir with maildirmake:
>>>>>
>>>>>   shuhi:/var/qmail# bin/maildirmake maildirs/watashi3/Maildir
>>>>>   shuhi:/var/qmail# chown -R vmail:vmail maildirs
>>>>>
>>>>>   The result is:
>>>>>
>>>>>   success: did_1+0+0/
>>>>>
>>>>>   Correct!!! But no automatic.
>>>>>
>>>>>   The ldap's user configuration is:
>>>>>
>>>>> dn: uid=watashi3,dc=example,dc=com
>>>>> cn: watashi3
>>>>> sn: lin2
>>>>> objectClass: person
>>>>> objectClass: top
>>>>> objectClass: inetOrgPerson
>>>>> objectClass: qmailUser
>>>>> o: example
>>>>> uid: watashi3
>>>>> mail: watashi3 <at> example.com
>>>>> mailHost: smtp.example.com
>>>>> mailMessageStore: /var/qmail/maildirs/watashi3
>>>>> userPassword:: 123456
>>>>>
>>>>> If i put the homeDirectory's attribute, and i create the  
>>>>> homeDirectory,
>>>>> this automaty crea the mailbox, but the mailbox and i want  
>>>>> maildir, no
>>>>> mailbox.
>>>>>
>>>>> Control's files of interest:
>>>>>
>>>>> defaultdelivery                ./Maildir/
>>>>> ldapgid                              2110  (vmail uid)
>>>>> ldapmessagestore            /var/qmail/maildirs
>>>>> ldapobjectclass                  qmailUser
>>>>> ldaprebind                        1
>>>>> ldapuid                              11184 (vmail gid=
>>>>> dirmaker                           /var/qmail/bin/dirmaker
>>>>>
>>>>> And dirmaker's script:
>>>>>
>>>>> #!/bin/sh
>>>>> mkdir -m 700 -p $1
>>>>>
>>>>> And for last, the more important, the Makefile of qmail-1.03,  
>>>>> in this
>>>>> file i have uncommentd the next lines:
>>>>>
>>>>>      MDIRMAKE=DAUTOMAILDIRMAKE
>>>>>      HDIRMAKE=DAUTOHOMEDIRMAKE
>>>>>
>>>>>
>>>>> I hope you can help me i dont know where to read now.
>>>>>
>>>>> Thanks and regards,
>>>>> Layn.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>
>>
>>
>>
>>
>>
>
>
>


Gmane