79cefe7a8c
alterMIME is a small program which is used to alter your mime-encoded mailpacks as typically received by e.g. amavisd-new. It can: * Insert disclaimers * Insert arbitary X-headers * Modify existing headers * Remove attachments based on filename or content-type * Replace attachments based on filename ok jasper@
39 lines
1.4 KiB
Plaintext
39 lines
1.4 KiB
Plaintext
$OpenBSD: patch-mime_alter_c,v 1.1.1.1 2012/05/30 16:47:01 ajacoutot Exp $
|
|
|
|
http://bugs.debian.org/625307
|
|
|
|
--- mime_alter.c.orig Sun Nov 16 09:45:45 2008
|
|
+++ mime_alter.c Wed May 30 15:44:10 2012
|
|
@@ -2432,7 +2432,6 @@ int AM_add_disclaimer( char *mpackname )
|
|
char mpackold[AM_1K_BUFFER_SIZE+1]="";
|
|
struct AM_disclaimer_details dd;
|
|
int result = 0;
|
|
- int segment_read = 0;
|
|
|
|
/* create our temp filename */
|
|
snprintf(mpacktmp,AM_1K_BUFFER_SIZE, "%s.tmp",mpackname);
|
|
@@ -2623,7 +2622,6 @@ int AM_add_disclaimer( char *mpackname )
|
|
*/
|
|
|
|
|
|
- segment_read = 0;
|
|
if (FFGET_feof(&f)) break;
|
|
|
|
// If we've found a boundary and a text content section...
|
|
@@ -3698,7 +3696,6 @@ Changes:
|
|
int AM_attachment_replace_recurse( struct MIMEH_header_info *hinfo, FFGET_FILE *f, FILE *outputfile, regex_t *preg, char *new_attachment_name, int iteration )
|
|
{
|
|
int result = 0;
|
|
- int boundary_exists=0;
|
|
size_t bc;
|
|
|
|
if (AM_DNORMAL) LOGGER_log("%s:%d:AM_attachment_replace_recurse:DEBUG: Starting: iteration=%d",FL, iteration );
|
|
@@ -3776,7 +3773,6 @@ int AM_attachment_replace_recurse( struct MIMEH_header
|
|
{
|
|
if (AM_DNORMAL)LOGGER_log("%s:%d:AM_attachment_replace_recurse:DEBUG: pushing BS='%s'",FL, hinfo->boundary );
|
|
BS_push( hinfo->boundary );
|
|
- boundary_exists = 1;
|
|
}
|
|
|
|
// Now, determine if this block/segment is the one which contains our file which we must 'nullify'
|