On Mon, Jun 01, 2020 at 11:55:15AM +0200, Oswald Buddenhagen wrote:
> On Mon, Jun 01, 2020 at 11:28:49AM +0200, Uwe Kleine-König wrote:
> > On 5/31/20 2:08 PM, Oswald Buddenhagen wrote:
> > > just give a list of paths, like the output of 'find'.
> > 
> > Not sure how to report the IMAP structure with something like find,
> > 
> i meant just the output format.
> to get the final structure presented via imap, you could use mbsync -Dn, but
> that would already require a somewhat functional configuration. a better
> idea would be browsing the server with thunderbird or another interactive
> agent.

The remote part already works fine, the output of mbsync -Dn starts
with (some confidential parts removed):


Reading configuration file /home/uwe/.mbsyncrc
Channel work-inbox
Opening master store work-remote...
Starting tunnel '...'... ok
Opening slave store work-local...
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE 
STARTTLS LOGINDISABLED] Dovecot ready.
>>> 1 STARTTLS
1 OK Begin TLS negotiation now.
Connection is now encrypted
>>> 2 CAPABILITY
* CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE 
AUTH=PLAIN
2 OK Pre-login capabilities listed, post-login capabilities have more.
Logging in...
Authenticating with SASL mechanism PLAIN...
>>> 3 AUTHENTICATE PLAIN <authdata>
3 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT 
SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND 
URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED 
I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH 
LIST-STATUS BINARY MOVE SPECIAL-USE] Logged in
>>> 4 NAMESPACE
* NAMESPACE (("" "/")("@local_Maildir_Oldstyle/" "/")) NIL NIL
4 OK Namespace completed (0.000 + 0.000 secs).
>>> 5 LIST "" "*"
* LIST (\HasNoChildren) "/" intlists/customers/AAA
* LIST (\HasNoChildren) "/" intlists/customers/BBB
* LIST (\HasNoChildren) "/" intlists/customers/CCC
* LIST (\HasNoChildren) "/" intlists/customers/DDD
* LIST (\HasNoChildren) "/" lists/linux-i2c
* LIST (\HasNoChildren) "/" lists/linux-mtd
* LIST (\HasNoChildren) "/" lists/linux-can
* LIST (\HasNoChildren) "/" lists/linux-serial
* LIST (\HasNoChildren) "/" lists/barebox
* LIST (\HasNoChildren) "/" lists/linux-arm-kernel
* LIST (\HasNoChildren) "/" lists/linux-pwm
* LIST (\HasNoChildren \Sent) "/" Sent
* LIST (\HasNoChildren) "/" INBOX
5 OK List completed (0.000 + 0.000 secs).
Opening master box INBOX...
>>> 6 SELECT "INBOX"
Opening slave box INBOX...
>>> 6 SELECT "INBOX"^M
Opening slave box INBOX...
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft unknown-0)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft unknown-0 \*)] 
Flags permitted.
* 44406 EXISTS
* 0 RECENT
* OK [UNSEEN 2] First unseen.
* OK [UIDVALIDITY 1590482668] UIDs valid
* OK [UIDNEXT 44465] Predicted next UID
6 OK [READ-WRITE] Select completed (0.000 + 0.000 secs).
Loading master...
>>> 7 UID FETCH 1:44464 (UID FLAGS)^M
Loading slave...
slave: 11811 messages, 2297 recent
* 1 FETCH (UID 28 FLAGS (\Seen))
....


> > The remote side is a dovecot serving my Maildir in (I think) Mailbox++
> > format, that I have:
> > 
> >     /home/$user/Maildir/{cur,new,tmp}
> >     /home/$user/Maildir/.intlist.customer.AAA/{cur,new,tmp}
> >     /home/$user/Maildir/.lists.barebox/{cur,new,tmp}
> >     /home/$user/Maildir/.lists.linux-arm-kernel/{cur,new,tmp}
> > 
> hint: use $HOME or ~ instead of /home/$user for simplicity.
> 
> anyway, i think this translates to:
>   INBOX
>   INBOX.intlist.customer.AAA
>   INBOX.lists.barebox
>   ...
> so the question whether everything is nested under INBOX is answered with
> yes.

I think the above contradicts this guess? Up to now I read my work mail
using mutt over ssh, so I cannot say. My private mail however (where I
use Thunderbird up to now) the subfolders are displayed as siblings of
INBOX, not descendants.

> > and I want to replicate that in (respectively)
> > 
> >     /home/$user/Maildir/.work/{cur,new,tmp}
> >     /home/$user/Maildir/.work.intlist.customer.AAA/{cur,new,tmp}
> >     /home/$user/Maildir/.work.lists.barebox/{cur,new,tmp}
> >     /home/$user/Maildir/.work.lists.linux-arm-kernel/{cur,new,tmp}
>
> so logically speaking you want to map everything to INBOX.work.
> i presume that implies that you have INBOX.private or some such?

Yes, that's the eventual goal. Not sure yet if I want my private mail in
a "private" subfolder or directly in ~/Mailbox. Maybe the latter isn't
easily possible? The former has the advantage that a "work" folder on
the private server doesn't yield any problems. Open for suggestions. 

> how do you populate that?

I don't yet. Assuming that mbsync will be the tool of choice for my work
mail I'd use this for my private mail (which uses a very similar setup),
too.

> do you actually have messages in INBOX itself, or is it just a
> container for the actual mailboxes?

On the filesystem level I have messages in Maildir/{cur,new,tmp}.
Assuming I understand the above log correctly this translates to mails
in INBOX.

> how do you access these local mailboxes (which MUA)?

mutt + notmuch.

Best regards
Uwe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to