Bug 177492

Summary: Shell expansion not working in kmailrc
Product: [Applications] kmail Reporter: Andre de Roos <A.M.deRoos>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: dominik.tritscher
Priority: NOR Keywords: triaged
Version: 1.10.1   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Andre de Roos 2008-12-11 14:54:00 UTC
Version:           1.10.1 (using KDE 4.1.2)
OS:                Linux
Installed from:    Ubuntu Packages

With KMail 1.10.1 shell expansion of configuration settings in kmailrc stoppped working. In my kmailrc configuration file I use the following expansion:

check-interval[$ie]=$(/home/andre/bin/test-online)

The script "test-online" returns 0 if I'm not on-line (in a train or so) and a 
value of 10 otherwise. This prevents interval mail checking if I am not on-
line and checks mail every 10 minutes if I am. Testing the script by running it from a command-line yields the desired result (0 or 10). However, in KMail 1.10.1 the option "Enable interval mail checking" remains unselected, whether I am on-line or not. The value of check-interval is obviously not correctly set, even though it worked in Kmail 1.9.3. I did discover that a similar expansion:

default-transport[$ie]=$(/home/andre/bin/test-kmail-smtp)

in the mailtransports file does work, so strangely enough the problem seems to be specific to kmailrc. As a further test I changed the configuration line to 

check-interval=13

in the kmailrc file, which correctly resulted in the activation of "Enable interval mail checking" with the appropriate interval length of 13 min. The script is also readable and executable for all, i.e. it is not a problem of identity either.
Comment 1 Dominik Tritscher 2009-03-15 17:10:37 UTC
I can confirm this issue using kmail 1.11.1
Comment 2 Laurent Montel 2015-04-12 10:11:18 UTC
Thank you for taking the time to file a bug report.

KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2.

We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.