[Commits] [SCM] claws branch, master, updated. 3.14.0-94-ge070e40

claws at claws-mail.org claws at claws-mail.org
Mon Sep 26 11:59:49 CEST 2016


The branch, master has been updated
       via  e070e40476000c39f65ab00bb7071ab95b3d4869 (commit)
      from  244b9cae9f63616168222e9adfa32f26e5388001 (commit)

Summary of changes:
 manual/advanced.xml |   14 ++++++++++++++
 src/compose.c       |    2 +-
 src/prefs_common.c  |    2 ++
 src/prefs_common.h  |    1 +
 4 files changed, 18 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit e070e40476000c39f65ab00bb7071ab95b3d4869
Author: Paul <paul at claws-mail.org>
Date:   Mon Sep 26 10:59:43 2016 +0100

    add hidden pref 'reqrite_first_from'
    
    '0' or '1'. This works around a limitation of some servers with
    'overly-liberal parsers'. When this is turned on and the Content-
    Transfer-Encoding is set to 8bit or 7bit, in a message body starting
    with 'From ' the 'From ' will become '=46rom ' and the
    Content-Transfer-Encoding will be changed to Quoted-Printable. When it
    is turned off no such modification will be made but it is very likely
    that an MTA will convert the 'From ' to '>From '. See RFC 4155 for
    further details. Default value is '1', turned on.

diff --git a/manual/advanced.xml b/manual/advanced.xml
index 12c12a0..9c4b056 100644
--- a/manual/advanced.xml
+++ b/manual/advanced.xml
@@ -806,6 +806,20 @@
 	</listitem>
       </varlistentry>
       <varlistentry>
+	<term><literal>rewrite_first_from</literal></term>
+	<listitem>
+	  <para>
+    '0' or '1'. This works around a limitation of some servers with
+    'overly-liberal parsers'. When this is turned on and the Content-
+    Transfer-Encoding is set to 8bit or 7bit, in a message body starting with
+    'From ' the 'From ' will become '=46rom ' and the Content-Transfer-Encoding
+    will be changed to Quoted-Printable. When it is turned off no such modification
+    will be made but it is very likely that an MTA will convert the 'From ' to
+    '>From '. See RFC 4155 for further details. Default value is '1', turned on.
+	  </para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
 	<term><literal>save_parts_readwrite</literal></term>
 	<listitem>
 	  <para>
diff --git a/src/compose.c b/src/compose.c
index d216a4b..b05006b 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -5653,7 +5653,7 @@ static gint compose_write_to_file(Compose *compose, FILE *fp, gint action, gbool
 	}
 	g_free(chars);
 
-	if (encoding == ENC_8BIT || encoding == ENC_7BIT) {
+	if (prefs_common.rewrite_first_from && (encoding == ENC_8BIT || encoding == ENC_7BIT)) {
 		if (!strncmp(buf, "From ", sizeof("From ")-1) ||
 		    strstr(buf, "\nFrom ") != NULL) {
 			encoding = ENC_QUOTED_PRINTABLE;
diff --git a/src/prefs_common.c b/src/prefs_common.c
index 39d9a0b..feeb956 100644
--- a/src/prefs_common.c
+++ b/src/prefs_common.c
@@ -199,6 +199,8 @@ static PrefParam param[] = {
 	 NULL, NULL, NULL},
 	{"outgoing_fallback_to_ascii", "TRUE", &prefs_common.outgoing_fallback_to_ascii, P_BOOL,
 	 NULL, NULL, NULL},
+	 {"rewrite_first_from", "TRUE", &prefs_common.rewrite_first_from,
+	  P_BOOL, NULL, NULL, NULL},
 	{"warn_empty_subj", "TRUE", &prefs_common.warn_empty_subj,
 	 P_BOOL, NULL, NULL, NULL},
 	{"hide_timezone", "FALSE", &prefs_common.hide_timezone,
diff --git a/src/prefs_common.h b/src/prefs_common.h
index d3d9fa9..2c56b4d 100644
--- a/src/prefs_common.h
+++ b/src/prefs_common.h
@@ -142,6 +142,7 @@ struct _PrefsCommon
 	gchar *outgoing_charset;
 	TransferEncodingMethod encoding_method;
 	gboolean outgoing_fallback_to_ascii;
+	gboolean rewrite_first_from;
 	gboolean warn_empty_subj;
 	gboolean hide_timezone;
 	gboolean allow_jisx0201_kana;

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list