Simon Loewen wrote:
> Enda wrote:
>> Have you installed configured and test Authlib? Thats where you start.
>>
>> Then setup your users in LDAP, and when you can
>>
>> authtest <user>
>>
>> Then you know you are good to go to proceed with courier / maildir
>> creation / imap, pop, smtp configuration.
>>
>> -Enda.
>
> Thank-you Enda.
>
> I am setting up auth from this doc
> http://www.courier-mta.org/authlib/README_authlib.html#userdbprimer
> under the heading *Large virtual domain farm*

That should be fine

> Once I have this running I shall then try with LDAP - I think it might
> be better for me not to bite off more than I can chew.

Actually, for the purposes of configuring Authlib, it won't matter if the 
maildirs exist or not, and you'll be able to test your ldap integration 
without them, ie, authtest <user> will return the information that courier 
would then use to find the maildir for delivery, and if that didn't exist, 
courier's local delivery agent will give an error.

Either way, if you wish to start at creating maildirs thats fine too :-)

> In the aforementioned URL it instructs one to create maildirs for users
> in each domain.  I tried the below but it failed.  I have reread the
> instructions several times (& copied and pasted these) and always get
> the same error message:
>
>
> # su - vmail
> $ pwd
> /home/vmail
> $ mkdir -p domains/simontest.com

This creates the placeholder in your directory tree for the maildir in 
question, its almost identical to how I do it myself in my setup.

> $ mkdir domains/simontest.com/simon

Ok... this is a mistake, maildirmake creates the user folder for you, you 
don't create it first.

> $ maildirmake domains/simontest.com/simon

If you hadn't created the simon folder, then you should have done
cd domains
cd simontest.com
maildirmake simon

Assuming you want to create a maildir called simon. You could possibly have 
created the maildir in your fashion without the cd's, but I choose to do 
that, so I haven't tested it any other way.

> maildirmake: domains/simontest.com/simon: File exists

Exactly, because you create a folder instead of letting maildirmake create 
it as a maildir. You probably wanted to run
maildirmake domains/simontest.com/simon/Maildir

Its better to have a home directory for each user, and then a consistent 
Maildir name within that home directory, and this is what you specify as a 
parameter to maildirmake. I don't know if there is a way around that.

If in your configuration then you don't specify the Maildir location for 
users, courier will assume ./Maildir below the users homedirectory.

> I removed the directories and started again but replacing the . with a -
> incase a programme could not handle a . in the directory name:

As I say, while my directory tree would actually have .'s in the path, it 
isn't an issue for me because I cd to where I want to run maildirmake, but 
in any case your error is due to the directory existing where maildirmake 
wants to create the maildir folder.

> $ rm -rf domains/simontest.com/
>
> $ mkdir -p domains/simontest-com
>
> $ mkdir domains/simontest-com/simon
>
> $ maildirmake domains/simontest-com/simon/
> maildirmake: domains/simontest-com/simon/: File exists
>
> The maildirmake options are:
> Usage: maildirmake [ options ] maildir

Yeah, and not maildirmake [ options ] path to maildir, but I'm not sure 
thats even an issue, I just haven't gone there myself.

> Perhaps the instructions would rather that I use this because it worked,
> but just because it created the dir, does not mean that it is the
> correct conf.

I use a script to create users in ldap and create their maildirs, here is 
the section of the script that does it all having read in values from the 
commandline, perhaps it will help you. In my setup, OU is a customer account 
number, and below that then, O is the domain name of the format 
domainame.tld, idea being that if a customer has more than one domain, all 
their maildirs are under the same directory named O, and each maildir is 
seperated by a folder per domainname.


###############################################
#
#  Maildir Stuff
#
###############################################


# Lets try to create the home directory container
# these commands will fail if they already exist
# but thats not a problem, we'll still be able to
# change into the directories to create the homdirectory

cd /var/spool/imap/user

mkdir $OU
chown vmail.vmail $OU
cd $OU
mkdir $O
chown vmail.vmail $O
cd $O

# Now make the home directory and maildirs
mkdir $EMAIL
cd $EMAIL
/usr/lib/courier/bin/maildirmake Maildir
cd Maildir
/usr/lib/courier/bin/maildirmake .Drafts
/usr/lib/courier/bin/maildirmake .Sent
/usr/lib/courier/bin/maildirmake .Trash
echo "INBOX" > courierimapsubscribed
echo "INBOX.Sent" >> courierimapsubscribed
echo "INBOX.DRAFTS" >> courierimapsubscribed
echo "INBOX.Trash" >> courierimapsubscribed
echo "INBOX.Spam" >> courierimapsubscribed
cd ../..
chown -R vmail.vmail $EMAIL
cd


HTH,

 -Enda. 


------------------------------------------------------------------------------
_______________________________________________
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to