From: Bryan Irvine [mailto:[EMAIL PROTECTED]
>
> I'm trying to have the maildirs automatically generated when an email
> comes in for a user stored in ldap, if the directory doesn't already
> exist.
>
> I've tried various forms of /etc/maildroprc.
>
> The current non-functioning-but-looks-right-to-me version
> looks like so.
>
> `/usr/bin/test -d $HOME`
> if( $RETURNCODE != 0)
> {
> `mkdir -p $DIR`
> `maildirmake $HOME`
> `chown virtual.virtual -R $DIR`
> }
> logfile "$HOME/maildrop.log"
>
>
> What am I missing here?
First off, what does it do? Does it create anything, or does it skip
the directory creation block? Add some echo statements so you can log
what is going on.
Unless your system is different than mine...shouldn't the "chown"
command have colons between user and group?
`chown virtual:virtual -R $DIR`
Also, why don't you simply write it like this and avoid the extra
$RETURNCODE variable?
if (`/usr/bin/test -d $HOME`)
{
# make directories
}
Untested, but I think it should work this way.
Bowie
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users