Index: print.c =================================================================== RCS file: /CVS/hypermail/src/print.c,v retrieving revision 1.68 diff -u -r1.68 print.c --- print.c 3 Apr 2003 19:43:22 -0000 1.68 +++ print.c 24 Apr 2003 07:58:49 -0000 @@ -1439,12 +1439,12 @@ printcomment(fp, "isosent", secs_to_iso(email->date)); printcomment(fp, "name", email->name); printcomment(fp, "email", email->emailaddr); - printcomment(fp, "subject", ptr = convchars(email->subject)); + printcomment(fp, "subject", ptr = convcharsnospamprotect(email->subject)); if (ptr) free(ptr); printcomment(fp, "id", email->msgid); printcomment(fp, "charset", email->charset); - printcomment(fp, "inreplyto", ptr = convchars(email->inreplyto)); + printcomment(fp, "inreplyto", ptr = convcharsnospamprotect(email->inreplyto)); if (email->is_deleted) { char num_buf[32]; sprintf(num_buf, "%d", email->is_deleted); Index: proto.h =================================================================== RCS file: /CVS/hypermail/src/proto.h,v retrieving revision 1.20 diff -u -r1.20 proto.h --- proto.h 20 Mar 2003 18:22:30 -0000 1.20 +++ proto.h 24 Apr 2003 07:58:49 -0000 @@ -108,6 +108,7 @@ char *replace(char *, char *, char *); char *replacechar(char *, char, char *); char *convchars(char *); +char *convcharsnospamprotect(char *); char *unconvchars(char *); char *makemailcommand(char *, char *, char *, char *); char *unspamify(char *); Index: string.c =================================================================== RCS file: /CVS/hypermail/src/string.c,v retrieving revision 1.26 diff -u -r1.26 string.c --- string.c 20 Feb 2003 09:10:23 -0000 1.26 +++ string.c 24 Apr 2003 07:58:49 -0000 @@ -495,10 +495,11 @@ ** Returns an ALLOCATED string! */ -char *convchars(char *line) +char *convcharsreal(char *line, int spamprotect) { struct Push buff; int in_ascii = TRUE, esclen = 0; + int seen_at = FALSE; // pkn added INIT_PUSH(buff); /* init macro */ @@ -531,6 +532,18 @@ case '\"': PushString(&buff, """); break; + case '@': // pkn added: simple "antispam" measure + PushString(&buff, "@"); + seen_at = TRUE; + break; + case '.': // pkn added + if (seen_at && spamprotect) + { + PushString(&buff, "."); + seen_at = FALSE; + break; + } + // fall through default: PushByte(&buff, *line); } @@ -538,6 +551,15 @@ RETURN_PUSH(buff); } /* end convchars() */ +char *convcharsnospamprotect(char *line) +{ + convcharsreal(line, FALSE); +} +char *convchars(char *line) +{ + convcharsreal(line, TRUE); +} + /* ** Just the opposite of convchars(). ** Completely rewritten 17th Nov 1998 by Daniel. @@ -569,6 +591,10 @@ else if (!strncmp("#64;", line + 1, 4)) { PushByte(&buff, '@'); line += 4; + } + else if (!strncmp(".", line + 1, 18)) { + PushByte(&buff, '.'); + line += 18; } else PushByte(&buff, *line);