Re: mail filter - external command return value

Ingo Klöcker <[email protected]>
Newsgroups gmane.comp.kde.users.pim
Message-ID <[email protected]>
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

_______________________________________________
KDE PIM users mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kdepim-users
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)

iEYEABECAAYFAkx0JPoACgkQGnR+RTDgudjeGgCgqJ4MYKsa9SHT7SjDE8QJTXV5
z4MAn2othkGJRc+pkgSi3IauQObXiAB8
=N35c
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.