Marijn Vriens wrote:
hi all,
I am trying to use the courier imap and pop3 servers for allowing email
access to a postfix smtp server. The database is a openldap server. I am
having the silliest problems getting courier to find the directory where
the emails are being stored.
Since the users don't have their homedirs on this server, the location
of the Maildir for a user is:
/var/local/vmail/somecompany.com/mvriens
(this works fine with postfix)
I cannot figure out how to properly set
LDAP_HOMEDIR, LDAP_MAILROOT and LDAP_MAILDIR so that:
1) there's no need to create each home directory created on the server
2) do not need to put absolute paths in the mailbox attribute (for
security and flexibility).
Simply said, What I need, is to prepend "/var/local/vmail/" to
LDAP_MAILDIR so that it looks there for it's mailbox. How do I do that?
The relevant part of a user entry in the LDAP directory is something
like this:
dn: uid=mvriens,ou=People,dc=somecompany,dc=com
uid: mvriens
objectClass: top
objectClass: CourierMailAccount
...
mail: [EMAIL PROTECTED]
mailbox: somecompany.com/mvriens/
homeDirectory: /home/mvriens
This machine runs Debian/Sarge on i386, with courier-ldap 0.47-4sarge3,
courier-imap 3.0.8-4sarge3, courier-pop 0.47-4sarge3 and slapd 2.2.23-8
LDAP_MAILROOT should be an actual directory (not LDAP attribute) that is
the root of ALL home directories. In your case you should probably have:
LDAP_MAILROOT /var/local/vmail
LDAP_HOMEDIR should be everything else. Unfortunately, there's no way
right now to combine or manipulate attributes at this point (i.e. take
the domain name from the LDAP mail attribute and use it then the
username from the mail attribute. So you need to either:
LDAP_HOMEDIR homeDirectory
and have homeDirectory be /somecompany/mvreins or, if homeDirectory
cannot be changed, create a new attribute like courierHomeDirectory to
use. Or you can hack it like I did, I had no homedirectory information
in my LDAP database and didn't feel like adding/maintaining it for all
accounts so I did:
LDAP_MAILROOT /var/maildir
LDAP_HOMEDIR uid
so Courier resolves my home directory to /var/maildir/JLEE/. Works
quite well but could get ugly with more than a few thousand accounts.
Also, LDAP_MAILDIR is really not all that neccessary in less for some
strange reason you have some accounts whose Maildir isn't $HOME/Maildir.
Jay
--
Jay Lee
Network / Systems Administrator
Information Technology Dept.
Philadelphia Biblical University
--
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users