Link Interceptor Light Manual
The interceptor it used at igniterealtime.org and works there without issues. The Link Interceptor Light uses the Apache 2.0 license. Sending emails is not possible in the "Light" version.
It does not work to build a normal plugin, Jive SBS will fail to add the interceptor - maybe because of packaging errors or it is simply not possible. Currently one must patch and compile the sources to get this working.
I try to contribute this as a plugin to Jive, but this seems to be a hard process.
Please vote for Add ability to moderate external / spam links.
The link interceptor allows to block or moderate all messages (blogs, documents, messages - initial posts and comments). It does not filter status updates or blog comments (This is a Jive SBS issue, these "message" types are not send to / received by the interceptor).
The content will pass these filters from top to bottom. Content which passes the last rule will be moderated.
There are simple settings like the "Admin User Whitelist" which allow to specify a comma-delimited list of values. Example "admin, it2000".
Complex URL Settings
The values and the regular expressions must start with the URI (http, https, ...) to match. The value length is limited to 3500 characters, using regular expressions allows to make the string shorter. All URL filters support regular expressions. The "URL ... RE" settings also allow to specify a comma-delimited list of values like the simple settings. Example: "http://jivesoftware.com/, http://www.jivesoftware.com/".
To specify regular expressions append ';' and the regular expression to the value . Example: ";https?://(www\.)?jivesoftware\.com/".
Use a tool like RegexBuddy to create and test complex regular expressions. To get started here are some useful examples:
(?:[^\.]+\.) - match for example "www.", "blog.", "community.", ..
(?:[^\.]+\.)? - ? quantifier - match the regular expression 0 or 1 time. For example "", "www.", "blog.", "community.", ...
(?:[^\.]+\.)* - * quantifier - match the regular expression 0 or more times. For example "", "www.", "subdomain.www.", "sub.domain.www.", ...
(?:[^\.]+\.)+ - + quantifier - match the regular expression 1 or more times. For example "www.", "subdomain.www.", "subdomain.blog.", ...
More information can be found at Regular-Expressions.info - Regex Tutorial, Examples and Reference - Regexp Patterns
Install it like every other plugin (Jive SBS admin page /admin/available-plugins.jspa) and restart Jive SBS.
Copy the source files into your local developent environment and create a new sbs.jar file.
This option allows to disable the interceptor.
Admin User Whitelist
A comma-delimited list of users which can post everything, including normally blocked URIs. No filter will be applied.
Admin Groups Whitelist
A comma-delimited list of groups which can post everything, including normally blocked URIs. No filter will be applied.
URI Block List
A comma-delimited list of URIs which are blocked. The default URIs are "file, rsync, nntp, tel, sms, magnet, market, telnet, ssh, sftp" and they will be blocked. If they are inserted after creation (Edit) the message or document will be moderated.
Blocked URI Error Message
The error message to show the user when content is blocked because of an URI. The default string is "Internal Server Error processing URI".
A comma-delimited list of URIs which will be processed, all other URIs are ignored. This filter creates the URL list for the further processing. The default URIs are "http, https". Add "ftp" to filter also ftp links. It's not possible to filter "mailto" content.
URL Email List RE
A comma-delimited list and regular expressions of URLs which will trigger an email notification. Set it to "http, https, ftp" to receive emails for all links or to "http://example.com" to receive emails for messages which contain this URL. Use this filter to monitor silently URLs of competitors.
A comma-delimited list of email addresses to notify when an URL is found.
URL Block Filter RE
A comma-delimited list and regular expressions of URLs which will be blocked. Use it to block URLs which should never be posted or simply leave it empty.
Blocked URL Error Message
The error message to show the user when content is blocked because of an URL. The default string is "Internal Server Error processing URL".
URL Moderation List RE
A comma-delimited list and regular expressions of URLs which will be moderated. Use it to moderate URLs, maybe of competitors.
If URLs made it until here in the filter queue then you can simply whitelist them or the creators.
URL Whitelist RE
A comma-delimited list and regular expressions of URLs which are ignored. Likely the URLs of your community, company and other companies you trust. Setting it to "http" will whitelist all URLs, this is not recommended.
A comma-delimited list of users which can post without moderation.
A comma-delimited list of groups which can post without moderation.
The two requirements are combined, to require only one of them you can set the other value to a small value or zero. To disable this option set one of the values to -1.
1. The number of days a user must be registered.
2. The number of points a user must have.
Every URL which did not match a whitelist or trusted user will be moderated.
Set the log level to DEBUG for the class com.jivesoftware.community.interceptor.LinkInterceptor. This may be tricky if you use the default log4j-file.properties, setting everything to DEBUG is something that you do not want to do in production.
The Link Interceptor logs whether it allows or blocks a message.
Debug Log Messages
The URL regular expressions are logged to allow to test them with RegexBuddy or a similar tool.
The message processing is also logged.
PASS - LinkInterceptor disabled
PASS - user in admin user whitelist (URL | Subject | Type - contentID / objectType - containerID / containerType)
PASS - user in admin group whitelist (...)
PASS - no URLs found (...)
BLOCK - illegal URI
MODERATION(BLOCK) - illegal URI (...)
PASS - URLs do not match URIList (...)
Email sent (...)
BLOCK - URL blacklist
MODERATION(BLOCK) - URL blacklist (...)
MODERATION - URL moderation (...)
PASS - all external URLs match URL whitelist (...)
PASS - user on user whitelist (...)
PASS - user on group whitelist (...)
PASS - social status OK (...)
MODERATION needed (...)
The direct link to the message
The subject as the user did enter it.
0: Interceptor that is run before the jive object has been accepted into the system.
1: Interceptor that is run after the jive object has been accepted into the system.
2: Interceptor that is run when jive objects are edited.
contentID / objectType - containerID / containerType
These are internal references to the posted content (blog, message, document).
contentID: message, blog or document number
objectType: 2=message, 38=blog entry, may vary
containerID: every space has a unique ID
containerType: 14=space, 37=blog, may vary kling