[imp] Spam not reporting

Michael J Rubinsky mrubinsk at horde.org
Wed Jan 4 21:16:32 UTC 2017


Quoting HiP-HiPpO <arthur at cdne.net>:

>  
>
>>  
>>
>>> I have spam reporting enabled.  What I discovered is that messages  
>>> sent through this method are not actually being submitted  
>>> correctly.  I also found through manual testing, that the  
>>> parameter '-C revoke' is not always successful.  So I changed the  
>>> program line for spamc to use '-L spam' and '-L forget'  
>>> respectively.  Here's how I tested.
>>>
>>> In Horde and logged in as user1, find a message in Inbox to route  
>>> through the Spam reporting process.  Select it and choose Other  
>>> Options->View Source.  Copy all the source into a new file named  
>>> email.eml on the mail server system.
>>>
>>> Log into the mail server system as user1.
>>> Using spamc, manually report the email as spam to the system to  
>>> understand the intended behavior.
>>> $ spamc -d localhost -L spam -s 1500000 -u user1 < email.eml
>>>
>>> Responds with 
>>> Message successfully un/learned
>>>
>>> Run the same command a second time.
>>> $ spamc -d localhost -L spam -s 1500000 -u user1 < email.eml
>>>
>>> Responds with
>>> Message was already un/learned
>>>
>>> Remove the email from spamassassin with 
>>> $ spamc -d localhost -L forget -s 1500000 -u user1 < email.eml
>>>
>>> Responds with
>>> Message successfully un/learned
>>>
>>> Next, let's report the same email using Horde Spam Reporting then  
>>> manually test that it was learned.  
>>> In Horde, choose the same message from the Inbox and use the Spam  
>>> reporting method.  Horde handles the spam reporting correctly and  
>>> the messsage is moved to an alternative folder as intended.  This  
>>> works fine.
>>>
>>> Let's return to the email server system and manually check that  
>>> the email was submitted correctly.
>>>
>>> Rerun spamc with the email.eml file.  This should respond with a  
>>> meesage that this was already learned.
>>>
>>> $ spamc -d localhost -L spam -s 1500000 -u user1 < email.eml
>>>
>>> Responds with 
>>> Message successfully un/learned
>>>
>>> It does NOT!  Instead this message has now been learned manually.  
>>>  Horde did not report this correctly.
>>>
>>> Here is my backends.local.php file for reference.
>>>
>>> <?php
>>> $servers['imap']['disabled'] = true;
>>> $servers['advanced']['disabled'] = false;
>>> $servers['advanced']['name'] = 'Advanced IMAP Server';
>>> $servers['advanced']['hostspec'] = 'localhost';
>>> $servers['advanced']['port'] = 143;
>>> $servers['advanced']['maildomain'] = 'domain.net';
>>> $servers['advanced']['spam']['innocent']['display'] = true;
>>> $servers['advanced']['spam']['innocent']['program'] =  
>>> '/usr/bin/spamc -s 1500000 -d localhost -L forget -u %l';
>>> $servers['advanced']['spam']['spam']['display'] = true;
>>> $servers['advanced']['spam']['spam']['program'] = '/usr/bin/spamc  
>>> -s 1500000 -d localhost -L spam -u %l';
>>> $servers['advanced']['special_mboxes']['IMP_Mailbox::MBOX_DRAFTS']  
>>> = 'Drafts';
>>> $servers['advanced']['special_mboxes']['IMP_Mailbox::MBOX_SENT'] = 'Sent';
>>> $servers['advanced']['special_mboxes']['IMP_Mailbox::MBOX_SPAM'] = 'Spam';
>>> $servers['advanced']['special_mboxes']['IMP_Mailbox::MBOX_TEMPLATES'] =  
>>> 'Templates';
>>> $servers['advanced']['special_mboxes']['IMP_Mailbox::MBOX_TRASH']  
>>> = 'Trash';
>>> $servers['advanced']['autocreate_special'] = true;
>>>
>>> Looking at the apache status, it does show that spamc process was  
>>> kicked off, but it does not appear that any intended email files  
>>> are actually being submitted, unless this is just how the log  
>>> lines appear.
>>>
>>> # /etc/init.d/apache2 status 
>>> ● apache2.service - LSB: Apache2 web server
>>>    Loaded: loaded (/etc/init.d/apache2)
>>>   Drop-In: /lib/systemd/system/apache2.service.d
>>>            └─forking.conf
>>>    Active: active (running) since Thu 2016-12-22 01:54:09 PST; 5 days ago
>>>   Process: 25714 ExecStop=/etc/init.d/apache2 stop (code=exited,  
>>> status=0/SUCCESS)
>>>   Process: 24796 ExecReload=/etc/init.d/apache2 reload  
>>> (code=exited, status=0/SUCCESS)
>>>   Process: 25739 ExecStart=/etc/init.d/apache2 start (code=exited,  
>>> status=0/SUCCESS)
>>>    CGroup: /system.slice/apache2.service
>>>            ├─  417 /usr/sbin/apache2 -k start
>>>            ├─  431 /usr/sbin/apache2 -k start
>>>            ├─  432 /usr/sbin/apache2 -k start
>>>            ├─  448 /usr/sbin/apache2 -k start
>>>            ├─  449 /usr/sbin/apache2 -k start
>>>            ├─  452 /usr/sbin/apache2 -k start
>>>            ├─  454 /usr/sbin/apache2 -k start
>>>            ├─25018 /usr/sbin/apache2 -k start
>>>            ├─25753 /usr/sbin/apache2 -k start
>>>            ├─25757 /usr/sbin/apache2 -k start
>>>            ├─25758 /usr/sbin/apache2 -k start
>>>            ├─25843 /usr/sbin/apache2 -k start
>>>            ├─25846 /usr/sbin/apache2 -k start
>>>            ├─25847 /usr/sbin/apache2 -k start
>>>            ├─26512 /usr/sbin/apache2 -k start
>>>            ├─27332 /usr/sbin/apache2 -k start
>>>            ├─27334 /usr/sbin/apache2 -k start
>>>            ├─27403 sh -c /usr/bin/spamc -s 1500000 -d localhost -L  
>>> spam -u 'user1'
>>>            ├─27404 /usr/bin/spamc -s 1500000 -d localhost -L spam -u user1
>>>            ├─28056 /usr/sbin/apache2 -k start
>>>            ├─31845 /usr/sbin/apache2 -k start
>>>            ├─31987 /usr/sbin/apache2 -k start
>>>            └─32190 /usr/sbin/apache2 -k start
>>>  
>>
>> Hi dev list.  Is there any other details I can add to this report  
>> that could be helpful to solve this? 
>>
>> Thank you,
>> Art
>> --
>
> I added the line
> $servers['debug'] = '/tmp/horde-debug.log';
> to imp/config/backends.local.php
> in hopes to get some additional details to append here.  The log  
> file is not created.


You are missing the server key. I.e.,

$servers['advanced']['debug'] = '/tmp/imap-debug.log';

Though I'm not sure this will show anything about your spam problem.

Are you sure that your webserver user has the correct permissions to  
report spam to spamc?

> -- 
> imp mailing list
> Frequently Asked Questions: http://wiki.horde.org/FAQ
> To unsubscribe, mail: imp-unsubscribe at lists.horde.org



-- 
mike
The Horde Project
http://www.horde.org
https://www.facebook.com/hordeproject
https://www.twitter.com/hordeproject
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3282 bytes
Desc: S/MIME Signature
URL: <https://lists.horde.org/archives/imp/attachments/20170104/90e26122/attachment.bin>


More information about the imp mailing list