> This posting is for the maildrop list, not the imap list; however ...
My mistake, still this one is more lively and as maildrop is also a native
mail delivery/filter agent to courier-mta imho its not so offtopic.
>> I've seen some posts which offer to put something like this in maildroprc
>>
>> `test -e $HOME`
>> if ($RETURNCODE != 0)
>> {
>> `mkdir -p $HOME`
>> `rmdir $HOME`
>> `maildirmake $HOME`
>
> What on earth is this code supposed to do, and why? It wouldn't do
> whatever the author intends.
As far I get in first step it is supposed to create all the needed
directories recursive (eg if you have something like
/data/mail/domain.com/b/bob/ and any of the parent dir doesnt exist the
whole mkdir would fail otherways ) then it removes the last empty dir
'/bob/' (as maildirmake doesnt like to create maildir on existing folder)
and makes the final maildirmake touch, still as stated before this wont work
by default as maildrop checks the dir before executing the script.
> It's not possible for maildrop (certainly not for IMAP) to make a user's
> or virtual user's $HOME directory. That has to exist first, mkdir or
> siblings in one form or another is used for this - both for shell users
> and virtual users. maildirmake can not be used for this. maildirmake
> makes structural Maildirs and populates them with certain info (files
> and a directory) necessary for Courier IMAP.
> It is possible for maildrop to make $HOME/Mailbox - and subfolders -
> using maildirmake, if they don't exist.
This is what I dont really understand.
I have browsed through archives and seen quite a lot of people (including
myself now) which moan about such feature (imagine having lots of users in
some MySQL db distributed to few boxes (so they dont have any envirounment
scripts / no skells / ldap and such scripts)). Executing maildirmake
manually for each new user - insane / writing some crontab scripts - too
slow and not dynamic.
And what I have done (with my pesky C knowledge) - put the maildir_make()
(which anyways calls mkdir) from maildirmake into maildrops (main.C) so
after 'if (chdir(h) < 0)' before the EX_TEMPFAIL is raised maildop tries to
create the dir and structure by itself and if not possible fails the default
way.
Is anything wrong with such approach (from the point of MTA/Imap)?
rr
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Courier-imap mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap