-------- Original-Nachricht --------
> Datum: Thu, 23 Jul 2009 17:13:19 +0100
> Von: Carlo Rodrigues <[email protected]>
> An: [email protected]
> Betreff: [Dspam-devel] trouble understanding an extract of agent_shared.c on
> process_parseto()
> 829 int process_parseto(AGENT_CTX *ATX, const char *buf) {
> 830 char *y = NULL;
> 831 char *x;
> 832 char *h;
> 833
> 834 if (!buf)
> 835 return EINVAL;
> 836 h = strstr(buf, "\r\n\r\n");
>
buf is the "To: " header line and h is a pointer to into buf if buf contains
"\r\n\r\n". If not found then h = NULL.
> 837 if (!h) h = strstr(buf, "\n\n");
>
Same as above but this time looking for "\n\n".
> 838
> 839 x = strstr(buf, "<spam-");
> 840 if (!x)
> 841 x = strstr(buf, " spam-");
> 842 if (!x)
> 843 x = strstr(buf, ":spam-");
> 844 if (!x)
> 845 x = strstr(buf, "<spam@");
> 846 if (!x)
> 847 x = strstr(buf, " spam@");
> 848 if (!x)
> 849 x = strstr(buf, ":spam@");
> 850 if (x > h) x = NULL;
>
> I'm trying to understand what is the h variable for. I always get h=NULL
> on lines 836/837, and then x>h is always true, and the email retraining
> wasn't working for me. If I comment line 850, it is working as expected,
> and the signature of the forwarded email is retrained as spam.
>
Probably better for your case would be to extend the parsing of the To header
line to be:
836 h = strstr(buf, "\r\n\r\n");
837 if (!h) h = strstr(buf, "\n\n");
838 if (!h) h = strstr(buf, "\r\n");
839 if (!h) h = strstr(buf, "\n");
What MTA do you have over there? Can you attach a message in raw format (how
the MTA produced it and DSPAM get's it) here so I can inspect the message?
> Thank you.
>
> Carlo Rodrigues
>
// Steve
--
Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02
------------------------------------------------------------------------------
_______________________________________________
Dspam-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspam-devel