mailpile / Mailpile

A free & open modern, fast email client with user-friendly encryption and privacy features
https://mailpile.is
Other
8.81k stars 1.02k forks source link

Maildir name starting with a dot is not supported #638

Closed Karmak23 closed 9 years ago

Karmak23 commented 10 years ago

On my mail server, the “main” is ~/.Maildir (note the leading dot), to avoid maildirs to show up in user home directories when they browse them with graphical file managers.

Because maildirs are served by IMAP server, they are considered “internal” and we (sysadmins) don't want them to show up without the user knowing what he's looking for.

In mailpile, while add ~/.Maildir seems to work correctly, the rescan command doesn't:

mailpile> rescan                                                               

Metadata index not found: /home/olive/.mailpile/mailpile.idx                   
Elapsed: 0.082s (Loaded metadata, 0 messages)                                  
Note: periodic delay is 0.02s, run from shell to speed up: mp --rescan=...     
0000: Skipped: /home/olive/.Maildir                                            
Elapsed: 0.001s (rescan: Rescanned vcards and mailboxes)                       
{                                                                              
    "mailboxes": 0, 
    "messages": 0, 
    "vcards": 0
}

Note the 0000: Skipped: /home/olive/.Maildir.

If I just do cd ~/ ; ln -sf .Maildir Mail and then run commands with ~/Mail, everything goes smoothly.

Assumption that dotfiles should be skipped seems wrong in this case, and will be even more wrong when you will implement #537. Nested maildirs — with courier-imap or dovecot servers for example — all start with a dot, eg. the dir tree is like:

.Maildir/
  cur/
  new/
  tmp/
  .Archives/
    cur/
    new/
    tmp/
  .Sent Messages/
     cur/
    new/
    tmp/
[…]

Regards,

Karmak23 commented 10 years ago

And in fact, after having added the symlink ~/Mail to ~/.Maildir, mailpile seem to index the contents twice, accepting to work with the dotted maildir while it refused before. Very strange.

BjarniRunar commented 9 years ago

The current code doesn't skip dotfiles, so either this has been fixed or was based on a misunderstanding (possibly caused by other bugs). Closing, thank you for the report!