diff --git a/exec/newslink.js b/exec/newslink.js index ac2daa149fe17a2387840e9711cc35bb07332215..dddb24ba5866114feb5cb1078be5bc500249a183 100644 --- a/exec/newslink.js +++ b/exec/newslink.js @@ -232,6 +232,7 @@ for(i in area) { body = msgbase.get_msg_body(false, ptr ,true /* remove ctrl-a codes */ + ,true /* rfc822 formatted text */ ,true /* include tails */); if(body == null) { printf("!FAILED to read message number %ld",ptr); @@ -262,20 +263,15 @@ for(i in area) { ,hdr.from ,antispam,hdr.from_net_addr)); else - writeln(format("From: \"%s\" <%s%s@%s%s>" + writeln(format("From: \"%s\" <%s@%s%s>" ,hdr.from - ,antispam,hdr.from + ,hdr.from.replace(/ /g,"_") ,antispam,hdr.from_net_addr)); } - else if(hdr.from.indexOf(' ')>0) - writeln(format("From: \"%s\" <\"%s%s\"@%s%s>" - ,hdr.from - ,antispam,hdr.from - ,antispam,system.inetaddr)); else - writeln(format("From: \"%s\" <%s%s@%s%s>" + writeln(format("From: \"%s\" <%s@%s%s>" ,hdr.from - ,antispam,hdr.from + ,hdr.from.replace(/ /g,"_") ,antispam,system.inetaddr)); writeln("To: " + hdr.to); writeln("X-Comment-To: " + hdr.to); diff --git a/exec/nntpservice.js b/exec/nntpservice.js index 742593f88057c846f1a89350890060835b208206..fcd2a774588a277748979886e64779f57264dd61 100644 --- a/exec/nntpservice.js +++ b/exec/nntpservice.js @@ -296,7 +296,8 @@ while(client.socket.is_connected) { hdr=msgbase.get_msg_header(false,current_article); if(cmd[0].toUpperCase()!="HEAD") body=msgbase.get_msg_body(false,current_article - ,true /* remove ctrl-a codes */); + ,true /* remove ctrl-a codes */ + ,true /* rfc822 formatted text */); /* Eliminate dupe loops if(user.security.restrictions&UFLAG_Q && hdr!=null)