[horde] Report spam button and moving spam to Spam folder.

Andreas Mauser andreas at mauser.info
Fri Sep 29 18:35:53 UTC 2017


Hi,

----- Nachricht von "P.V.Anthony" <anthony at mindmedia.com.sg> ---------
   Datum: Sat, 30 Sep 2017 01:45:10 +0800
     Von: "P.V.Anthony" <anthony at mindmedia.com.sg>
Betreff: Re: [horde] Report spam button and moving spam to Spam folder.
      An: horde at lists.horde.org


> On 29/09/2017 23:57, Jan Schneider wrote:
>
>>> Noted. If I want to activate "Move to Spam mailbox", what should I use?
>>
>> You quoted the possible options in your original post.
>
> Please bear with me. I really do not know the syntax. I tried some  
> but I failed.
>
> Here is the one from prefs.conf. I just do not know what to add.
>
> $_prefs['delete_spam_after_report'] = array(
>     'value' => 0,
>     'type' => 'enum',
>     'enum' => array(),
>     'desc' => _("What to do with messages after they have been  
> reported as spam?"),
>     'help' => 'prefs-delete_spam_after_report',
>     'on_init' => function($ui) {
>         $enum = array(
>             0 => _("Nothing"),
>             1 => _("Delete message")
>         );
>         if  
> ($GLOBALS['injector']->getInstance('IMP_Factory_Imap')->create()->access(IMP_Imap::ACCESS_FOLDERS))  
> {
>             $enum[2] = _("Move to Spam mailbox");
>         }
>         $ui->prefs['delete_spam_after_report']['enum'] = $enum;
>     }
> );
>
> What should I do here?
>
> // Move to Spam mailbox
> $_prefs['delete_spam_after_report']['enum'] = ### <-- what should I  
> add here to "Move to Spam mailbox".
>

Ths is how my settings look in the prefs.php:


$_prefs['delete_spam_after_report'] = array(
     'value' => 0,
     'type' => 'enum',
     'enum' => array(),
     'desc' => _("What to do with messages after they have been  
reported as spam?"),
     'help' => 'prefs-delete_spam_after_report',
     'on_init' => function($ui) {
         $enum = array(
             0 => _("Nothing"),
             1 => _("Delete message")
         );
         if  
($GLOBALS['injector']->getInstance('IMP_Factory_Imap')->create()->access(IMP_Imap::ACCESS_FOLDERS))  
{
             $enum[2] = _("Move to Spam mailbox");
         }
         $ui->prefs['delete_spam_after_report']['enum'] = $enum;
     }
);

In backends.local I have:
<?php
$servers['imap']['disabled'] = true;
$servers['advanced']['disabled'] = false;
$servers['advanced']['hordeauth'] = false;
$servers['advanced']['hostspec'] = 'mailserver-IP-here';
$servers['advanced']['secure'] = tls;
$servers['advanced']['port'] = 143;
$servers['advanced']['maildomain'] = 'maildomain-here';
$servers['advanced']['acl'] = true;
$servers['advanced']['protocol'] = imap;
$servers['advanced']['cache'] = none;
$servers['advanced']['quota']['params']['unit'] = GB;
$servers['advanced']['quota']['params']['hide_when_unlimited'] = false;

$servers['advanced']['spam']['innocent']['program'] = '/usr/bin/spamc  
-d mx -C revoke -u %l';
$servers['advanced']['spam']['innocent']['display'] = true;
$servers['advanced']['spam']['spam']['program'] = '/usr/bin/spamc -d  
mx -C report -u %l';
$servers['advanced']['spam']['spam']['display'] = true;
$servers['advanced']['autocreate_special'] = true;

$servers['advanced']['debug'] = '/var/log/horde_imp.log';
$servers['advanced']['debug_raw'] = false;

And the setting you want to change, I do change in the User GUI.
If you set it and save you will see the changes in the conf files.

Hope that helps.
Andreas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 3871 bytes
Desc: ?ffentlicher PGP-Schl?ssel
URL: <https://lists.horde.org/archives/horde/attachments/20170929/d1222981/attachment.bin>


More information about the horde mailing list