[Users] Using filter actions to call shell script to change Subject of Message

sue butler suevb01 at gmail.com
Tue Mar 28 19:02:32 CEST 2017


I am relatively new to Claws, but am managing to set it up as I want, 
with a number of filters to sort mail, and forward when necessary.  I am 
running it on a Raspberry Pi with a NOOBS set-up.

But I have recently hit a brick wall.

What I want to do is automatically change the subject line of an email 
before forwarding it on. (Both remove and add things)

I can set a filter to run a Python script with no problems, and I have 
written a short Shell script to make a simple change.  The search and 
replace bit of the shell script works fine on a simple text file, and 
also on a copy of the email file.  All it currently does is find a word 
and replace it.

I have used the example here: 
http://www.claws-mail.org/faq/index.php/Actions as a template, but it 
doesn't seem to work.  I suspect that it is something to do with how I 
am using %F to get the output back, but cannot work out what I am doing 
wrong.  My action looks like this:

echo %F | xargs -n 1 remove-stuff.sh

The action seems to be acceptable, in that it doesn't crash or stop 
following actions, but it just doesn't seem to do anything!

I have looked back through a year's archives of this list and have found 
no relevant thread, so I am hoping someone can point me in a good direction.

Many thanks


More information about the Users mailing list