Subversion Repositories sa-exim

Compare Revisions

Ignore whitespace Rev 22 → Rev 24

/trunk/debian/changelog
1,3 → 1,17
sa-exim (4.2.1-8) unstable; urgency=medium
 
* Since version 4.67-1, exim4 only exports those symbols that are part
of the official local_scan API. Unfortunately, sa-exim cheated and
declared three extern variables by itself:
· primary_hostname: Now retrieved by expanding "$primary_hostname".
· smtp_out: Use smtp_fflush() to get error indication.
· body_linecount: No workaround; $body_linecount simply won't be
updated. I'm working to get Exim to update it along with other
variables such as $message_size.
(Closes: #420443, #420555)
 
-- Magnus Holmgren <magnus@kibibyte.se> Mon, 23 Apr 2007 13:00:56 +0200
 
sa-exim (4.2.1-7) unstable; urgency=low
 
* Don't depend on debconf in postrm; if we can't prompt the user,
/trunk/sa-exim.c
29,10 → 29,8
#include "sa-exim.h"
 
/* Exim includes */
#include "local_scan.h"
extern FILE *smtp_out; /* Exim's incoming SMTP output file */
extern int body_linecount; /* Line count in body */
extern uschar *primary_hostname;
#include <local_scan.h>
//extern int body_linecount; /* Line count in body */
 
#ifdef DLOPEN_LOCAL_SCAN
 
604,6 → 602,12
/* Do not put a %s in there, or you'll segfault */
static char *SAmsgerror="Temporary local error while processing message, please contact postmaster";
 
/* This needs to be retrieved through expand_string in order
not to violate the API. */
static uschar *primary_hostname;
if (!primary_hostname)
primary_hostname = expand_string("$primary_hostname");
 
/* New values we read from spamassassin */
char *xspamstatus=NULL;
char *xspamflag=NULL;
1257,18 → 1261,19
}
}
 
if (SAEximDebug > 1)
/* if (SAEximDebug > 1)
{
log_write(0, LOG_MAIN, "SA: Debug2: body_linecount before SA: %d", body_linecount);
}
 
*/
/* update global variable $body_linecount to reflect the new body size*/
body_linecount = (line - 1);
/* body_linecount = (line - 1);
 
if (SAEximDebug > 1)
{
log_write(0, LOG_MAIN, "SA: Debug2: body_linecount after SA: %d", body_linecount);
}
*/
}
 
fclose((FILE *)readfh);
1359,6 → 1364,9
if (dorej && doteergrube)
{
char *teergrubewaitstr;
teergrubewaitstr=string_sprintf(SAmsgteergrubewait, spamstatus);
 
/* By default, we'll only save temp bounces by message ID so
* that when the same message is submitted several times, we
* overwrite the same file on disk and not create a brand new
1381,20 → 1389,8
 
for (i=0;i<SAteergrubetime/10;i++)
{
char *str;
/* Unfortunately, we can't use exim's smtp_printf because it
* doesn't return an error code if the write gets an EPIPE.
* So, we write ourselves, but this won't work if you have a
* TLS connection opened (that said, if you are teergrubing
* a TLS connection, it's probably a relay host, not a
* spammer, and in this case you should not teergrube a
* friendly relay, so basically we should be ok).
* If you do teergrube an SSL connection with the current
* code, you will break it, but that's acceptable */
str=string_sprintf(string_sprintf("451- %s\r\n",SAmsgteergrubewait), spamstatus);
fprintf(smtp_out, str);
ret=fflush(smtp_out);
smtp_printf("451-%s\r\n", teergrubewaitstr);
ret=smtp_fflush();
if (ret != 0)
{
log_write(0, LOG_MAIN | LOG_REJECT, "SA: Action: teergrubed sender for %d secs until it closed the connection: %s (scanned in %d/%d secs | Message-Id: %s). %s", i*10, spamstatus, scantime, fulltime, safemesgid, mailinfo);