Re: [binc] IMAPdir automation

Peter Stuge <[email protected]>
Newsgroups gmane.mail.imap.binc.general
Message-ID <[email protected]>
On Thu, Mar 10, 2005 at 04:58:23AM +0000, Michael Krieger wrote:
> Thank you to both of you.
> 
>  I never thought of that, but have adapted it to do what I want it to:
> 
> #!/bin/sh
> test -d IMAPdir || mkdir IMAPdir && ln -s ../Maildir IMAPdir/INBOX
> exec $@
> 
> did the trick.

Seeing this I just realized that problems may arise if the user
deletes her INBOX and then re-creates it. Is that legal in IMAP?

I would still separate the two steps;

test -d IMAPdir || mkdir IMAPdir
test -e IMAPdir/INBOX || ln -sf ../Maildir IMAPdir/INBOX

-f to force the link even if another invocation just created the
link, and to avoid the error message/return code.


> Thanks for everyone's help.

Glad it works! :)


//Peter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.