Serious troubles with Courier

"Marco Carcano" <mcarcano-IvpIpsuCVxdWk0Htik3J/[email protected]> Tue, 13 Jun 2006 18:48:52 +0200
Newsgroups gmane.comp.isp.ispman.devel
Message-ID <002e01c68f09$40eb5500$0400000a@pc01>
Hi,
after having installed succefully a system with 
ispman,postfix,courier,sqwebmail one year ago I'm trying to do the same on 
another machine.
But I've lots of troubles, and I think that there may be one or more little 
bugs courier related in this new version of ispman:

I have post this message on ispman users list:


-----------------------------------------------------------------------------------------------------------------------------
Hi, I'm facing some problems with courier-imap (4.1.1):
The strange fact is that I have a working environment (done one years ago) 
with ispman, courier imap and sqwebmail.
I basically did a sort of (cut and paste) of my configuration files, but it 
ended here:

I'm sure there are not autentication errors (ldap log file does not report
authentication failures).
there are a few strange things:

authldaprc file:
....
LDAP_UID uidNumber
LDAP_GID gidNumber
....
if I don't set
LDAP_GLOB_UID and LDAP_GLOB_GID, ldap authentication (as cyrus, the admin
user used by ispman.createMailBox) works fine, but I got an error
from imapd that says that users with uid=0 or gid=0 are not allowed. Really
strange: I have a system configured one year ago with ISPMAN and Courier and
I haven't had to setup these variables. It seems to me that ?SOMETHING IS
CHANGED IN COURIER?
uid and gid stored in uidNumber and gidNumber attributes. These attributes
are only in domain users, not in admins. But it seems that Courier now WANTS
these attributes.
So I tried to set the above variables:

LDAP_GLOB_UID nobody
LDAP_GLOB_GID nobody

Now is OK: courier-auth let me pass to imap service. But again, it seems
there is something strange:
I got this message in maillog:
imapd: cyrus: chdir() failed!!
imapd: error: no such file or directory
imapd: LOGIN FAILED, user=cyrus, ip=...
imapd: authentication error: No such file or directory

it seems that courier-imap need to chdir to some path (maybe cyrus home).
But as cyrus is an admin, does not have a homeDirectory attribute (unlike
domain users); again, in authldaprc file there is a warning: homeDirectory
attribute MUST exist.

OK, it must exist for retreiving and delivering mail for domain users, but
why it seems it is needed also for normal login operation as done by
ispman.createMailBox

I'm terribly confused, may someone help me, please?

thanks
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I worked on more, I have removed cyrus user from ispman admins and manually 
added a user cyrus, but with modified objectclasses and an homeDirectory 
attribute:

dn: uid=cyrus,ou=admins,o=ispman,dc=draksoft,dc=com
objectClass: top
objectClass: posixAccount
objectClass: ispmanDomainUser
homeDirectory: /home/cyrus
ou: admins
uid: cyrus
sn: Prova
cn: Cyrus Admin
userPassword: {sha}5en6G6MezRroT3XKqkdPOmY/BfQ= (the obvious password: 
secret)
uidNumber: 502
gidNumber: 503

Obviously thi user is not visible in ispman web interface, but solved the 
above trouble. So it seems that courier now NEED uid,gid and homeDirectory 
attributes.
But there is another problem:
now when running ispman.createMailbox -h myserver foo-9IKiO1iGCm/[email protected] (or 
foo_domain_com) i got this error:
IMAP::Admin [ create ]: couldn't create mailbox user.foo_domain_com : try NO 
invalid mailbox name

I have already setup Configure / Mail Configuration / imapServerBackend as 
courier, and imapMailboxPrefix as Maildir/ but it seem that this command 
line utility has not read these parameters.

Again, I also tried to modify lib/cyrusadmin.pm and manually set 
$mailbos_prefix="Mailbox/";

the result is

ispman.createMailbox -h myserver foo-9IKiO1iGCm/[email protected] (or foo_domain_com) i got 
this error:
IMAP::Admin [ create ]: couldn't create mailbox Mailbox/foo_domain_com : try 
NO invalid mailbox name

Is this a bug or may have I forgotten something? Someone may give me some 
help?