Re: mail filter - external command return value
Ingo Klöcker <[email protected]>
| Newsgroups | gmane.comp.kde.users.pim |
|---|---|
| Message-ID | <[email protected]> |
On Tuesday 24 August 2010, Dj YB wrote:
> On Tuesday August 24 2010 23:00:48 Ingo Klöcker wrote:
> > 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.
>
> Thanks, Ingo
> but I have probably misunderstood you.
>
> in my perl script I added an output at the end if the condition is
> met:
>
> if ($s1 eq $s2)
> {
> print "X-IS-SPAM: SPAM\n$ARGV[0]";
> }
>
> but instead of changing the message, the message disappears from
> kmail totally I guess it is being deleted...
>
> what am I doing wrong?
Hmm. Is $ARGV[0] the filename of the message? If yes, then you have to
print the content of this file instead.
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) iEYEABECAAYFAkx0MVwACgkQGnR+RTDgudjP2gCgvjw4KxlI84Bvh7iE/4v5v0Te FwQAoNfD7WcucRWfT6jZC/S0qLcJn2zI =Fmqz -----END PGP SIGNATURE-----