Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] Re: output spamassassin score

2010-07-05 by manu@netbsd.org

gitoshi <gitoshi@...> wrote:

> unfortunately I know very little C

Well, it's an opportunity to improve that skill. All you need is a minor
tweak in milter-greylist.c. The function where format strings are
expanded is fstring_expand()

I suggest we use %Ms for the spamassassin score. You need to add a code
like this:

case 'M': /* SpamAssassin information */
#ifdef USE_SPAMD
        str_len = 2;
        switch(*(ptok + 1)) {
        case 's': {     /* score */
                char buf[QSTRLEN + 1];

                (void)snprintf(buf, sizeof(buf), "%d", 
                             priv->priv_spamd_score10);
                mystrncat(&outstr, buf, &outmaxlen);
                break;
        }
#endif /* USE_SPAMD */
        break;
}

Once you get it working, please update the format string section in
greylist.conf.5 and send me a patch, I'll commit it in the repository.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.