Print Page | Close Window

Lone CR in Signature

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Suggestions
Forum Description: Do you have any ideas for applications or content on Web Wiz? Then leave your suggestions here.
URL: https://forums.webwiz.net/forum_posts.asp?TID=28666
Printed Date: 28 March 2026 at 9:03am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Lone CR in Signature
Posted By: Find-Relation
Subject: Lone CR in Signature
Date Posted: 23 June 2010 at 11:40am
Hi Web Wiz Forums Developers
 
The last weeks this error has occured daily, when email notification is sent to users using mail-server fpo.mail.dk.
host fpo.mail.dk[80.160.76.237] said: 550 5.6.0 Lone CR
   or LF in body (see RFC2822 section 2.3) (in reply to end of DATA command)
 
Action: failed
Status: 5.6.0
Remote-MTA: dns; fpo.mail.dk
Diagnostic-Code: smtp; 550 5.6.0 Lone CR or LF in body (see RFC2822 section
   2.3)
 
This is probably the reason:
When a user has more than 1 line in the signature, the line-change is stored with these characters - chr(x):
chr(13)
< chr(60)
b chr(98)
r chr(114)
chr(32 )
/: chr(47)
>: 62
 
The same problem does'nt exist in a Thread-message, where the line-change correctly has a LF - chr(10) - just after chr(13).
 
Can you fix that problem in the next version, before other mail-servers get the same idea, and reject mails without LF (or CR).



Replies:
Posted By: Find-Relation
Date Posted: 23 June 2010 at 11:12pm
Originally posted by WebWiz-Bruce WebWiz-Bruce wrote:

This might be a bit difficult as the forum code does not put any Carriage Returns or Line Feeds into signatures. If there are any the these would be put in by the web browser when the person writes their signature and more than likely only certain browsers, so would need to know which browser.
Hi Bruce

Please check these code-lines:

register.asp:
strSignature = FormatPost(strSignature)
 
functions\functions_format_post.asp:
Private Function FormatPost(ByVal strMessage)
strMessage = Replace(strMessage, Chr(10), "<br />", 1, -1, 1)
 
You're right - the code does not put Carriage Returns or Line Feeds into signatures, but as you see, the code removes Chr(10) from the signature.
 
strMessage = Replace(strMessage, Chr(10), Chr(10) & "<br />", 1, -1, 1)
might be a better solution to prevent the mentioned error from the mail-server.
 
 

 


-------------
Regards Ole Dalsgaard Jensen


Posted By: WebWiz-Bruce
Date Posted: 24 June 2010 at 8:53am
Mail servers that reject emails due to a lone CR or LF was due to an Outlook vulnerability form over 5 years ago that was never exploited and was patched along time ago.

Mail servers rejecting emails based on lone CR and LF fell out of favour along time ago as it blocked quite a high percentage of legitimate emails as about 1 in very 50 emails have a lone CR or LF in the header.

I would recommend contacting the mail server admin and let them know they are preventing legitimate emails from coming through.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net