summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pico/search.c7
-rw-r--r--pith/pine.hlp9
-rw-r--r--pith/reply.c44
-rw-r--r--pith/reply.h1
4 files changed, 51 insertions, 10 deletions
diff --git a/pico/search.c b/pico/search.c
index 1aae21cf..5a1a1359 100644
--- a/pico/search.c
+++ b/pico/search.c
@@ -463,13 +463,13 @@ replace_pat(UCS *defpat, int *wrapt, int bsearch)
{
register int status;
UCS lpat[NPAT], origpat[NPAT]; /* case sensitive pattern */
- EXTRAKEYS menu_pat[2];
+ EXTRAKEYS menu_pat[10];
int repl_all = FALSE;
UCS *b;
char utf8tmp[NPMT];
UCS prompt[NPMT];
UCS *promptp;
- int flags;
+ int i, flags;
if(bsearch){
flags = SR_BACKWRD;
@@ -486,7 +486,8 @@ replace_pat(UCS *defpat, int *wrapt, int bsearch)
menu_pat[0].key = (CTRL|'X');
menu_pat[0].label = N_("Repl All");
KS_OSDATASET(&menu_pat[0], KS_NONE);
- menu_pat[1].name = NULL;
+ for (i = 1; i < 10; i++)
+ menu_pat[i].name = NULL;
while(1) {
diff --git a/pith/pine.hlp b/pith/pine.hlp
index 65adbef4..820c553a 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -224,6 +224,10 @@ Additions include:
<LI> Make sure titlebar (the line at the top of the screen) always
contains the name of the folder/newsgroup that is open, if this
fits in the title.
+ <LI> The feature <a href="h_config_scramble_message_id">FEATURE: <!--#echo var="FEAT_scramble-message-id"--></a>
+ will also scramble the name, version and operative system in the message-id header.
+ Based on a contribution by Dennis Davis, which is itself based on a contribution by
+ Mark Hills.
</UL>
@@ -28368,6 +28372,11 @@ The result will still have the correct syntax for a Message-ID but the
part of the MessageID that is often a domain name will not be an actual
domain name because the letters will be scrambled.
<P>
+In addition, other information such as the name program, version, and
+a code for operating system used to build Alpine, will be encoded using
+the Rot13 transformation, except for the version number which will be
+encoded using a Rot5 transformation.
+<P>
It is possible (but unlikely?) that some spam detection
software will use that as a reason to reject the mail as spam.
It has also been reported that some spam detection software uses the
diff --git a/pith/reply.c b/pith/reply.c
index 54223e68..f60ce58f 100644
--- a/pith/reply.c
+++ b/pith/reply.c
@@ -3217,6 +3217,9 @@ generate_message_id(void)
time_t now;
struct tm *now_x;
char *hostpart = NULL;
+ char *alpine_name = NULL;
+ char *alpine_version = NULL;
+ char *system_os = NULL;
now = time((time_t *)0);
now_x = localtime(&now);
@@ -3228,23 +3231,33 @@ generate_message_id(void)
osec = now_x->tm_sec;
}
- hostpart = F_ON(F_ROT13_MESSAGE_ID, ps_global)
- ? rot13(ps_global->hostname)
- : cpystr(ps_global->hostname);
+ if(F_ON(F_ROT13_MESSAGE_ID, ps_global)){
+ hostpart = rot13(ps_global->hostname);
+ alpine_name = rot13("alpine");
+ alpine_version = rot5n(ALPINE_VERSION);
+ system_os = rot13(SYSTYPE);
+ } else {
+ hostpart = cpystr(ps_global->hostname);
+ alpine_name = cpystr("alpine");
+ alpine_version = cpystr(ALPINE_VERSION);
+ system_os = cpystr(SYSTYPE);
+ }
if(!hostpart)
hostpart = cpystr("huh");
- snprintf(idbuf, sizeof(idbuf), "<alpine.%.4s.%.20s.%02d%02d%02d%02d%02d%02d%X.%d@%.50s>",
- SYSTYPE, ALPINE_VERSION, (now_x->tm_year) % 100, now_x->tm_mon + 1,
+ snprintf(idbuf, sizeof(idbuf), "<%.6s.%.4s.%.20s.%02d%02d%02d%02d%02d%02d%X.%d@%.50s>",
+ alpine_name, system_os, alpine_version, (now_x->tm_year) % 100, now_x->tm_mon + 1,
now_x->tm_mday, now_x->tm_hour, now_x->tm_min, now_x->tm_sec,
cnt, getpid(), hostpart);
idbuf[sizeof(idbuf)-1] = '\0';
id = cpystr(idbuf);
- if(hostpart)
- fs_give((void **) &hostpart);
+ if(hostpart) fs_give((void **) &hostpart);
+ if(alpine_name) fs_give((void **) & alpine_name);
+ if(alpine_version) fs_give((void **)&alpine_version);
+ if(system_os) fs_give((void **)&system_os);
return(id);
}
@@ -3290,6 +3303,23 @@ rot13(char *src)
return(ret);
}
+char *
+rot5n(char *src)
+{
+ char byte, *p, *ret = NULL;
+
+ if(src && *src){
+ ret = (char *) fs_get((strlen(src)+1) * sizeof(char));
+ p = ret;
+ while((byte = *src++) != '\0')
+ *p++ = ((byte >= '0') && (byte <= '9')
+ ? ((byte - '0' + 5) % 10 + '0') : byte);
+ *p = '\0';
+ }
+
+ return(ret);
+}
+
/*----------------------------------------------------------------------
Return the first true address pointer (modulo group syntax allowance)
diff --git a/pith/reply.h b/pith/reply.h
index 315f81c7..9809dfdb 100644
--- a/pith/reply.h
+++ b/pith/reply.h
@@ -95,6 +95,7 @@ char *reply_in_reply_to(ENVELOPE *);
char *generate_message_id(void);
char *generate_user_agent(void);
char *rot13(char *);
+char *rot5n(char *);
ADDRESS *first_addr(ADDRESS *);
char *get_signature_lit(char *, int, int, int, int);
int sigdashes_are_present(char *);