spamass-milt-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Configuration information.


From: Christopher Crowley
Subject: Re: Configuration information.
Date: Fri, 30 Aug 2002 16:41:13 -0500

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Here we go. This works.

After some fumbling around, and finally looking in libmilter/mfapi.h,
I added the following.  I also added the appropriate lines to
spamass-milt.h and inserted mlfi_connect into the struct 

struct smfiDesc smfilter =
  {
    "SpamAssassin", // filter name
    SMFI_VERSION,   // version code -- leave untouched
    SMFIF_ADDHDRS|SMFIF_CHGHDRS|SMFIF_CHGBODY,  // flags
    mlfi_connect, // info filter callback  // this is new
    NULL, // HELO filter callback
    mlfi_envfrom, // envelope filter callback
    NULL, // envelope recipient filter callback
    mlfi_header, // header filter callback
    mlfi_eoh, // end of header callback
    mlfi_body, // body filter callback
    mlfi_eom, // end of message callback
    mlfi_abort, // message aborted callback
    mlfi_close, // connection cleanup callback
  };


sfsistat
mlfi_connect(SMFICTX* ctx, char* hostname, _SOCK_ADDR* hostaddress)
{
  debug(1, "mlfi_connect: enter %s",hostname);
  file://ccrowley 08.29.02
  file://adding test condition for host
  if ( cmp_nocase_partial(string("trusted.host"), string(hostname))
== 0 )
    {
      debug(1, "mlfi_connect: exit if");
      return SMFIS_ACCEPT;
    };
  debug(1, "mlfi_connect: exit else");
  return SMFIS_CONTINUE;
};


-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>

iQA/AwUBPW/mdc0q7cR88Y/bEQITuQCfUliw/sGFLKzm3MQKx/8rcvDC+WwAn1NU
/DypDHxUVHJsdkmU5BqlUqfF
=3F7z
-----END PGP SIGNATURE-----






reply via email to

[Prev in Thread] Current Thread [Next in Thread]