[Mimedefang] RE: Testing mailing list headers

Jim McCullars jim at info.uah.edu
Fri Apr 9 16:21:09 EDT 2004



On Fri, 9 Apr 2004, Alex S Moore wrote:

> I want to skip the SpamAssassin check for a specific set of mailing lists,
> like this one.  How do I refer to a header value, such as X-BeenThere or
> List-Id?

   There's not a built-in way to do this, you have to read the HEADERS
file, something like this in filter_end() before calling SpamAssassin:

  if(open(HDRS, "./HEADERS")) {
    while(<HDRS>) {
      if(m/^X-BeenThere:/) {
        close(HDRS);
        return
      }
    }
    close(HDRS);
  }

Note that in my example, I just do a return if the header is found, so
nothing else in filter_end() will get checked.  You may want to approach
it a little differently, but that's how you examine headers.

   HTH...

Jim McCullars
University of Alabama in Huntsville




More information about the MIMEDefang mailing list