Hello everyone,

I have come with yet more question on filters :-)

I am doing some experiments with the "Pipe to Program" filters, and I
have to say, there is not much documentation on the internet besides
this wiki page, and states the following:
Sends the message to an application of your choice. No return value is 
expected. This feature can be used to create automatic Web postings
from
 email messages or to perform additional message post processing not 
supported by Evolution.
So what I undertand from this is that the program will be called like.

echo "mail-contents" | /path/to/my/bash/script.sh
And I am trying to figure out what its actually piped though the
script, so I wrote a script to actually try and find it out:

#!/usr/bin/env bash
while IFS= read -r line; do  printf '%s\n' "$line" | tee -a
/tmp/email.outdone
echo $var | tee -a /tmp/email-test.out
/usr/bin/env > /tmp/env.out

And the scipt reads multiline when invoked like so:
# echo "lol" | evolution-pipe-check.shloland also appears on the files.


But on evolution the files gets created with an empty line, why I have
no idea.
Here is the description of the filter:
Pipe To Program test (enabled, for any account)   If all the following
conditions are met      Sender contains [email protected]   Then     
 Pipe to Program /home/masterkorp/bin/evolution-pipe-check.sh

Also the filter is called on the filter logs:
Reported 1 recent messages in '[email protected] : INBOX'2020-07-24
16:49:18 - Applied filter "Pipe To Program test" to message from 
[email protected] - "Testing Scripting"   Header 'From' value ' 
[email protected]' does match '[email protected]'   Finished test
of message uid:44388 subject:'Testing Scripting' from 
'[email protected] : INBOX' as MATCHED   Filter 'Pipe To Program
test' matched
Action: Piping message to /bin/sh

Can anyone please give me any insights on this ?
_______________________________________________
evolution-list mailing list
[email protected]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list

Reply via email to