procmail
[Top] [All Lists]

Re: Maildir create

2004-07-29 07:12:46
On Thu, 2004-07-29 at 13:48, Hans du Plooy wrote:
Is there a way to have procmail create the Maildir if it doesn't exist?

At the moment I am using the following in /etc/procmailrc
----snip
# Run with the recipients privileges
#
DROPPRIVS=yes
 
# Make sure that $HOME/Maildir/ exist!
#
:0
* ? /usr/bin/test -d $HOME/Maildir/ || /bin/mkdir $HOME/Maildir/
{ }
:0 E
{
        # Bail out if directory could not be created
        EXITCODE=127
        HOST=bail.out
}
----end snip

It works for me, but perhaps there are better ways to do it?

/Lars
-- 
Lars E. Pettersson <lars(_at_)homer(_dot_)se>
http://www.sm6rpz.se/


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>