look like %M is already used for sendmail macros
I´m using %Hs
case 'H': { /* SpamAssassin information */
#ifdef USE_SPAMD
fstr_len = 2;
switch(*(ptok + 1)) {
case 's': { /* score */
char buf[QSTRLEN + 1];
(void)snprintf(buf, sizeof(buf), "%g",(double)priv->priv_spamd_score10/10);
mystrncat(&outstr, buf, &outmaxlen);
break;
}
}
#endif /* USE_SPAMD */
break;
}
--- In milter-greylist@yahoogroups.com, manu@... wrote:
>
> 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@...
>Message
Re: output spamassassin score
2010-07-05 by gitoshi
Attachments
- No local attachments were found for this message.