znc-push icon indicating copy to clipboard operation
znc-push copied to clipboard

Add generic support for sending notifications via email

Open amyreese opened this issue 10 years ago • 6 comments

Python will make it easy: https://docs.python.org/2/library/email.html#module-email

amyreese avatar Jun 03 '14 02:06 amyreese

Wouldn't it be much easier to allow arbitrary commands? The user then could hook sendmail into there, or something else.

untitaker avatar Sep 07 '14 13:09 untitaker

I went ahead and added basic support for this on https://github.com/jdb8/znc-push/tree/arbitrary-command-notifications - I don't normally work with C++ so it's not great. Wanted to post this here if anyone else wants to use it/improve on it. I can open a pull request if you like, too.

Disclaimer: this was created very quickly so please treat it as experimental! Especially until someone else verifies that running "; rm -rf /; " won't blow up your server!

jdb8 avatar Apr 11 '15 02:04 jdb8

Definitely would be something worth having as a pull request, but I think it would also make sense to have a way to disable this at compile time for security reasons. Eg, certain users run znc-push on bouncers available to the public, and probably don't want people able to execute arbitrary code.

amyreese avatar Apr 21 '15 23:04 amyreese

That makes sense, I didn't consider the public bouncer use-case. I'll create the PR in any case to start with.

jdb8 avatar Apr 21 '15 23:04 jdb8

Maybe we should special-case the arbitrary-command support: Read the command from a file that must be chowned by znc's user and don't allow configuration through the IRC client.

untitaker avatar Apr 22 '15 13:04 untitaker

I just implemented sending emails in the python branch in this Pull request

PaulFreund avatar Jun 02 '15 09:06 PaulFreund