Claudio Jeker wrote:

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?


Delivery does not work even if homedir and maildir exists.
It gives this error..
---< snip >---
@400000004283ddab11525d44 starting delivery 15: msg 5800507 to local [EMAIL PROTECTED]
@400000004283ddab115270cc status: local 1/10 remote 0/20
@400000004283ddac01054c94 delivery 15: deferral: Unable_to_chdir_to_maildir._(#4.2.1)/
@400000004283ddac01056404 status: local 0/10 remote 0/20
@400000004283de783abb1284 starting delivery 16: msg 5800516 to local [EMAIL PROTECTED]
@400000004283de783abb29f4 status: local 1/10 remote 0/20
@400000004283de792c759d5c delivery 16: deferral: Unable_to_chdir_to_maildir._(#4.2.1)/
@400000004283de792c75b4cc status: local 0/10 remote 0/20
@400000004283ded72b913c84 starting delivery 17: msg 5800518 to local [EMAIL PROTECTED]
@400000004283ded72b9153f4 status: local 1/10 remote 0/20
@400000004283ded81f1855b4 delivery 17: deferral: Unable_to_chdir_to_maildir._(#4.2.1)/
@400000004283ded81f186d24 status: local 0/10 remote 0/20
quark:/home/sam#
---< /snip >---


b) does it work if only the homedir exists?


no. It does not work even if only 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`"?


The above command does not work alone because vmail has no shell. So I have to specify shell
like --shell=/bin/bash and then it can create just one directory /var/vmail/admin
Earlier I created the user vmail using command
useradd -g vmail -d /var/vmail -m -s /bin/true vmail


To check with shell I deleted the user vmail. Created the same user again using command
useradd -g vmail -d /var/vmail -m vmail


(Before that I deleted /var/vmail )
Now with the command below it can create only one directory /var/qmail/admin

su vmail -c `cat /var/qmail/control/dirmaker` /var/vmail/admin ./Maildir


d) if all above questions are YES inject a mail and send us the output of
qmail-send (running with LOGLEVEL=255).


Like I said LOGLEVEL does not seem to be working as there is no change in output of logs.
I have added LOGLEVEL as shown in previous mail.


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).

Which is what I expected from logs. More verbose messages..
But with above rc script did not change loglevel

--
Sameer N. I.
/****************************************************************/
/ The early bird gets the coffee left over from the night before./
/****************************************************************/



Reply via email to