projects
/
mgsmtp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed non-RFC-compliant handling of lines starting with dots
[mgsmtp.git]
/
Listener.pas
diff --git
a/Listener.pas
b/Listener.pas
index a4d94f0516b36344c8ea6b80b89a235a5fdede93..b37662b15302704304dfaa0ad059ea99ab4337ec 100644
(file)
--- a/
Listener.pas
+++ b/
Listener.pas
@@
-507,8
+507,11
@@
begin
Done:= false;
repeat
ReadOK:= TCP.ReadLn(Line);
Done:= false;
repeat
ReadOK:= TCP.ReadLn(Line);
- if Line <> '.' then
- SpoolObject.DeliverMessagePart(Line)
+ if Line <> '.' then begin
+ { If the line starts with a dot, remove it to comply with RFC. }
+ if (Length(Line) > 1) and (Line[1] = '.') then Delete(Line, 1, 1);
+ SpoolObject.DeliverMessagePart(Line);
+ end
else
Done:= true;
until Done or (not ReadOK);
else
Done:= true;
until Done or (not ReadOK);