<<< Date Index >>>     <<< Thread Index >>>

Re: S/MIME problem with messages from German Netscape



Hello,

* Bernhard Walle <Bernhard.Walle@xxxxxx> [2004-08-16 17:47]:
> * Thomas Glanzmann <sithglan@xxxxxxxxxxxxxxxxxxxx> [2004-08-16 14:53]:
> > 
> > > So does that mean if I write a patch with this requirements that
> > > there's a chance that the patch will be applied? Who is responsible
> > > for applying patches?
> > 
> > I think the chances are very high. However we should wait what TLR says
> > to that.
> 
> the attached patch should work.

sorry, small mistake. Here's the better one.

Regards,
Bernhard

diff -Nur mutt-1.5.6.orig/crypt.c mutt-1.5.6/crypt.c
--- mutt-1.5.6.orig/crypt.c     2004-06-17 22:36:13.000000000 +0200
+++ mutt-1.5.6/crypt.c  2004-08-16 17:42:10.000000000 +0200
@@ -372,11 +372,17 @@
        else return 0;
       }
       /* Netscape 4.7 uses 
-       * Content-Description: S/MIME Encrypted Message
+       * Content-Description: "S/MIME Encrypted Message" (or localized 
message!)
        * instead of Content-Type parameter
        */
-      if (!ascii_strcasecmp (m->description, "S/MIME Encrypted Message"))
-       return SMIMEENCRYPT;
+      if (regcomp(SmimeContentDescription.rx, SmimeContentDescription.pattern, 
REG_NOSUB|REG_EXTENDED) == 0)
+      {
+        int ret = regexec( SmimeContentDescription.rx, m->description, 0, 
NULL, 0);
+        regfree(SmimeContentDescription.rx);
+
+        if (ret == 0)
+           return SMIMEENCRYPT;
+      }
       complain = 1;
     }
     else if (ascii_strcasecmp (m->subtype, "octet-stream"))
diff -Nur mutt-1.5.6.orig/doc/manual.sgml mutt-1.5.6/doc/manual.sgml
--- mutt-1.5.6.orig/doc/manual.sgml     2004-08-14 16:56:59.000000000 +0200
+++ mutt-1.5.6/doc/manual.sgml  2004-08-16 17:11:20.000000000 +0200
@@ -5623,6 +5623,14 @@
 SSL authentication process.
 
 
+<p>
+A regular expression how to recognize non-standard S/MIME encrypted messages.
+It is used to recognize messages sent by Netscape Messenger 4.x. The problem
+is that Netscape staff translated this string to different languages,
+so if you receive a mail from a Netscape user that runs a localized Netscape
+version, adjust this regular expression.
+
+
 <sect2>pipe&lowbar;split<label id="pipe_split">
 <p>
 Type: boolean<newline>
diff -Nur mutt-1.5.6.orig/doc/muttrc.man mutt-1.5.6/doc/muttrc.man
--- mutt-1.5.6.orig/doc/muttrc.man      2004-08-16 17:43:59.000000000 +0200
+++ mutt-1.5.6/doc/muttrc.man   2004-08-16 17:11:20.000000000 +0200
@@ -3319,6 +3319,14 @@
 SSL authentication process.
 
 
+.IP
+A regular expression how to recognize non-standard S/MIME encrypted messages.
+It is used to recognize messages sent by Netscape Messenger 4.x. The problem
+is that Netscape staff translated this string to different languages,
+so if you receive a mail from a Netscape user that runs a localized Netscape
+version, adjust this regular expression.
+
+
 .TP
 .B pipe_split
 .nf
diff -Nur mutt-1.5.6.orig/init.h mutt-1.5.6/init.h
--- mutt-1.5.6.orig/init.h      2004-07-19 23:44:23.000000000 +0200
+++ mutt-1.5.6/init.h   2004-08-16 16:59:44.000000000 +0200
@@ -1850,6 +1850,17 @@
   ** SSL authentication process.
   */
 #endif
+  { "smime_content_description", DT_RX,         R_NONE, UL 
&SmimeContentDescription, 
+                                    UL "S/MIME Encrypted Message" },
+  /*
+  ** .pp
+  ** A regular expression how to recognize non-standard S/MIME encrypted 
messages.
+  ** It is used to recognize messages sent by Netscape Messenger 4.x. The 
problem
+  ** is that Netscape staff translated this string to different languages,
+  ** so if you receive a mail from a Netscape user that runs a localized 
Netscape
+  ** version, adjust this regular expression.
+  **
+  */
 
   { "pipe_split",      DT_BOOL, R_NONE, OPTPIPESPLIT, 0 },
   /*
diff -Nur mutt-1.5.6.orig/mutt_regex.h mutt-1.5.6/mutt_regex.h
--- mutt-1.5.6.orig/mutt_regex.h        2004-02-01 18:10:43.000000000 +0100
+++ mutt-1.5.6/mutt_regex.h     2004-08-16 16:55:59.000000000 +0200
@@ -51,5 +51,6 @@
 WHERE REGEXP ReplyRegexp;
 WHERE REGEXP Smileys;
 WHERE REGEXP GecosMask;
+WHERE REGEXP SmimeContentDescription;
 
 #endif /* MUTT_REGEX_H */

Attachment: pgpHQzcbMAlbi.pgp
Description: PGP signature