amyreese / znc-push

Push notification service module for ZNC
http://noswap.com/projects/znc-push
MIT License
556 stars 122 forks source link

Add generic support for sending notifications via email #95

Open amyreese opened 10 years ago

amyreese commented 10 years ago

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

untitaker commented 10 years ago

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

jdb8 commented 9 years ago

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!

amyreese commented 9 years ago

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.

jdb8 commented 9 years ago

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

untitaker commented 9 years ago

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.

PaulFreund commented 9 years ago

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