Bug 55339

Summary: Using ":" in filenames is incompatible with some NFS servers (Dell and others that are Windows Powered)
Product: [Applications] kmail2 Reporter: Birger Kollstrand <birger.kollstrand>
Component: commands and actionsAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: bruno, dominik.tritscher, lemma, lukas901, montel, sasha
Priority: NOR Keywords: triaged
Version: 4.10 pre   
Target Milestone: ---   
Platform: RedHat Enterprise Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Ethereal trace of NFS traffic

Description Birger Kollstrand 2003-02-28 15:01:45 UTC
Version:            (using KDE KDE 3.0.5)
Installed from:    RedHat RPMs
OS:          Linux

Hi,

During mail sending Kmail uses some temporary files (i guess) this filename was in our case "1046439786.2449.wwDw\:2\,S". 

The result is that kmail is not working properly, we can not send mail and we can not delete mail. We can read mail. Our setup is SMTP/IMAP.

Our NFS server is a large Dell NAS 775 with 800gig HD space and it's unfortunately Windows Powered. That implies that :\/<>? are illegal characters in file names.

I will try to attach the Ethereal trace of the NFS trafic between the Redhat 8.0 machine and the NFS server.

regards birger....
Comment 1 Birger Kollstrand 2003-02-28 15:05:34 UTC
Created attachment 1075 [details]
Ethereal trace of NFS traffic

The error message from the Dell server is in message 1444
The filename sent from kmail is in message 1443

Use display filter:
nfs.status !=0 and nfs.status !=2 to filter out all the other messages , the
remove the display filter to se the surrounding transactions.

regards birger....
Comment 2 Birger Kollstrand 2003-02-28 15:06:53 UTC
Update 
The file name is 1046439786.2449.wwDw:2,S 
 
Not with the backslashes I used on the cmd line, sorry about that. 
 
regards birger.... 
Comment 3 Ingo Klöcker 2003-03-07 00:24:57 UTC
Subject: Re:  New: Using ":" in filenames is incompatible with some NFS servers (Dell and others that are Windows Powered)

Those filenames are typical for maildir folders. If your NFS server 
doesn't like colons in filenames then you will have to use the mbox 
format for all your folders. As the current version of KMail defaults 
to maildir folders and therefore creates the five system folders 
"inbox", "trash", "outbox", "sent-mail" and "drafts" as maildir folders 
you have to create empty files with those names in ~/Mail before you 
start KMail for the first time. You can create those empty files for 
example with "touch ~/Mail/inbox", etc.


Comment 4 konold 2005-05-12 00:19:45 UTC
this workaround to use mbox folders instead of maildir is a very  bad idea on a NFS server.

While in general having locking sensitive data on a NFS share is imho a bad idea it is extremely dangerous to use mbox format instead of maildir format via NFS. The probability of total data loss is much more increased as mbox depends on proper locks while maildir is lock free. (think about partial writes due to a network outage) 

In addition the ':' character does not work for CIFS based home directories. So IMHO kmail should consider to offer an alternative character.  

You may have a look at http://cr.yp.to/proto/maildir.html which describes some alternatives to '/' and ':'.
Comment 5 Chris G 2005-06-17 10:39:33 UTC
I also share this pain.  I want to use KMail on Win XP via Cygwin, but those colons (:) in the "maildir" file-names prevent me from storing my "Mail" folder on my FAT32 FS!

More people will soon want to use KMail on Windows (and share their "maildir" folders with their Linux KMail installation), so this issue really should be addressed soon.

Does anyone disagree?
Comment 6 Dominik Tritscher 2008-08-31 14:26:40 UTC
This problem still exists with KDE4.1
Comment 7 Michael Leupold 2008-11-09 17:56:40 UTC
I can confirm this issue still exists. Maildir mails are still stored using the colon on 4.1.2.
Comment 8 Martin Koller 2009-08-17 00:29:46 UTC
*** Bug 189441 has been marked as a duplicate of this bug. ***
Comment 9 Martin Koller 2009-08-19 22:12:09 UTC
SVN commit 1013419 by mkoller:

BUG: 55339

add a configuration option (MaildirFilenameSeparator; without GUI) to be able to change the
maildir filename separator so that filenames can be created on FAT etc. filesystems


 M  +7 -0      CMakeLists.txt  
 M  +7 -0      kmail.kcfg.cmake  
 M  +5 -17     kmfoldermaildir.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1013419
Comment 10 Bruno Haible 2013-01-07 11:23:34 UTC
This bug is not completely fixed in KDE 4.8.5.

I tried to activate the workaround, as explained in http://article.gmane.org/gmane.comp.kde.devel.pim/26928 :
I added to $HOME/.kde4/share/config/kmail2rc, in the section [General], the line
MaildirFilenameSeparator=!
and renamed all files named id:flags to id!flags inside the $HOME/.local/share/local-mail directory.
Then, when I select a mail folder on the VFAT formatted USB-stick that is in maildir format, and perform the action "Mark all mails read" on it, then the log shows error messages like
Maildir: Failed to rename entry:  "MAILDIR/FOLDER/new/1345995993.R500.HOSTNAME"  to  "MAILDIR/FOLDER/cur/1345995993.R500.HOSTNAME:2,S" ! Error:  "The argument is invalid" 

This error message comes from kdepim-runtime-4.8.5/resources/maildir/libmaildir/maildir.cpp method Maildir::changeEntryFlags, line 676. This method contains the code
#ifdef Q_OS_WIN
      finalKey.append( QLatin1String("!2,") + mailDirFlags.join(QString()) );
#else
      finalKey.append( QLatin1String(":2,") + mailDirFlags.join(QString()) );
#endif
In other words: For Linux users of maildir folders on NFS mounts (bug 55339) and of USB-sticks (bug 189441) the code still attempts to use the character ':' in the filenames. It should use a configurable default here as well.

Please, can you reopen this bug report?
Comment 11 Laurent Montel 2013-01-07 11:42:51 UTC
Move to kmail2
Comment 12 sasha 2015-08-14 16:05:45 UTC
This is still an issue. When stored in maildir format, Kmail mail cannot be backed up to fat32 drive.
Comment 13 Denis Kurz 2016-09-24 18:04:10 UTC
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present?

If noone confirms this bug for a Framework-based version of kmail2 (version 5.0 or later, as part of KDE Applications 15.12 or later), it gets closed in about three months.
Comment 14 Denis Kurz 2017-01-07 22:48:37 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.