| Summary: | Escape shell special characters when passing %{foo} to command/pipe | ||
|---|---|---|---|
| Product: | [Unmaintained] kmail | Reporter: | Matthew Cline <matt> |
| Component: | general | Assignee: | kdepim bugs <pim-bugs-null> |
| Status: | RESOLVED INTENTIONAL | ||
| Severity: | normal | CC: | martin |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Mandriva RPMs | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
As KDE already quotes the arguments, simply do not put quotes around %{Subject}.
E.g. use: /usr/bin/foo %{Subject}
Maybe I'm doing this wrong, but I have a filter which executes the command:
/usr/bin/kdialog --msgbox "New mail: %{Subject}" &
If I leave out the quotes, all I get is a message box saying "New".
On Tuesday 27 October 2009 01:10:35 matt@nightrealms.com wrote: > Maybe I'm doing this wrong, but I have a filter which executes the command: > > /usr/bin/kdialog --msgbox "New mail: %{Subject}" & > > If I leave out the quotes, all I get is a message box saying "New". 2 comments: -) Try: /usr/bin/kdialog --msgbox "New mail: "%{Subject} & -) New mail notification can be done via kmail internally. Check: Settings -> Configure Notifications |
Version: (using KDE 4.2.4) OS: Linux Installed from: Mandriva RPMs When a filter passes an email header to a command/pipe, it should escape the shell special characters. For example, if you do: /usr/bin/foo "%{Subject}" and the subject contains any double-quotes the the command won't act as you'd expect (and will probably fail if there's an odd number of double-quotes).