This is a patch set to files in the src directory of hypermail 2.1.5.
It must be applied AFTER configure has been done. The reason being that one of the files patched in defaults.h I'm not sure how to patch the defaults.h.in file in the best way.
What this does is make the "_at_" antispam bit configurable by config file, using
antispam_at = __somestring__ (does not have to have __ in it)
Anything hardcoded by default, can be figured out and used by spammers. Particularly something like "_at_".
#define DOMAINADDR "NONE"
+#define ANTISPAM_AT "_at_"
+
#endif
--- getname.c.orig 2002-11-22 20:50:47.982702000 -0800 +++ getname.c 2002-11-22 22:04:06.212713000 -0800
char *spamify(char *input)
{
+ int insertlen=strlen(set_antispam_at);
/* we should replace the _at_-letter in the email
address */
- int newlen=strlen(input)+4;
+ int newlen=strlen(input)+insertlen;
char *atptr=strchr(input, '_at_');
if(atptr) {
char *newbuf = malloc(newlen); int index=atptr-input; /* copy the part before the _at_ */ memcpy(newbuf, input, index);
/* append the part after the _at_ */ - strcpy(newbuf+index+4, input+index+1); + strcpy(newbuf+index+insertlen, input+index+1);
/* correct the pointer and free the old */ free(input); return newbuf; --- print.c.orig 2002-11-22 20:50:47.992702000 -0800 +++ print.c 2002-11-22 20:52:38.682737000 -0800
_at_@ -583,7 +583,7 @@
struct Push retbuf; INIT_PUSH(retbuf); PushNString(&retbuf, value, ptr - value); - PushNString(&retbuf, "_at_", 4); + PushNString(&retbuf, set_antispam_at, strlen(set_antispam_at)); PushString(&retbuf, ptr + 1); ext_value = PUSH_STRING(retbuf); } --- setup.c.orig 2002-11-22 20:37:56.792702000 -0800 +++ setup.c 2002-11-22 20:50:00.192711000 -0800
+char *set_antispam_at; char *set_language; char *set_htmlsuffix; char *set_mbox;
struct Config cfg[] = {
+ {"antispam_at", &set_antispam_at, ANTISPAM_AT, CFG_STRING, + "# replace any _at_ sign with this string, if spam flags enabled\n"}, + {"language", &set_language, LANGUAGE, CFG_STRING, "# A two-letter string specifying the language to use!\n" "# For example 'en' for English\n"}, --- setup.h.orig 2002-11-22 20:49:12.122702000 -0800 +++ setup.h 2002-11-22 20:49:24.812704000 -0800
+extern char *set_antispam_at; extern char *set_language; extern char *set_htmlsuffix; extern char *set_mbox; --- string.c.orig 2002-11-22 20:50:48.002702000 -0800 +++ string.c 2002-11-22 22:04:29.472704000 -0800
_at_@ -773,12 +773,12 @@
char *p; if (!s) return s;
struct Push buff; INIT_PUSH(buff); PushNString(&buff, s, p - s); PushByte(&buff, '_at_'); - PushString(&buff, p + 4); + PushString(&buff, p + strlen(set_antispam_at)); return PUSH_STRING(buff); } return strsav(s);Received on Mon 25 Nov 2002 02:15:13 AM GMT
_at_@ -816,7 +816,7 @@
int in_ascii = TRUE, esclen = 0; if(set_spamprotect) - at="_at_"; + at=set_antispam_at; else at="_at_";
This archive was generated by hypermail 2.2.0 : Thu 22 Feb 2007 07:33:54 PM GMT GMT