Hello there,
i'm very new to node-red.
I'm trying my first steps, but stuck now.
i made a bash script, querying blacklist from spamhaus
the output tells me, if there is an entry or not.
the function is as follows
var regExp = /.*payload/; // search for payload
var results = regExp.exec(msg.payload); // use as payload
msg.payload = results; // show result of payload
msg.payload without function
msg : Object
{ _msgid: "44ca6ba5.d46494", payload: "mailserver not listed by sbl…", rc: object }
msg payload with function:
function : (error)
"TypeError: Cannot read property '0' of null"
return msg;
aim should be a dashboard button, green if ok red if spam-listed
i hope someone could help me to solve, or give me a or some hints to my mistakes.
sry for my bad english
best regards e