[imp] Help with enabling spam reporting
Arjen de Korte
arjen+horde at de-korte.org
Fri Dec 9 12:01:06 UTC 2016
Citeren HiP-HiPpO <arthur at cdne.net>:
>>>>>>>>> I created the file imp/conf/backends.local.php with only the
>>>>>>>>> following contents. When logging in, I see no additional
>>>>>>>>> option to report mail as spam. How do I enable reporting?
>>>>>>>>>
>>>>>>>>> <?php
>>>>>>>>> $conf['spam']['reporting'] = true;
>>>>>>>>> $conf['spam']['spamfolder'] = Spam;
>>>>>>>>> $conf['notspam']['reporting'] = true;
>>>>>>>>> $conf['notspam']['spamfolder'] = Inbox;
>>>>>>>>> $conf['spam']['program'] = '/usr/bin/spamc -C report -u %l';
>>>>>>>>> $conf['notspam']['program'] = '/usr/bin/spamc -C revoke -u %l';
>>>>>>>>>
>>>>>>>>> Horde version 5.2.12
>>>>>>>>> Imp version 6.2.16
>>>>>>>>>
>>>>>>>>> Thank you, Art
>>>>>>>>> -
>>>>>>>>
>>>>>>>> I replaced all the contents in backends.local.php with the
>>>>>>>> example shown in this thread and I have spam reporting buttons
>>>>>>>> https://lists.horde.org/archives/horde/Week-of-Mon-20150216/053728.html
>>>>>>>
>>>>>>> This does not seem to be working.
>>>>>>
>>>>>> This will only work if you have a spamd daemon running and it
>>>>>> can accept connections from the spamc client.
>>>>>>
>>>>>>> Initially, I was able to select a few incoming messages and
>>>>>>> choose the Spam button to report. This is no longer working.
>>>>>>> Now I select only one message, choose "Report as Spam". The
>>>>>>> message is updated with an icon to suggest it is being
>>>>>>> processed as spam, however, that process never completes and
>>>>>>> the logged in session is hung in the browser. I need to kill
>>>>>>> the browser and relogin to find that one message in an
>>>>>>> unchanged state, still seen as New in the Inbox.
>>>>>>
>>>>>> --
>>>>>>
>>>>>
>>>>> spamc seems to be working. I used the GTUBE example file
>>>>> here; http://spamassassin.apache.org/gtube/gtube.txt
>>>>> and saved it as test.eml. On a command line, I used `spamc -R <
>>>>> test.eml`. This produced output and the test email was given a
>>>>> content analysis score of 1000.0 points.
>>>>>
>>>>> I hadn't noticed the difference in versions between Groupware
>>>>> and Horde itself before. Seems odd, but maybe not.
>>>>> Horde Groupware Webmail Edition 5.2.16
>>>>> Horde 5.2.12
>>>>> Imp 6.2.16
>>>>
>>>> Seems very unreliable at this point. With one login session, I
>>>> was able to select one email in Inbox and choose the Spam button.
>>>> I selected the next mail, choose the Spam button and the browser
>>>> churns for a very long time. I have to kill the browser instance
>>>> and log back in. After logging in again, I selected a different
>>>> mail, clicked the Spam button and the browser churned away, I
>>>> forced killed the browser. The next time logging in, I was able
>>>> to mark 5 messages as Spam, on the 6th, browser churns and
>>>> another force kill of the browser instance.
>>>>
>>>
>>> Is there anything I can provide (proxy logs, debug logs, etc.) to
>>> help troubleshoot this or should I consider it a broken feature
>>> and back out of the configuration change?
>>
>> Post the full contents of your
>> <horde>/imp/config/backends.local.php. Spam reporting works
>> flawlessly here, so if it isn't working for you, there must be a
>> configuration issue.
>>
>
> <?php
> // IMAP server
> $servers['imap'] = array(
> // ENABLED by default; will connect to IMAP port on local server
> 'disabled' => true,
> 'name' => 'IMAP Server',
> 'hostspec' => 'localhost',
> 'hordeauth' => false,
> 'protocol' => 'imap',
> 'port' => 143,
> // Plaintext logins are disabled by default on IMAP servers
> (see RFC 3501
> // [6.2.3]), so TLS is the only guaranteed authentication available by
> // default.
> 'secure' => 'tls',
> );
>
> $servers['advanced'] = array(
> // Disabled by default
> 'disabled' => false,
> 'name' => 'Advanced IMAP Server',
> 'hostspec' => 'localhost',
> 'hordeauth' => false,
> 'protocol' => 'imap',
> 'port' => 143,
> 'secure' => 'tls',
> 'maildomain' => 'cdne.net,icwazy.us',
There should be no comma in the value, you can only specify one
default domain as far as I know. If you need to support multiple
domains, you probably need a virtual hosts setup.
> 'smtp' => array(
> // 'auth' => true,
> // 'debug' => false,
> // 'horde_auth' => false,
> // 'host' => 'smtp.example.com',
> // 'localhost' => 'localhost',
> // 'password' => null,
> // /* Mail from a MUA SHOULD be sent via the mail submission
> port (587)
> // * rather than the MTA port (25). Note that mail submission
> // * REQUIRES some method of authentication (whether explicit
> // * user/password credentials or configuring the mail submission
> // * agent to automatically authenticate this host based on the
> // * network location). */
> // 'port' => 587,
> // 'username' => null
> ),
> 'spam' => array(
> 'innocent' => array(
> 'display' => true,
> //
> // // Email reporting driver
> // 'email' => null,
> // 'email_format' => 'digest',
> //
> // // Null reporting driver
> // 'null' => true,
> //
> // // Program reporting driver
> 'program' => '/usr/bin/spamc -d mx -C revoke -u %l',
Make sure you can actually connect to this system. It sounds kind of
weird that you have spamd running on a host named 'mx' (that's what
the above line says).
> ),
> 'spam' => array(
> 'display' => true,
> //
> // // Email reporting driver
> // 'email' => null,
> // 'email_format' => 'digest',
> //
> // // Null reporting driver
> // 'null' => true,
> //
> // // Program reporting driver
> 'program' => '/usr/bin/spamc -d mx -C report -u %l',
> ),
Same here. Try to report the example file you already had through the
same command, replacing the '%l' with an actual username. I would be
surprised if this works.
> // // It is possible to directly define additional spam drivers.
> // // The 'drivers' array should contain a list of driver objects
> // // (these classes must implement the IMP_Spam_Base class).
> // 'drivers' => array(
> // new IMP_Example_Spam_Driver()
> // )
> ),
> 'admin' => array(
> // 'user' => 'cyrus',
> // 'password' => 'cyrus_pass',
> // 'userhierarchy' => 'user.'
> ),
> 'acl' => true,
> 'cache' => false,
> // 'debug' => '/tmp/imp_imap.log',
> // 'debug_raw' => false,
> 'quota' => array(
> 'driver' => 'imap',
> 'params' => array(
> 'hide_when_unlimited' => true,
> 'unit' => '5000MB'
> )
> ),
> 'special_mboxes' => array(
> IMP_Mailbox::MBOX_DRAFTS => 'Drafts',
> IMP_Mailbox::MBOX_SENT => 'Sent',
> IMP_Mailbox::MBOX_SPAM => 'Spam',
> IMP_Mailbox::MBOX_TEMPLATES => 'Templates',
> IMP_Mailbox::MBOX_TRASH => 'Trash',
> // IMP_Mailbox::MBOX_USERSPECIAL => array(
> // 'Example' => _("Example Special Mailbox")
> // )
> ),
> 'autocreate_special' => false,
> );
>
Also try to stick to the format defined in the header of
'backends.php'. Rather than redefining the arrays, only override the
values that need changing. For example,
<?php
$servers['imap']['disabled'] = true;
$servers['advanced']['disabled'] = false;
is the recommended way to disable the default 'imap' configuration and
to enable the 'advanced' configuration. You only need to list
parameters that need to be changed from the default.
More information about the imp
mailing list