Hi everyone,

 Its Friday morning here in the Philippines, last day
of work. I wish I could make this thing work today
but...

this trick won't work either.
 
> --< example ldap attr >--
> homeDirectory: /var/vmail
> mailMessageStore: bani
> deliveryMode: noprogram
> --< end example ldap attr >--

Look:

gaheris# ldapsearch -LLLb 'ou=staff,dc=preginet'
uid=bani mail homeDirectory mailmessagestore
deliverymode

dn: uid=bani,ou=staff,dc=preginet
mail: [EMAIL PROTECTED]
mailHost: gaheris.camlann.pergi.net
homeDirectory: /var/vmail
mailMessageStore: bani
deliveryMode: noprogram

galahad#mail -s "testing" [EMAIL PROTECTED]
just a test
.
EOF

gaheris#tail -f /var/qmail/log/qmail/current
@4000000042e04d6009d6da2c new msg 300
@4000000042e04d6009e925c4 info msg 300: bytes 1033
from <[EMAIL PROTECTED]> qp 1084 uid
1003
@4000000042e04d6009e93d34 starting delivery 35: msg
300 to local [EMAIL PROTECTED]
@4000000042e04d6009e94cd4 status: local 1/10 remote
0/20
@4000000042e04d600eed9dfc delivery 35: success:
did_0+1+0/qp_1086/
                                          ^
what's the meaning of  success in here... ^
here's the continuation...

@4000000042e04d600f02eb1c status: local 0/10 remote
0/20
@4000000042e04d600f11eedc end msg 300
@4000000042e04d600f244a14 new msg 324
@4000000042e04d600f36c48c info msg 324: bytes 1141
from <[EMAIL PROTECTED]> qp 1086 uid
1012
@4000000042e04d600f36dbfc starting delivery 36: msg
324 to local [EMAIL PROTECTED]
@4000000042e04d600f36eb9c status: local 1/10 remote
0/20
@4000000042e04d601765c4dc delivery 36: failure:
Sorry,_no_mailbox_here_by_that_name._(#5.1.1)/

Now it says no mailbox here by that name. This error
is exactly the same error being generated when the
user is not even in ldap directory. 
Watch:

galahad#mail -s "test" [EMAIL PROTECTED]
just a test
.
EOT


gaheris# tail -f /var/qmail/log/qmail/current

@4000000042e04e562dd4047c new msg 300
@4000000042e04e562de8c4fc info msg 300: bytes 1037
from <[EMAIL PROTECTED]> qp 1094 uid
1003
@4000000042e04e562de8dc6c starting delivery 38: msg
300 to local [EMAIL PROTECTED]
@4000000042e04e562de8ec0c status: local 1/10 remote
0/20
@4000000042e04e5636073ed4 delivery 38: failure:
Sorry,_no_mailbox_here_by_that_name._(#5.1.1)/

On my very first setup above, it didn't even create a
dir named "bani" inside /var/vmail which represents
his home directory and will also contain the Maildir
folder.


Going back to my previous weird experiment, now if I
set his homeDirectory to /var/vmail/bani and
mailMessageStore as bani


gaheris# ldapsearch -LLLb 'ou=staff,dc=preginet'
uid=bani mail mailhost homeDirectory mailmessagestore
deliverymode

dn: uid=bani,ou=staff,dc=preginet
homeDirectory: /var/vmail/bani
mail: [EMAIL PROTECTED]
mailHost: gaheris.camlann.pregi.net
mailMessageStore: bani
deliveryMode: noprogram


galahad#mail -s "testing" [EMAIL PROTECTED]
just a test
.
EOT


I got:
gaheris#tail -f /var/qmail/log/qmail/current

@4000000042e057c73603dba4 new msg 300
@4000000042e057c736162354 info msg 300: bytes 1020
from <[EMAIL PROTECTED]> qp 1528 uid
1003
@4000000042e057c736163eac starting delivery 106: msg
300 to local [EMAIL PROTECTED]
@4000000042e057c736164a64 status: local 1/10 remote
0/20
@4000000042e057c73b21fe2c delivery 106: success:
did_0+1+0/qp_1530/
@4000000042e057c73b32888c status: local 0/10 remote
0/20
@4000000042e057c73b407ec4 end msg 300
@4000000042e057c73b5dfd8c new msg 324
@4000000042e057c73b74bdc4 info msg 324: bytes 1128
from <[EMAIL PROTECTED]> qp 1530 uid
1012
@4000000042e057c73b74d534 starting delivery 107: msg
324 to local [EMAIL PROTECTED]
@4000000042e057c73b74e4d4 status: local 1/10 remote
0/20
@4000000042e057c807f521dc delivery 107: failure:
Sorry,_no_mailbox_here_by_that_name._(#5.1.1)/
@4000000042e057c808014354 status: local 0/10 remote
0/20
@4000000042e057c808665a3c bounce msg 324 qp 1532
@4000000042e057c80890a274 end msg 324

Looks like the same error generated from Sameer's
suggestion where homeDirectory is set to /var/vmail
and mailMessageStore set to bani, Only this time, when
homeDirectory was set to /var/vmail/bani, the auto
homedir maker worked.

Watch:
gaheris#ls /var/vmail
bani
gaheris#ls /var/vmail/bani
Maildir
gaheris#ls /var/vmail/bani/Maildir
cur    new   tmp


See..

Now, that the absolute path of homeDirectory is what
the auto homedir maker is looking.. perhaps the answer
to the problem lies in mailMessageStore value.

For the final experiment, I will set bani's
homeDirectory as is: /var/vmail/bani and bani's
mailMessageStore as /var/vmail/bani.


Since the above value points into a directory, the
default delivery(./Maildir) should work, that is, the
actual mail will not be written into a file named
"bani" inside /var/vmail but it will go further inside
/var/vmail/bani and look for the Maildir folder, go
inside it, find the appropriate folder whether its
cur, new or tmp, and get inside it and finally write
the actual mail.

Look at what happened:

gaheris# ldapsearch -LLLb 'ou=staff,dc=preginet'
uid=bani mail mailhost homeDirectory mailmessagestore
deliverymode

dn: uid=bani,ou=staff,dc=preginet
homeDirectory: /var/vmail/bani
mail: [EMAIL PROTECTED]
mailHost: gaheris.camlann.pregi.net
mailMessageStore: /var/vmail/bani
deliveryMode: noprogram


First, make sure that a "bani" dir doesn't exist in
either /home or /var/vmail

gaheris#ls /home
matato
gaheris#ls /var/vmail
<nothing here either>

All set..

now on galahad:

galahad#mail -s "testing" [EMAIL PROTECTED]
testing
.
EOF



gaheris#tail -f /var/qmail/log/qmail/current

@4000000042e060451d4d0b94 new msg 365
@4000000042e060451d5525cc info msg 365: bytes 1020
from <[EMAIL PROTECTED]> qp 1786 uid
1003
@4000000042e060451d553954 starting delivery 19: msg
365 to local [EMAIL PROTECTED]
@4000000042e060451d5548f4 status: local 1/10 remote
0/20
@4000000042e0604521d95244 delivery 19: deferral:
Unable_to_open_/var/vmail/bani:_is_a_directory._(#4.2.1)/
@4000000042e0604521dd2e8c status: local 0/10 remote
0/20

Aha!!! That's were it is failing, in the delivery
process.. It say's it cannot deliver to
/var/vmail/bani which was the value of
mailMessageStore in ldap because it is a directory.
So, at this point, its just following the mailbox
format, where:

gaheris#cat /var/qmail/control/defaultdelivery
./Maildir/

Also..

gaheris#cat /var/qmail/control/ldapmessagestore
/var/vmail

Any idea how to resolve this? The delivery method...
is it hard coded in the qmail program? Perhaps there's
an option during compile or configure time wherein I
can specify to use the Maildir format instead of the
mbox?



Thanks..










                
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

Reply via email to