Dear fernando , 

i have made the script /var/qmail/bin/mymaildirmake.sh 
   #!/bin/sh
   mkdir -m 700 -p $1
with permission 
ls -ld /var/qmail/bin/mymaildirmake.sh
-rwxr-xr-x    1 root     admins         29 Mar 23 13:14 /var/qmail/bin/mymaildirmake.sh

and put that line /var/qmail/bin/mymaildirmake.sh in /var/qmail/control/dirmaker
with permission 
ls -l /var/qmail/control/dirmaker
-rwxr-xr-x    1 root     admins         32 Mar 23 11:46 /var/qmail/control/dirmaker

while doing that command on recently created user cv 
[EMAIL PROTECTED] root]# /var/qmail/bin/qmail-ldaplookup -u cv
Searching ldap for: (&(objectClass=qmailuser)(uid=cv))
under dn: dc=fg,dc=local
Found 1 entry:
 
dn: uid=cv,ou=pepole,dc=fg,dc=local
-------------------------------------------------------
objectClass: top
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
objectClass: sambaSamAccount
objectClass: qmailUser
mail: [EMAIL PROTECTED]
uid: cv
accountStatus: undefined -> active
mailHost: falcon.fg.local
homeDirectory: /var/qmail/maildirs/cv/
aliasEmpty: using default
qmailDotMode: ldaponly
qmailUID: 11184
qmailGID: 2110
mailQuotaSize: 0 (unlimited)
mailQuotaCount: 0 (unlimited)
mailSizeMax: 0 (unlimited)
mailReplyText: undefined

and permissions on /var/qmail/maildirs/
ls -ld /var/qmail/maildirs/
drwxr-xr-x    2 vmail    vmail        4096 Mar 22 18:17 /var/qmail/maildirs/
knowing that i have created these users and group before compiling qmail 
vi /etc/passwd
alias:x:1009:1002::/var/qmail/alias:/bin/true
qmaild:x:1010:1002::/var/qmail:/bin/true
qmaill:x:1011:1002::/var/qmail:/bin/true
qmailp:x:1012:1002::/var/qmail:/bin/true
qmailq:x:1013:1003::/var/qmail:/bin/true
qmailr:x:1014:1003::/var/qmail:/bin/true
qmails:x:1015:1003::/var/qmail:/bin/true
vmail:x:1184:2110::/var/qmail/maildirs/:/bin/true
vi /etc/group
nofiles:x:1002:
qmail:x:1003:
vmail::2110

but i have noticed that output for same user home directory in ldif file
is /home/samb-ntprof/cv
while in qmail-ldaplookup -u cv is
/var/qmail/maildirs/cv/
and still mail boxes can't created autoamtically in /var/qmail/maildirs/
knowing that i have rebooted the qmail server many  times
and sent mails to these users before trying to connect using pop3 
what should i do else 

Regards 
Hussein Esmat
 
 

Hussein,

You misunderstood the meaning of the control/dirmaker file:
you should write there the NAME of the script qmail will
run to create the mailbox, not the script itself.

So, you should create a script in, say, /var/qmail/bin, called
MyMailDirMake.sh; there, you write down the script described
below, and then you make it chmod 755. Next, you put the name
of the script file into control/dirmaker.

/var/qmail/bin/MyMailDirMake.sh shows two lines of code:
   #!/bin/sh
   mkdir -m 700 -p $1

/var/qmail/control/dirmaker shows only one line:
   /var/qmail/bin/MyMailDirMake.sh

One last thing: restart all the qmail services, including
supervise, svscan and the like!

Also, you may run qmail with a unique Linux id for all users,
like a virtual email provider, or you may use each user's id
as the Linux id too. Try /var/qmail/bin/qmail-ldaplookup -u
<user> and look for qmailuid and qmailgid. They MUST be able
to create a directory under your /var/qmail/maildirs directory.

-- 
Bye,
Fernando Maciel Souto Maior
[EMAIL PROTECTED]
http://www.araujo.com.br
+55+31 3270-5886
LPIC/1 # 31908

> Dear all,
>
> when i type
>
> [EMAIL PROTECTED] root]# telnet localhost 110
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> +OK <[EMAIL PROTECTED]>
> user oo
> +OK
> pass test
> -ERR mailbox could not be created
> Connection closed by foreign host.
>
> i have created this user
>
> dn: uid=oo,ou=pepole,dc=fg,dc=local
> objectClass: top
> objectClass: inetOrgPerson
> objectClass: posixAccount
> objectClass: shadowAccount
> objectClass: sambaSamAccount
> objectClass: qmailUser
> cn: oo
> sn: oo
> uid: oo
> uidNumber: 1002
> gidNumber: 553
> homeDirectory: /home/samba-ntprof/oo
> loginShell: /bin/false
> gecos: System User
> description: System User
> sambaSID: S-1-5-21-819893408-918549671-3685292493-3004
> sambaPrimaryGroupSID: S-1-5-21-819893408-918549671-3685292493-553
> displayName: System User
> sambaPwdCanChange: 1079969914
> sambaPwdMustChange: 2147483647
> sambaLMPassword: DA1675D15141AB05AAD3B435B51404EE
> sambaNTPassword: 3FDB05CB70B5B3269C976CFC23CE8CD0
> sambaPwdLastSet: 1079969914
> sambaAcctFlags: [U          ]
> userPassword: {SSHA}t4qusTpZ85ODxbVxOJqXet4jF9sKIDpr
> mail: [EMAIL PROTECTED]
> mailHost: falcon.fg.local
> mailMessageStore: /var/qmail/maildirs/oo/
>
> i have enabled
> MDIRMAKE=-DAUTOMAILDIRMAKE
>
HDIRMAKE=-DAUTOHOMEDIRMAKE
>
> in qmail-ldap.h file i have edited only this
> define LDAP_HOMEDIR   "noHomeDirectory"
> /var/qmail/control/dirmaker oo
> creats the user mailbox under root directory
> ls -ld /var/qmail/control/dirmaker
> -rwxr--r--    1 vmail    vmail         230 Mar 22 16:55
> vi   /var/qmail/control/dirmaker
> #!/bin/sh
> DMLOG=/tmp/dirmaker.log
> mkdir -m 700 -p $1     &>$DMLOG
> /var/qmail/bin/maildirmake $1/Maildir
> echo "Creating Maildir Directory" >>$DMLOG
> echo "First parameter is ($1)"  >>$DMLOG
> echo "Second parameter is ($2)" >>$DMLOG
> vi /tmp/dirmaker.log
> Creating Maildir Directory
> First parameter is (oo)
> Second parameter is ()
>
> what should i do to make the mailbox created in /var/qmail/maildirs/
with
> enough permission for each user to access his mail box
>
> regards
> Hussein Esmat

Reply via email to