Version: (using KDE 4.3.5) OS: Linux Installed from: openSUSE RPMs when saving an email to disk (right-click on email, save-as), kmail will store it with permissions 600. I expected kmail to honour the umask instead. This has been already considered as a bug for attachment, see https://bugs.kde.org/show_bug.cgi?id=79685 I expect the same behaviour for emails.
Created attachment 42227 [details] Patch for setting file permissions of saved email messages use the disregardUmask option to define, if file permission should be restrictive or the umask settings should be used.
patched version for openSUSE 11.2 can be found at http://download.opensuse.org/repositories/home:/steffens:/branches:/openSUSE:/11.2:/Update/standard/
Thank you for the patch, Jörg! One little nitpick: The new code is duplicated, it would be much nicer to put it into a helper function, for example in kmail/util.cpp Can you please submit an updated version of the patch to reviewboard.kde.org? See http://techbase.kde.org/Contribute/Send_Patches for details.
Created attachment 42751 [details] 2. veriosn of the patch, adding and using the function KMail::Util::getWritePermissions I agree. I summit a new version of this patch and will also provide it via reviewboard.
added at http://reviewboard.kde.org/r/3601/
SVN commit 1116206 by tmcguire: Honor umask setting when saving mails. BUG: 232001 Thanks to Jörg Steffens <joerg.steffens at dass-it dot de> for the patch! I modified the patch slightly, to take into account duplicated code in viewer_p.cpp and Ingo's suggestions. M +3 -1 kmail/filterlog.cpp M +5 -5 kmail/kmcommands.cpp M +12 -0 messageviewer/util.cpp M +7 -0 messageviewer/util.h M +6 -6 messageviewer/viewer_p.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1116206