[kdepim-users] mail filter - external command return value

Ingo Klöcker kloecker at kde.org
Tue Aug 24 21:00:48 BST 2010


On Thursday 29 July 2010, Dj YB wrote:
> On Wednesday July 28 2010 21:00:20 Ingo Klöcker wrote:
> > On Wednesday 28 July 2010, Dj YB wrote:
> > > Hello,
> > > 
> > > I am trying to create a filter that will move the message to the
> > > trash if a command on that message will return true.
> > > is that possible? that the action will depend on a program return
> > > value...
> > 
> > No, that's not possible. You can make your command add a header to
> > the message. Then create a second filter which acts on this
> > header.
> 
> Thanks,
> how do I do that (add a header)?

The easiest solution would be to add the header at the start of the 
message. You will have to write a small script which calls the command 
and, if the command says that the message is trash, first outputs the 
header and then the message. A header line looks as follows:

X-My-Header: This is trash

i.e. it consists of the header name 'X-My-Header' followed by a colon 
followed by the header text.


Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdepim-users/attachments/20100824/477f3bab/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM users mailing list
kdepim-users at kde.org
https://mail.kde.org/mailman/listinfo/kdepim-users


More information about the kdepim-users mailing list