My activities New request

contact atmail support

PH: +61 (7) 5357-6605

support@atmail.com

Follow

SpamSettings Plugin

Stewart -

PROBLEM

I need Anti-Spam controls in my webmail client only installation.

ENVIRONMENT

  • Webmail Only Installations: Version 6.0 > Current Version

CAUSE

State the cause of the problem, if known.

RESOLUTION

  1. Download the SpamSettings Plugin

    http://download.atmail.com/plugins/mail-plugins/SpamSettings.tgz


  2. Add the plugin to your installation via the WebAdmin > Plugins > Add Plugin.

  3. Navigate to the SpamSettings Directory

    cd /var/www/html/atmail/application/modules/mail/plugins/Atmail/SpamSettings


  4. Edit the Api.php settings file with your correct SpamSettings API details.

    <?php
    /**
     * This class is used to interface with your API so that the plugin
     * can get and set the Spam Settings.
     *
     */
      
    class Api
    {
     /**
     * This is the email account name for which we need to get/set data
     */
     private $_emailAccount;
     public function __construct($emailAccount)
     {
     $this->_emailAccount = $emailAccount;
      
     // Do any further API connection/authentication if required
     }
      
      
     /**
     * This method should fetch the Spam Settings and return it as
     * an array as such:
     *
     * array(
     * 'whitelist_from' => "" // (string) list of email addresses, one per line
     * 'blacklsit_from' => "" // (string) list of email addresses, one per line
     * 'required_score' => "" // (string|int) numerical value for the required_score
     * 'spam_treatment' => "" // (string) a value of either "mark", "trash" or "delete"
     * 'rewrite_header' => "" // (string)
     * )
     *
     * The user for whom you need to get the settings is in $this->_emailAccount
     *
     * @return Array
     */
     public function getSpamSettings()
     {
      
     }
      
      
     /**
     * This method is used to save the Spam Settings, so you need to use your API to set
     * the data passed to this method.
     *
     * @param array $whitelist An array of email addresses to be whitelisted
     * @param array $blacklist An array of email addresses to be blacklisted
     * @param string $requiredScore The score required to mark an email as spam
     * @param string $spamTreatment What to do if an email is marked as spam (mark, delete or trash)
     * @param string $rewriteHeader What tag to add to the subject header if an email is spam
     * @return bool|string Return boolean TRUE on success or an error message on failure
     */
     public function saveSpamSettings($whitelist, $blacklist, $requiredScore, $spamTreatment, $rewriteHeader)
     {
     // Use your API to save the spam settings
      
     }
      
    }
     
 
Have more questions? Submit a request

Comments