*** sendmail/collect.c.orig Tue Dec 19 15:21:23 2000 --- sendmail/collect.c Tue Dec 19 15:21:27 2000 *************** nextstate: *** 461,466 **** --- 461,498 ---- } readerr: + /* readerr is the target of all 'DATA' command good and bad */ + #ifdef REGEX_BODY + /* -tim */ + + if(df) { + STAB *regex_map; + char *regex_map_name="bodyregex"; + char *av[2]; + int regex_filtered=0; /* true if to be filtered */ + char buf[MAXLINE]; /* might make use of buflen counts */ + int rcode; + + regex_map = stab(regex_map_name, ST_MAP, ST_FIND); + if (regex_map != NULL) { + av[1] = NULL; + + rewind(df); + av[0] = buf; + while(fgets(buf,sizeof(buf)-1,df)) { + if((*regex_map->s_map.map_class->map_lookup) + (®ex_map->s_map, buf, av, &rcode)) + regex_filtered=1; + } + + if (regex_filtered) + syserr("554 5.3.0 body error"); + } + } + + + #endif /* REGEX_BODY */ + if ((feof(fp) && smtpmode) || ferror(fp)) { const char *errmsg = errstring(errno);