Complete.Org: Mailing Lists: Archives: offlineimap: February 2003:
Re: Newbie questions
Home

Re: Newbie questions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: <jgoerzen@xxxxxxxxxxxx>
Cc: <offlineimap@xxxxxxxxxxxx>
Subject: Re: Newbie questions
From: "Randy Orrison" <randy@xxxxxxxxxxx>
Date: Mon, 24 Feb 2003 23:23:24 -0000 (GMT)

> On Mon, Feb 24, 2003 at 10:39:58PM +0000, Randy Orrison wrote:
>> | Your ~/.offlineimap.py would contain:
>> |
>> | def getfoldername(foldername):
>> |     if foldername == 'INBOX':
>> |         return 'INBOX'
>> |     else:
>> |         return re.sub('^INBOX', '', foldername)
>>
>> Ok, I can't write it but I think I can read it... doesn't that do the
>> same as my lambda above?
>
> No, this has a special case where if the foldername is INBOX, it will
> return INBOX as the new foldername.  I believe yours would always chop
> INBOX off (if I remember correctly).

The lambda I was referring to was:
  nametrans = lambda foldername: re.sub('^INBOX.', '.', foldername)
which matches '^INBOX.' and should leave '^INBOX$' alone.

>> | OfflineIMAP will not support a folder named "." as that is a
>> | reserved filename on Unix systems.
>>
>> Well... yes, it is: it means the current directory.  Which is exactly
>> what I want offlineimap to use.  Using "./{cur,new,tmp}" as a maildir
>> should be no more difficult to support than "INBOX/{cur,new,tmp}" --
>> "." and "INBOX" are both perfectly valid directory names.
>
> But that's dangerous.  If you start OfflineIMAP from a different
> directory, the current directory may change.  OfflineIMAP may even
> change the current directory during its execution.  But, like I said,
> with this scheme you could have all the mailboxes be dot-boxes except
> for the INBOX.

But...  I guess I am assuming (it's past 11pm here, and I should probably
not be trying to think too much!) that offlineimap would either be working
in the localfolders directory, or at least using it as a prefix when it
worked with folder names.  Otherwise, wouldn't INBOX appear wherever you
happened to run offlineimap from?

e.g.
localfolders=~/Maildir

I want to use "." instead of "INBOX":
  ~/Maildir/./{cur,new,tmp} vs.
  ~/Maildir/INBOX/{cur,new,tmp}
where's the problem?

If I ran offlineimap from my home directory instead of ~/Maildir, it's not
going to create ~/INBOX/{cur,new,tmp} is it?  So why should it create
~/./{cur,new,tmp}?

> Hmm, here's something to try (backup your data first, I've never done
> it!)

[snip]
I'm happy at present with the lambda I give above, and "INBOX" as a
symlink to ".".

Now, the only problem with all this is that I'm now bypassing my local
.procmail which ran spamassassin for me!

Thanks again,

Randy




[Prev in Thread] Current Thread [Next in Thread]