Apart from the options presented in the configuration dialog, some options can only be set directly in the KMail configuration file or through KIOSK. These so called "hidden" configuration options cannot be changed via the normal KMail Settings dialog; they must be made by modifying the configuration file using a text editor or the kwriteconfig program.
The KMail configuration file is called kmailrc
and can be found in your home directory. The location can vary according
to your operating system or distribution, but can always be found by running
the command kde4-config --path config --locate kmailrc.
For the remainder of this section, assume that the configuration file is
located in /path/to/kmailrc.
Warning
Whenever changing these options, make sure to quit KMail first before editing the configuration file. Only restart KMail after you have made and saved the changes to the configuration file.
- Send Message Distribution Notifications with an empty sender string (SendMDNsWithEmptySender)
Send Message Disposition Notifications with an empty sender string. Some servers might be configured to reject such messages, so if you are experiencing problems sending MDNs, make sure this option is set to false. To enable this feature, add a line reading: SendMDNsWithEmptySender=true to the [MDN] section of the kmail configuration file. If there is no such section, simply add "[MDN]" on a line by itself just above the option. Note that the default setting of "false" strictly speaking violates Internet standards, but is set that way for practical reasons, to avoid servers rejecting MDNs that KMail generates because they think they are SPAM.
%kwriteconfig--file/path/to/kmailrc--group MDN --key SendMDNsWithEmptySender true- MaximumAttachmentSize
This allows the maximum file size allowed for attachments in the mail composer to be limited. To limit attachments to 20 MB in size, for example, add a line reading (under [Composer] section):
MaximumAttachmentSize=20
%kwriteconfig--file/path/to/kmailrc--group Composer --key MaximumAttachmentSize 20- CloseDespiteSystemTray
This option allows you to configure the application to close fully, even if there is a system tray icon configured, which would normally keep the application running. To enable the feature, add a line reading (under [General] section):
CloseDespiteSystemTray=true
%kwriteconfig--file/path/to/kmailrc--group General --key CloseDespiteSystemTray true- CheckOutOfOfficeOnStartup
With this option enabled, KMail will check on every startup if there is an active out-of-office configured and show a warning if this is the case. To disable the feature, add a line reading (under [OutOfOffice] section):
CheckOutOfOfficeOnStartup=false
%kwriteconfig--file/path/to/kmailrc--group OutOfOffice --key CheckOutOfOfficeOnStartup false- Allow out-of-office settings to be adjusted by the user.
In case you don't want users to be able to upload their own out-of-office scripts to the server you can add:
AllowOutOfOfficeSettings=false
to the [OutOfOffice] section of the kmail configuration file. If there is no such section, simply add "[OutOfOffice]" on a line by itself just above the option.
- Allow out-of-office scripts to be uploaded by the user, but no settings changed.
If you want to allow your users to upload their own out-of-office scripts but you do not want them to be able to change the domain to react to and the react-to-spam setting, you can add:
AllowOutOfOfficeUploadButNoSettings=true
to the [OutOfOffice] section of the kmail configuration file. If there is no such section, simply add "[OutOfOffice]" on a line by itself just above the option.
- Default domain to limit out-of-office replies to.
When editing vacation (out-of-office) scripts, the user can specify a domain to limit the sending of such replies to. To pre-load this setting with a default value, add
OutOfOfficeDomain=myMailDomain.test
to the [OutOfOffice] section of the kmail configuration file. If there is no such section, simply add "[OutOfOffice]" on a line by itself just above the option. Applying defaults to the out-of-office configuration dialog via the corresponding button will restore this domain, in case the user has changed it.
- Enable sending of out-of-office replies to messages marked as SPAM.
By default, out-of-office replies are not sent to messages marked as SPAM. To override this behavior, add
OutOfOfficeReactToSpam=true
to the [OutOfOffice] section of the kmail configuration file. If there is no such section, simply add "[OutOfOffice]" on a line by itself just above the option. Applying defaults to the out-of-office configuration dialog via the corresponding button will restore this setting, in case the user has changed it.
- disregardUmask
In versions prior to 1.9, KMail saved all attachments to disk with permissions set to 600 — only readable or writable by the owner of the file. In response to user feedback, this was made configurable in KMail version 1.9, with the defaults changed to honour the umask set on the user account while saving files to disk. To enable this feature, add a line reading (under [General] section):
disregardUmask=true
%kwriteconfig--file/path/to/kmailrc--group General --key disregardUmask true- AutoLostFoundMove
Activate this option to automate the handling of not yet uploaded messages in disconnected IMAP folders that cannot be uploaded. This can happen if the folder was removed from the server or your access rights have been restricted. Such messages will automatically be moved to a newly created lost+found folder if this option is enabled; you will be asked how to proceed every time otherwise.
- ShowUserAgent
Starting in version 1.9, KMail can show the User-Agent or X-Mailer value from the message header when using Fancy Headers (see → menu). To enable this feature, add a line reading (under [Reader] section):
ShowUserAgent=true
%kwriteconfig--file/path/to/kmailrc--group Reader --key ShowUserAgent true