end;
Result:= true;
end
- else AdministerMassFailure(Result);
+ else if (Response.GetNumericCode >= 500) and (Response.GetNumericCode <= 504) then begin
+ { It seems the remote site did not understand our EHLO, that is,
+ let's admit, quite odd in the 21st century...
+ Whatever, let's fall back to RFC 821 then. }
+ TCP.SendCommand(SMTP_C_HELO, MainServerConfig.Name);
+ TCP.ReadResponse(Response);
+ Result:= Response.GetNumericCode = SMTP_R_OK;
+ end;
if Result then begin
if FRoutingTarget.Auth then begin
else Authenticated:= true;
if not Authenticated then AdministerMassFailure(Result);
- end;
+ end
+ else AdministerMassFailure(Result);
end
else AdministerMassFailure(Result);
function TRelayer.DeliverMessagePart(Chunk: TStrings): boolean;
{ Sends a chunk of the message. }
+var i: integer;
begin
+ { Check for lines starting with dots. }
+ for i:= 0 to Chunk.Count - 1 do
+ if (Length(Chunk.Strings[i]) > 0) and (Chunk.Strings[i][1] = '.') then
+ Chunk.Strings[i]:= '.' + Chunk.Strings[i];
+
+ { Send text. }
Result:= TCP.WriteBuffer(PChar(Chunk.Text), Length(Chunk.Text)) <> -1;
end;