Code for learning mode uploaded
2005-12-13 by Ugo Bellavance
Yahoo Groups archive
Index last updated: 2026-04-13 23:57 UTC
Thread
2005-12-13 by Ugo Bellavance
Ok, I uploaded the code in the 'file' section. It compiles and seems to work. But I get logs that don't seem to be accurate: Milter add: header: X-Greylist: Delayed for 00:01:12 by milte r-greylist-2.0.2 X-Greylist: Delayed for 00:11:44 by milter-greylist-2.0.2 Both messages were not Delayed at all. Please let me know what you think. It is far from being production grade. Regards,
2005-12-13 by Emmanuel Dreyfus
On Tue, Dec 13, 2005 at 01:20:22PM -0000, Ugo Bellavance wrote:
> Milter add: header: X-Greylist: Delayed for 00:01:12 by milte
> r-greylist-2.0.2
> X-Greylist: Delayed for 00:11:44 by milter-greylist-2.0.2
>
> Please let me know what you think. It is far from being production grade.
But you are making progress fast.
In order to fix the header problem, we need to rework the code a bit
deeper. You can roll back the two changes where you traded a SMFIS_TEMPFAIL
for a SMFIS_CONTINUE (but retain the changes you did to add the config
option), then:
In acl.h, add a define for EXF_LEARN after other EXF_* stuff
In miter-greylist.c:mlfi_envrcpt(), after the conf.c_debug test:
if (conf.c_learnmode) {
priv->priv_elapsed = 0;
priv->priv_whitelist = EXF_LEARN;
return SMFIS_CONTINUE;
}
In miter-greylist.c:mlfi_eom(), you have a list of if statement
for setting whystr depending on priv->priv_whitelist, add one for
learn mode:
if (priv->priv_whitelist & EXF_LEARN) {
ADD_REASON(whystr, "Learning mode enabled");
priv->priv_whitelist &= ~EXF_LEARN;
}
And you are done.
--
Emmanuel Dreyfus
manu@...2005-12-13 by Ugo Bellavance
--- In milter-greylist@yahoogroups.com, Emmanuel Dreyfus <manu@n...>
wrote:
>
> On Tue, Dec 13, 2005 at 01:20:22PM -0000, Ugo Bellavance wrote:
> > Milter add: header: X-Greylist: Delayed for 00:01:12 by milte
> > r-greylist-2.0.2
> > X-Greylist: Delayed for 00:11:44 by milter-greylist-2.0.2
> >
> > Please let me know what you think. It is far from being
production grade.
>
> But you are making progress fast.
Thanks...
>
> In order to fix the header problem, we need to rework the code a bit
> deeper. You can roll back the two changes where you traded a
SMFIS_TEMPFAIL
> for a SMFIS_CONTINUE (but retain the changes you did to add the config
> option), then:
>
> In acl.h, add a define for EXF_LEARN after other EXF_* stuff
>
> In miter-greylist.c:mlfi_envrcpt(), after the conf.c_debug test:
> if (conf.c_learnmode) {
> priv->priv_elapsed = 0;
> priv->priv_whitelist = EXF_LEARN;
>
> return SMFIS_CONTINUE;
> }
>
> In miter-greylist.c:mlfi_eom(), you have a list of if statement
> for setting whystr depending on priv->priv_whitelist, add one for
> learn mode:
> if (priv->priv_whitelist & EXF_LEARN) {
> ADD_REASON(whystr, "Learning mode enabled");
> priv->priv_whitelist &= ~EXF_LEARN;
> }
>
> And you are done.
Ok. I'll check that when I've got free time. I've already spent too
much time on this for now. I'll try that out later this week probably.
Regards,> -- > Emmanuel Dreyfus > manu@n... >