Mercurial > dnsbl
diff src/spamass.cpp.in @ 177:a4d313c2460b
start embedded dcc filtering
author | carl |
---|---|
date | Sun, 30 Sep 2007 10:27:14 -0700 |
parents | bd33eaccfed8 |
children | 92a5c866bdfa |
line wrap: on
line diff
--- a/src/spamass.cpp.in Sun Sep 23 14:33:00 2007 -0700 +++ b/src/spamass.cpp.in Sun Sep 30 10:27:14 2007 -0700 @@ -8,8 +8,7 @@ */ -#include "config.h" -#include "dnsbl.h" +#include "includes.h" #include <errno.h> #include <fcntl.h> #include <poll.h> @@ -24,7 +23,7 @@ char *spamc = "@SPAMC@"; char *spamc_empty = ""; -bool warnedmacro = false; /* have we logged that we couldn't fetch a macro? */ +static bool warnedmacro = false; // have we logged that we couldn't fetch a macro? const int maxlen = 1000; // used for snprintf buffers @@ -70,6 +69,7 @@ void SpamAssassin::mlfi_envrcpt(SMFICTX *ctx, char *envrcpt) { if (first_recipient) { + first_recipient = false; /* Send the envelope headers as X-Envelope-From: and X-Envelope-To: so that SpamAssassin can use them in its whitelist checks. Also forge as complete a dummy @@ -122,19 +122,21 @@ output(string("X-Envelope-From: ") + envfrom + "\r\n"); } output(string("X-Envelope-To: ") + envrcpt + "\r\n"); - first_recipient = false; } void SpamAssassin::mlfi_header(char* headerf, char* headerv) { if (!running) Connect(); + if (running) { output(spamc_input); + spamc_input.empty(); + } + output(headerf); output(": "); output(headerv); output("\r\n"); - spamc_input.empty(); }