What's the proper configuration

78 views
Skip to first unread message

mlektoric

unread,
Sep 16, 2016, 5:23:17 AM9/16/16
to rspamd
Hi all, hope you're doing well.

I've been configuring some custom symbols in local.d/metrics.conf. By documentation (https://www.rspamd.com/doc/configuration/metrics.html) I thought this was OK:

group {
        name = "elmesdl_group";

        symbol {
                name = "SENDER_FROM_WHITELIST_DOMAIN";
                weight = -2.5;
                description = "Sender listed at map /etc/rspamd/from_domain.map";
        }
        symbol {
                name = "MAILCHIMP_WHITELIST_MCUSER";
                weight = -2.5;
                description = "Sender listed at map /etc/rspamd/mailchimp.map";
        }
        symbol {
                name = "ANTIABUSE_WHITELIST_HOSTNAME";
                weight = -2.5;
                description = "Sender listed at map /etc/rspamd/antiabuse.map";
        }
}

But that did not work correctly. Examining output of "rspamadm configdump metric" I was getting this:

(output omited)
    name = "elmesdl_group";
    max_score = -10;
    symbol {
        name = "SENDER_FROM_WHITELIST_DOMAIN";
        name = "MAILCHIMP_WHITELIST_MCUSER";
        name = "ANTIABUSE_WHITELIST_HOSTNAME";
        weight = -2.500000;
        weight = -2.500000;
        weight = -2.500000;
        description = "Sender listed at map /etc/rspamd/from_domain.map";
        description = "Sender listed at map /etc/rspamd/mailchimp.map";
        description = "Sender listed at map /etc/rspamd/antiabuse.map";
    }
}

After a whinle, looking at Rspamd main metrics.conf file... I have configured group this way:

group "elmesdl_group" { 

        symbol "SENDER_FROM_WHITELIST_DOMAIN" { 
                weight = -2.5;
                description = "Sender listed at map /etc/rspamd/from_domain.map";
        }
        symbol "MAILCHIMP_WHITELIST_MCUSER" {
                weight = -2.5;
                description = "Sender listed at map /etc/rspamd/mailchimp.map";
        }
        symbol "ANTIABUSE_WHITELIST_HOSTNAME" {
                weight = -2.5;
                description = "Sender listed at map /etc/rspamd/antiabuse.map";
        }
}

And now it looks good in configdump (and WebUI). Is documentation old and should be updated?

Thanks :)
Reply all
Reply to author
Forward
0 new messages