MailReportSpamhandler

Revision as of 10:47, 14 February 2017 by Martin.schneider (talk | contribs) (MW-577: adapt documentation to new ConfigCascade possibility)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Introduction

This OXpedia article describes, how to set up a spamhandler which optionally reports ham and spam via mail to any email address system with Open-Xchange.

In addition it moves the mail to the spam folder if marked as spam and into the Inbox if a message in the spam folder is again marked as ham. The exact behaviour can be configured.

To get the UI controls all users need to be provisioned accordingly. There is no global switch to enable/disable.


Prerequisites

Target mail

For setting up the spamhandler you require the address where to send ham and spam reports to.


Installation

We will need to install the following package on the Open-Xchange server. [Please note that even if the package carries the name cloudmark it is not bound to Cloudmark product. Though Cloudmark uses the same very generic reporting method.]


Install on OX App Suite

Debian GNU/Linux 10.0

Add the following entry to /etc/apt/sources.list.d/open-xchange.list if not already present:

deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianBuster/ /
# if you have a valid maintenance subscription, please uncomment the 
# following and add the ldb account data to the url so that the most recent
# packages get installed
# deb https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/products/appsuite/stable/backend/updates/DebianBuster/ /

and run

$ apt-get update
$ apt-get install open-xchange-spamhandler-cloudmark

Debian GNU/Linux 11.0

Add the following entry to /etc/apt/sources.list.d/open-xchange.list if not already present:

deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianBullseye/ /
# if you have a valid maintenance subscription, please uncomment the 
# following and add the ldb account data to the url so that the most recent
# packages get installed
# deb https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/products/appsuite/stable/backend/updates/DebianBullseye/ /

and run

$ apt-get update
$ apt-get install open-xchange-spamhandler-cloudmark


Configuration

Open the following file in editor

$ /opt/open-xchange/etc/imap.properties

Edit the following parameter to:

com.openexchange.imap.spamHandler=CloudmarkSpamHandler

Open the following file in editor

$ /opt/open-xchange/etc/spamhandler_cloudmark.properties

Edit the following parameters to configure the reporting service:

# Defines the eMail address to which the selected eMails will be bounced. If no
# address is specified the bounce will be skipped, but moving the selected mails
# to the target folder will still be processed (if configured)
com.openexchange.spamhandler.cloudmark.targetSpamEmailAddress=

# Defines the eMail address to which the selected eMails will be bounced, if they
# are marked as Ham. If no address is specified the bounce will be skipped,
# but moving the selected mails back to the Inbox will still be processed (if configured).
# Privacy note: This will send private mails of users to that address when marked as Ham
com.openexchange.spamhandler.cloudmark.targetHamEmailAddress=

# Defines to which folder the selected mails should be moved to after they have
# been bounced to the target eMail address. If no option is configured the
# selected mails will be moved to the users trash folder. Possible options are:
#
# 0 = Do not move the message at all (not recommended)
# 1 = User's trash folder (Default)
# 2 = User's SPAM folder
# 3 = Subscribed confirmed-spam folder (experimental)
com.openexchange.spamhandler.cloudmark.targetSpamFolder=2

# Defines if the spam/ham message is passed as a nested message to the target address
#
# ----------------------------------== /!\ ==----------------------------------------
# Note: This option needs to be clarified with your running Cloudmark service that
#       passing the spam/ham message as a nested message is accepted and properly
#       handled!
# -----------------------------------------------------------------------------------
#
# Default is "true"
com.openexchange.spamhandler.cloudmark.wrapMessage=true

Once done then reboot the OX Service

$ service open-xchange restart


Finally, we will need to enable the capabilities for SPAM. To do this we have to run the following command for e.g.

$ changeuser -A oxadmin -P admin_password -c contextID -u username --gui_spam_filter_capabilities_enabled true 

or to set the property com.openexchange.spamhandler.enabled to true via ConfigCascade