Hello,
I am trying to create either a Global Interceptor or Message Interceptor to block incoming messages that have "Out of Office" or "Vacation Alert" in the subject field. Is there a way to do this with any of the existing 5.0.4 interceptors?
Neil
Hi,
I am assuming that you are using an email gateway and trying to find a way to not place out of office messages into the forums. You might want to find a way to intercept them on the email side of things.
You could use the keyword interceptor to trap these messages but I would recommend implementing a custom interceptor. Look at the existing interceptors and the java docs located at http://www.jivesoftware.com/builds/docs/latest/documentation/ for a good place to start.
Cheers,
Joel
I believe we have a custom regex interceptor, but it is too difficult to understand and use, so I would prefer using the Keyword interceptor.
I have tried putting: "out of office" OR "vacation alert" into the Blocked Content Query String but the input gets automatically converted to & quot;out of office& quot; OR & quot;vacation alert& quot;
(The amperstand is touching the quot;, but I cannot post that here because it automatically converts that entity to a ")
Please advise if I need quotation marks or not, and if this is a 5.0.4 forum bug.
Thanks,
Neil
Hi Neil,
I would highly recommend the regex editor. The keyword interceptor doesn't really work that well with strings. It is designed to work with words only. You might try escaping the quotes with /'s. Again I would use the regex interceptor.
If you are having a hard time understanding regex syntax there are some great resources on the web.
http://www.regular-expressions.info/
http://en.wikipedia.org/wiki/Regular_expression
just to name a few.
Cheers,
Joel
Using \' converts it back to & quot; I tried using /' and it didn't work. Instead it gave the following exception:
2006.07.21 15:03:04 error Db exception thrown importing message into forum "Interest Test Forum"
com.jivesoftware.forum.MessageRejectedException:
at com.jivesoftware.forum.interceptor.KeywordInterceptor.invokeInterceptor(KeywordInterceptor.java:328)
at com.jivesoftware.forum.database.DbInterceptorManager.invokeInterceptors(DbInterceptorManager.java:373)
at com.jivesoftware.forum.database.DbInterceptorManager.invokeInterceptors(DbInterceptorManager.java:384)
at com.jivesoftware.forum.database.DbInterceptorManager.invokeInterceptors(DbInterceptorManager.java:398)
at com.jivesoftware.forum.database.DbInterceptorManager.invokeInterceptors(DbInterceptorManager.java:416)
at com.jivesoftware.forum.database.DbForumThread.addMessage(DbForumThread.java:565)
at com.jivesoftware.forum.gateway.JavaMailImporter$InsertCacheItem.insert(JavaMailImporter.java:2955)
at com.jivesoftware.forum.gateway.JavaMailImporter.importMessages(JavaMailImporter.java:1345)
at com.jivesoftware.forum.gateway.JavaMailImporter.processMessagesAndImport(JavaMailImporter.java:505)
at com.jivesoftware.forum.gateway.JavaMailImporter.retrieveMessages(JavaMailImporter.java:428)
at com.jivesoftware.forum.gateway.JavaMailImporter.importData(JavaMailImporter.java:155)
at com.jivesoftware.forum.gateway.Pop3Importer.importData(Pop3Importer.java:85)
at com.jivesoftware.forum.gateway.DefaultGatewayManager$ImportRunnable.run(DefaultGatewayManager.java:576)
Neil,
I would recommend using the regular expression filter instead then. Like I mentioned earlier the keyword filter is not designed to work on strings. If that is not working right you should also be able to configure your mail server to drop/delete "out of office" messages from the forums inboxes.
Cheers,
Joel