[horde] Report Spam to other machine
Arjen de Korte
arjen+horde at de-korte.org
Mon Apr 21 08:06:55 UTC 2014
Citeren Andreas Mauser <andreas at mauser.info>:
> ----- Nachricht von Patrick Boutilier <boutilpj at ednet.ns.ca> ---------
> Datum: Sun, 20 Apr 2014 23:10:52 -0300
> Von: Patrick Boutilier <boutilpj at ednet.ns.ca>
> Betreff: Re: [horde] Report Spam to other machine
> An: horde at lists.horde.org
>
>
>> On 04/20/2014 10:53 PM, Andreas Mauser wrote:
>>>
>>> Hello,
>>>
>>> recently I removed Horde from my mailserver and put it on another, newer
>>> server. It is a clean new installation and works. I struggled a bit
>>> getting the 'Report Spam' Buttons back, but now they are back again.
>>>
>>> I assume that does not automatically mean that the reporting works?
>>>
>>> Setup:
>>> Server1 - Web only: Horde, Postfix, Amavisd
>>> Server2 - Mail only: Postfix, Amavisd, Dovecot
>>>
>>> DO I need amavisd and postfix on Server 1?
>>>
>>> My imp/config/backends.local.php looks like this:
>>>
>>> <?php
>>> $servers['advanced'] = array(
>>> // Disabled by default
>>> 'disabled' => false,
>>> 'name' => 'Advanced IMAP Server',
>>> 'hostspec' => '10.30.24.17',
>>> 'hordeauth' => false,
>>> 'protocol' => 'imap',
>>> 'port' => 143,
>>> 'secure' => 'tls',
>>> 'maildomain' => 'mauser.info',
>>> '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 -C revoke -u %l',
>>> ),
>>> 'spam' => array(
>>> 'display' => true,
>>> //
>>> // // Email reporting driver
>>> // 'email' => null,
>>> // 'email_format' => 'digest',
>>> //
>>> // // Null reporting driver
>>> // 'null' => true,
>>> //
>>> // // Program reporting driver
>>> 'program' => '/usr/bin/spamc -C report -u %l',
>>> ),
>>> // // 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' => 'MB'
>>> )
>>> ),
>>> '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,
>>> );
>>>
>>>
>>> Where does // // Program reporting driver
>>> 'program' => '/usr/bin/spamc -C report -u %l'
>>> sending the report to? Is it automatically the machine entered in the
>>> 'hostspec' field?
>>> Or do I have to tell the program an option to report to another IP?
>>
>>
>>
>> According to the spamc man page you would need something like
>> /usr/bin/spamc -C report -u %l -d Server2
>
> Oh, thank you very much, I missed that part and now did as it says.
> Still nothing in both servers logs.
>
>>
>> -d host[,host2], --dest=host[,host2]
>> In TCP/IP mode, connect to spamd server on given host
>> (default: localhost). Several hosts can be specified if separated
>> by commas.
>>
>> If host resolves to multiple addresses, then spamc will
>> fail-over to the other addresses, if the first one cannot be
>> connected to. It will
>> first try all addresses of one host before it tries the
>> next one in the list. Note that this fail-over behaviour is
>> incompatible with -x;
>> if that switch is used, fail-over will not occur.
>>
>>
>
> So how does the Horde process really work?
>
> Someone selects a mail, then klick the SPAM button.
> Horde takes this mail and directly put it in SPAMC's hands, and
> SPAMC will give it to the other servers amavisd?
No, spamc connects to spamd, which is a daemonized version of
spamassassin. I guess you didn't configure that or it is not
configured to allow reporting (--allow-tell), which isn't enabled by
default.
> Or do I need to configure postfix and amavisd on the webserver too?
Neither postfix nor amavisd are involved in spam reporting. They can
both be configured to use spamassassin for scanning (but usually if
you have amavisd running, it makes sense to use that).
> And does anybody know if spam gets reported will it show this action
> in the log?
Usually it will get logged somewhere. Here in /var/log/mail I see lines like
2014-04-20T11:59:22.956928+02:00 mail spamd[28633]: spamd: got
connection over /var/run/spamd.socket
2014-04-20T11:59:22.960049+02:00 mail spamd[28633]: spamd: setuid to
vscan succeeded
2014-04-20T11:59:24.764649+02:00 mail spamd[28633]: spamd: Tell:
Setting remote for vscan:65 in 1.8 seconds, 3174 bytes
Note that I'm running spamd on a UNIX domain socket, you'll want to
run it over a TCP/IP socket if you'll want connections from different
machines.
--
This message was sent from a mailinglist subscription address.
For off-list replies, you must remove the address extension.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5849 bytes
Desc: S/MIME Signature
URL: <http://lists.horde.org/archives/horde/attachments/20140421/d9b3d6fe/attachment.bin>
More information about the horde
mailing list