Bug 169702 - Switching between multiple identities does not update signature when using "Output of Command"
Summary: Switching between multiple identities does not update signature when using "O...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail
Classification: Applications
Component: composer (show other bugs)
Version: 1.10.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: triaged
: 211492 226045 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-24 05:03 UTC by Samat Jain
Modified: 2015-04-12 10:06 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samat Jain 2008-08-24 05:03:34 UTC
Version:            (using KDE 4.1.0)
OS:                Linux
Installed from:    Ubuntu Packages


1. Create an identity (identity A), and set as default.
2. In the identity's settings, go to "Signature" tab, select "Enable Signature", select "Output of Command" for "Obtain signature text from", and enter a command (e.g. /usr/bin/who).
3. Create another identity (identity B).
4. Repeat step 2, entering a different command (e.g. /usr/bin/finger)
5. Compose a new message. Identity A's signature appears in the new message (i.e. the output of the who command).
6. Change identity to identity B. Identity B's signature should appear (i.e. the output of the finger command), instead identity A's signature remains.

This is a KMail 1.10.0 regression, as the above works fine in KDE 1.9.9 and earlier.
Comment 1 Thomas McGuire 2008-08-24 15:09:53 UTC
This works fine for me, I also tried who and finger.
When switching the identity with the combobox in the composer, the signatures were updated correctly.
Comment 2 Samat Jain 2008-08-24 19:57:14 UTC
Hrm, I get expected behavior with:

* KDE 4.1 LiveCD (SuSE)
* Kubuntu 8.10 alpha 4
* Creating a new user on my system, logging in as them, and setting up KMail

It appears to only happen with my user, even after removing my KDE settings (~/.kde4/ on Kubuntu 8.04) directory.

I'm setting this bug as INVALID for now; I'll reopen if I can reproduce this properly.
Comment 3 Samat Jain 2008-08-25 01:04:09 UTC
Just some background: I have KMail call a script that calls a web service to generate a signature with a random quote. The script is called with different arguments to generate a different signature depending on the identity. It works great in KMail 1.9; it doesn't in KMail 1.10.

This is described differently than the original bug, but I believe it's related to the problem I'm experiencing. Let me know if I should file another bug?

The output from a command used to generate a signature does not appear to be consistently included when an identity is changed. It may be related to how long it takes for the command to run?

Steps to reproduce:
1. Create a script to generate a random signature. E.g. In a terminal:
cd ~
cat << EOF > random-signature
#!/bin/bash
dd if=/dev/random count=1 2> /dev/null | md5sum
EOF
chmod +x random-signature
2. Create an identity to run this script to generate a signature, set as default
3. Create another identity to also run this script to generate a signature
4. Compose a new message. Random signature should appear.
5. Select the identity from (2) again. Another random signature should appear as in KMail 1.9, but in KMail 1.10 the original signature remains.
6. Select the identity from (3). The signature should change, but the original signature remains.

Tested on multiple distributions this time: Kubuntu 8.10 Alpha 4, and the KDE 4.1 LiveCD.
Comment 4 Samat Jain 2008-08-31 20:18:57 UTC
Friend was able to replicate this... reopening.
Comment 5 Ruchir Brahmbhatt 2009-04-11 15:25:32 UTC
I followed steps mentioned by reporter and I could reproduce it on 1.11.2. But strange thing is that after closing that message and then trying again, it worked every time.
Comment 6 Stefano 2010-02-18 18:46:37 UTC
Hi,

I am using Debian testing/unstable (Squeeze/Sid) with KDE 4.3.4 and KMail 1.12.4.

I am using three (3) identities, two of them have a file as signature and the third one - that is *not* the default one - has the output of a script (basically it is fortune).

When I start a new email with the default identity, the right signature (from file) appears, but when I switch to the identity whose signature is the command output and switch back to one of the other two identities there is no mean to obtain the right signatures.

It seems to me that the script execution breaks somehow the "signature event".

I cannot say if this is a regression since I started to use this feature with KMail 1.12.4.

Also, I believe that bugs 211492 and 226045 are a copy of this one.

Thank you.
Comment 7 Martin Koller 2010-02-27 15:02:32 UTC
*** Bug 211492 has been marked as a duplicate of this bug. ***
Comment 8 Martin Koller 2010-02-27 15:02:40 UTC
*** Bug 226045 has been marked as a duplicate of this bug. ***
Comment 9 Frank Steinmetzger 2010-06-06 01:13:00 UTC
I confirm the bug (Gentoo, KMail 1.13.3, KDE 4.4.3).

ever since I’ve been using KMail for KDE4 I have noticed this. I have 7 identities (with different level of private information for three mail accounts), and most of them contain a call to fortune. If I didn’t like the selected fortune, I could just refresh the sig to get another one in ye olde KMail by re-selecting the identity (activate the identities combo and just click on the current identity again).

Reading the comments here, I can also confirm now that it caused by handling a script’s output. I can correctly switch back and forth between identities and their respective signatures, as long as they are just simple text strings.
Comment 10 Laurent Montel 2015-04-12 10:06:43 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.