On Thu, May 12, 2005 at 06:20:24PM +0530, Sameer N I wrote:
> Claudio Jeker wrote:
> >On Thu, May 12, 2005 at 05:43:02PM +0530, Sameer N I wrote:
> >>Claudio Jeker wrote:
> >>>On Thu, May 12, 2005 at 04:06:17PM +0530, Sameer N I wrote:
> >>>>Sameer N I wrote:
> >>>>>Sameer N I wrote:
> >>>>>>Tomas Kuliavas wrote:
> >>>>>>
> >>>>>>           
> >>>>>>
> >>>...
> >>>
> >>>     
> >>>
> >>>>>>I want to use /var/vmail for virtual users.  So my mailmessagestore 
> >>>>>>should have
> >>>>>>/var/vmail
> >>>>>>---< snip >---
> >>>>>>quark:/home/sam# cat /var/qmail/control/defaultdelivery
> >>>>>>./Maildir/
> >>>>>>quark:/home/sam#
> >>>>>>---< snip >---
> >>>>>>
> >>>>>>One thing I noticed that when I add an entry for the user admin
> >>>>>>I add it **explicitely** as
> >>>>>>
> >>>>>>mailMessageStore: /var/vmail/admin/Maildir/
> >>>>>>
> >>>>>>and after I /var/qmail/bin/qmail-ldaplookup -u admin
> >>>>>>
> >>>>>>It shows me as homeDirectory: /var/vmail/admin/Maildir/
> >>>>>>
> >>>>>>How?
> >>>>>>     
> >>>>>>
> >>>>One more thing I did is I tried to list all the entries in my ldap 
> >>>>(since there are fewer entries)
> >>>>It shows this attribute as mailMessageStore and not homeDirectory.
> >>>>Which means its /var/qmail/bin/qmail-ldaplookup who is interpreting it 
> >>>>in a wrong way or
> >>>>some setting that is wrong somewhere.
> >>>>
> >>>>
> >>>That's simple, mailMessageStore and homeDirectory are mostly used for the
> >>>same thing. If only one of the two are defined it will be internally used
> >>>as home directory of the specified user. That's why qmail-ldaplookup
> >>>reports the your mailMessageStore as homeDirectory.
> >>>
> >>>If both are defined homeDirectory will be used as home directory of the
> >>>specified user and mailMessageStore ends up as aliasempty (the delivery
> >>>instruction, normally something like ./Maildir/).
> >>>
> >>>Small note, homeDirectory needs to be an absolute path whereas
> >>>mailMessageStore may be relative and will the be prepended by
> >>>~control/ldapmailstore
> >>>
> >>>
> >>>>>in qmail-ldap.h both (LDAP_MAILSTORE and LDAP_OMEDIR) are defined.
> >>>>>Besides, QLDAPINSTALL  increased confusion..  as how to use 
> >>>>>LDAP_MAILSTORE only..
> >>>>>
> >>>>>
> >>>Just use it and it will work.
> >>>
> >>>
> >>>Btw. your problem is the creation of a homedir automatically so you 
> >>>should
> >>>try two things first.
> >>>a) if I create the homedir by hand does mail delivery work
> >>>btw. the best test is "su vmail -c `cat /var/qmail/control/dirmaker`
> >>>/var/vmail/admin ./Maildir". With that you check that your script works.
> >>>b) if a) works lets add some debug output to my dirmaker script and let's
> >>>run qmail-ldap with some high LOG_LEVEL to see where the problem is.
> >>>
> >>>
> >>I tried a) but it did not create Maildir in one command as you have 
> >>suggested.
> >>
> >>su vmail -c `cat /var/qmail/control/dirmaker` /var/vmail/admin ./Maildir
> >>
> >>
> >
> >What did it then?

I still did not get an answer to that question. How should we help you if
you don't provide any useful input what is happening on your system.

a) does delivery work if there the homedir and maildir exists?
b) does it work if only the homedir exists?
c) does "su vmail -c `cat /var/qmail/control/dirmaker` /var/vmail/admin
./Maildir" create at least the directory /var/vmail/admin?
        If the answer is no: what returns "`cat /var/qmail/control/dirmaker`"?
d) if all above questions are YES inject a mail and send us the output of
qmail-send (running with LOGLEVEL=255). 

Unless you answer a - c with YES or NO and provied the additional info I
can't help you. Sorry.

> >Calling that dirmaker script with the arguments /var/vmail/admin
> >./Maildir should create at least a directory /var/vmail/admin. The acctual
> >Maildir creation is done directly in qmail-local but it needs to be
> >enabled with the AUTOMAILDIRMAKE option in the Makefile.
> >
> >It is possible to create both in one step but for that you need a better
> >dirmaker script.
> >
> >
> >>After creating new directories individually I tried to send mail same 
> >>result.
> >>in b) do you mean uncommenting DEBUG option in qmail-ldap.h? 
> >>or some other way..?
> >>
> >>
> >
> >Acctually I would uncomment the following in the Makefile:
> ># to enable the possibility to log and debug imap and pop uncoment the
> ># next line
> >#DEBUG=-DDEBUG
> >
> Did it and "make setup check"ed
> Started qmail and smtpd back again.
> Edited /var/qmail/rc like this
> ---< snip >---
> quark:/home/sam# cat /var/qmail/rc
> #!/bin/sh
> # Using stdout for logging
> # Using control/defaultdelivery from qmail-local to deliver messages by 
> default
> 
> exec env - PATH="/var/qmail/bin:$PATH" \
> LOGLEVEL=127 \
> qmail-start "`cat /var/qmail/control/defaultdelivery`"
> quark:/home/sam#
> ---< /snip >---
> Then tried to inject the same mail again, but nothing changed.
> 

If nothing changed then debugging is not turned on because with debugging
on the log output will be very different (much more verbose).


-- 
:wq Claudio

Reply via email to