Added charset logging

This commit is contained in:
Michiel Broek 2005-08-13 14:21:23 +00:00
parent 1cee18e1ea
commit 98d22d5544

View File

@ -202,6 +202,10 @@ int rfc2ftn(FILE *fp, faddr *recipient)
removereturnto = TRUE; removereturnto = TRUE;
ftnorigin = fmsg->ftnorigin; ftnorigin = fmsg->ftnorigin;
Syslog('m', "removemime=%s removemsgid=%s removeref=%s removeinreply=%s removereplyto=%s removereturnto=%s",
removemime ?"TRUE ":"FALSE", removemsgid ?"TRUE ":"FALSE", removeref ?"TRUE ":"FALSE",
removeinreply ?"TRUE ":"FALSE", removereplyto ?"TRUE ":"FALSE", removereturnto ?"TRUE ":"FALSE");
q = hdr((char *)"Content-Transfer-Encoding",msg); q = hdr((char *)"Content-Transfer-Encoding",msg);
if (q) if (q)
while (*q && isspace(*q)) while (*q && isspace(*q))
@ -220,20 +224,17 @@ int rfc2ftn(FILE *fp, faddr *recipient)
if ((strncasecmp(p, "text/plain", 10) == 0) && ((q == NULL) || if ((strncasecmp(p, "text/plain", 10) == 0) && ((q == NULL) ||
(strncasecmp(q,"7bit",4) == 0) || (strncasecmp(q,"8bit",4) == 0))) { (strncasecmp(q,"7bit",4) == 0) || (strncasecmp(q,"8bit",4) == 0))) {
removemime = TRUE; /* no need in MIME headers */ removemime = TRUE; /* no need in MIME headers */
Syslog('m', "removemime=%s", removemime ? "True":"False");
} }
p++; q = strtok(p, " \n\0");
while (*p && isspace(*p)) q = strtok(NULL, " \n\0");
p++; Syslog('m', "charset part: %s", printable(q, 0));
Syslog('m', "charset part: %s", printable(p, 0));
} }
if ((p = hdr((char *)"Message-ID",msg))) { if ((p = hdr((char *)"Message-ID",msg))) {
if (!removemsgid) if (!removemsgid)
removemsgid = chkftnmsgid(p); removemsgid = chkftnmsgid(p);
} }
Syslog('m', "removemsgid = %s", removemsgid ? "True":"False");
if ((!removeref) && (p = hdr((char *)"References",msg))) { if ((!removeref) && (p = hdr((char *)"References",msg))) {
p = xstrcpy(p); p = xstrcpy(p);
@ -242,8 +243,6 @@ int rfc2ftn(FILE *fp, faddr *recipient)
removeref = chkftnmsgid(q); removeref = chkftnmsgid(q);
free(p); free(p);
} }
if (removeref)
Syslog('m', "removeref = %s", removeref ? "True":"False");
if ((p = hdr((char *)"Reply-To",msg))) { if ((p = hdr((char *)"Reply-To",msg))) {
removereplyto = FALSE; removereplyto = FALSE;
@ -259,7 +258,6 @@ int rfc2ftn(FILE *fp, faddr *recipient)
removereplyto = TRUE; removereplyto = TRUE;
} }
} }
Syslog('m', "removereplyto = %s", removereplyto ? "True":"False");
if ((p = hdr((char *)"Return-Receipt-To",msg))) { if ((p = hdr((char *)"Return-Receipt-To",msg))) {
removereturnto = FALSE; removereturnto = FALSE;
@ -276,8 +274,10 @@ int rfc2ftn(FILE *fp, faddr *recipient)
removereturnto = TRUE; removereturnto = TRUE;
} }
} }
if (!removereturnto)
Syslog('m', "removereturnto = %s", removereturnto ? "True":"False"); Syslog('m', "removemime=%s removemsgid=%s removeref=%s removeinreply=%s removereplyto=%s removereturnto=%s",
removemime ?"TRUE ":"FALSE", removemsgid ?"TRUE ":"FALSE", removeref ?"TRUE ":"FALSE",
removeinreply ?"TRUE ":"FALSE", removereplyto ?"TRUE ":"FALSE", removereturnto ?"TRUE ":"FALSE");
p = ascfnode(fmsg->from,0x1f); p = ascfnode(fmsg->from,0x1f);
i = 79-11-3-strlen(p); i = 79-11-3-strlen(p);