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

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


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
-------------- 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/bed8645c/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