3 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] maildrop automatic $H...
FromSent OnAttachments
miolinuxJul 12, 2007 11:33 pm 
miolinuxJul 16, 2007 3:11 am 
Barry FlanaganJul 16, 2007 3:35 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] maildrop automatic $HOME creation patchActions...
From:Barry Flanagan (barr@flanagan.ie)
Date:Jul 16, 2007 3:35:44 am
List:net.sourceforge.lists.courier-maildrop

miolinux wrote:

On Mon, 16 Jul 2007 16:45:23 +0700 Anton Dobkin <ant@viansib.ru> wrote:

Hello!

Place this block in a file of the global filter maildrop (/etc/courier-maildrop/maildroprc or other):

`test -d $HOME$DEFAULT` if($RETURCODE!=0){ `mkdir -p -m 0700 $HOME$DEFAULT` `mkdir -m 0700 $HOME$DEFAULT/cur` `mkdir -m 0700 $HOME$DEFAULT/new` `mkdir -m 0700 $HOME$DEFAULT` }

It will automatically create all necessary directories for the user if they do not exist.

Good luck!

Thx for the info, but what i need is to create $HOME when first mail arrives. Then i'll create maildirs with maildroprc. But unfortunately maildrop will try to chdir to $HOME before doing anything, so if $HOME does not exists it will exit with error. There's a patch somewhere on the net but i still haven't found it.

If someone has some pointers pls tell me.

Hi

I use proftpd (using LDAP for auth) in my mail servers with CreateHome on and a skeleton directory structure which creates the maildir. During the user setup process (built using PHP) I do an ftp login to the mail server with the new user's credentials. Proftpd then creates the home directory and maildir.

This has proved fairly reliable.