暫無描述

Andy Baugh dcc44f89bb Goddamit 5 年之前
lib 179c170239 Revert "Use iconv" 5 年之前
notification-center dcc44f89bb Goddamit 5 年之前
scripts ab8e48aa31 Adjust template to work with local getter correctly 5 年之前
t 38b8d73d5d Switch to Cpanel::JSON::XS, I thnk it may have caused mojibake 5 年之前
.gitignore 5b0adc3845 Further refine gitignore 6 年之前
LICENSE ab7f74fa50 Revert "Move license file so that GH shows the thing in main page" 6 年之前
LICENSE-IMAGES.md fa688b84d6 Add license info for the WHM plugin image. 5 年之前
Makefile 181f08bbd4 Revert "ZZZ" 5 年之前
README.md a2ddc430d1 Update readme about local driver, save notices per user 5 年之前
TODO cc2f662f1e Add beginnings of work on IRC provider. Currently doesn't work. 6 年之前

README.md

iContact-cPanel-Plugins

Extra "Contact Manager" Providers for cPanel and WHM

Current iContact plugins:

  • XMPP -- Stable XMPP provider (well, as stable as Net::XMPP is, anyways). See issue #2
  • IRC -- New provider, needs more testing by users out in the wild. "Works for Me"
  • Slack -- Works presuming you have an incoming WebHook URL, much like CpanelRicky's MatterMost plugin.
  • Discord -- Similar to Slack, use an incoming WebHook URL.
  • Local -- Writes the notifications to /var/cpanel/iContact_notices/$USER instead of sending them anywhere.

Current WHM & cPanel Plugins:

  • WHM >> Plugins >> Notification Center - Shows notifications the administrator or reseller has not reviewed yet, with options to silence these in the future.
  • cPanel >> Plugins >> Notification Center - Same thing, just for the cPanel user.

Installation and Use:

  • Clone this repo with git onto a cPanel host of at least 11.64+.
  • After changing the current working directory of your terminal session into the repo's directory, run make if you want to install all the providers.

OR

  • If you want to only install one specific provider, run 'make install-$provider' -- example: make install-slack would install Slack's provider.
  • (Optionally) Run the Tests with make test
  • Go to WHM >> Basic Setup and configure the provider options
  • Go to WHM >> Contact Manager and make sure it is set up to spam you mercilessly (and for the notifications you care about!).
  • Do something to trigger a notification that should fire notifications from cPanel & WHM per your preference in /etc/clevels.conf
  • If you tire of this and want to get rid of them all, run make uninstall.

KNOWN BUGS

ejabberd:

Currently, the DIGEST-MD5 method (used by default in Net::XMPP when authenticating against the latest ejabberd versions) causes failures to send notifications. Add disable_sasl_mechanisms: "DIGEST-MD5" to your ejabberd.yml config file to avoid this problem. See issue #2 on the tracker.

XMPP Driver (generally):

I've seen a report about gtalk.t failing on install for certain users when attempting to install Net::XMPP as a dependency. If this occurs, you'll likely have to manually run CPAN and tell it to ignore the failing tests: cpan -i -f Net::XMPP. After it installs you can then rerun make install and it should be OK. (the '-f' flag stands for 'force')

TESTING NOTES

If you want to run a functional test for any of these (to debug problems), please run the following script: scripts/generate_testing_configuration.pl as this will prompt you for all the needed values to make the test run (it tells you how to run it too).

Anyways, this script will write out a file like the following to the repo's top level directory. In this example, we're using the XMPP provider, so it will be .xmpptestrc:

XMPPUSERNAME: user@domain.tld

XMPPPASSWORD: hunter2

XMPPCOMPONENTNAME:

XMPPUSETLS: 1

XMPPVERIFYCERT: 0

You'll note these correspond to the values in the Provider's Schema module. With that set, you should spam yourself with a message if the t/Cpanel-iContact-Provider-XMPP.t test passes.

Same goes for the IRC or Slack provider... use the same keys as in the schema module for dopeouts in its' test.

CONTACT

As always, if you feel there's a bug, please file an issue on the tracker. If you want to chat, I lurk on the cPanel Discord server, so if I'm not busy I'll probably reply if you PM me.