{
MegaBrutal's SMTP Server (MgSMTP)
- Copyright (C) 2010-2015 MegaBrutal
+ Copyright (C) 2010-2018 MegaBrutal
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
begin
MXList:= GetCorrectMXRecordList(RelayServerName);
if MXList.Count >= 1 then begin
- TCP:= TTCPRFCConnection.Create(MXList.Strings[0], RelayServerPort);
+ TCP:= TTCPRFCConnection.Create;
+ TCP.SetBindAddress(MainServerConfig.BindAddress);
+ TCP.Connect(MXList.Strings[0], RelayServerPort);
TCP.SetSockTimeOut(DEF_SOCK_TIMEOUT);
i:= 1;
while (not TCP.Connected) and (i < MXList.Count) do begin
procedure ProcessRCPTResponse;
begin
TCP.ReadResponse(Response);
- { If we get an "OK" reply code, we increase the count of sucessful
+ { If we get an "OK" reply code, we increase the count of successful
recipients. }
if Response.GetNumericCode = SMTP_R_OK then Inc(c)
{ Response code 0 is non-existent in the SMTP protocol.