#include "smtp_clienthandlers.h"
int SMTPClientDebugEnabled = 0;
-const unsigned short DefaultMXPort = 25;
void DeleteSmtpOutMsg(void *v)
{
SmtpOutMsg *Msg = v;
SmtpOutMsg *Msg = IO->Data;
struct hostent *hostent;
+ IO->ConnectMe = Msg->pCurrRelay;
+
QueryCbDone(IO);
EVS_syslog(LOG_DEBUG, "%s Time[%fs]\n",
__FUNCTION__,
Msg->pCurrRelay->Addr.sin6_family =
hostent->h_addrtype;
Msg->pCurrRelay->Addr.sin6_port =
- htons(DefaultMXPort);
+ htons(Msg->IO.ConnectMe->Port);
}
else {
struct sockaddr_in *addr;
sizeof(uint32_t));
addr->sin_family = hostent->h_addrtype;
- addr->sin_port = htons(DefaultMXPort);
+ addr->sin_port = htons(Msg->IO.ConnectMe->Port);
}
Msg->mx_host = Msg->pCurrRelay->Host;
if (Msg->HostLookup.VParsedDNSReply != NULL) {
pthread_mutex_t ActiveQItemsLock;
HashList *ActiveQItems = NULL;
HashList *QItemHandlers = NULL;
+const unsigned short DefaultMXPort = 25;
int max_sessions_for_outbound_smtp = 500; /* how many sessions might be active till we stop adding more smtp jobs */
int ndelay_count = 50; /* every n queued messages we will sleep... */
int delay_msec = 5000; /* this many seconds. */
!IsEmptyStr(Pos)))
{
StrBufExtract_NextToken(One, All, &Pos, '|');
- if (!ParseURL(Url, One, 25)) {
+ if (!ParseURL(Url, One, DefaultMXPort)) {
SMTPC_syslog(LOG_DEBUG,
"Failed to parse: %s\n",
ChrPtr(One));
!IsEmptyStr(Pos)))
{
StrBufExtract_NextToken(One, All, &Pos, '|');
- if (!ParseURL(Url, One, 25)) {
+ if (!ParseURL(Url, One, DefaultMXPort)) {
SMTPC_syslog(LOG_DEBUG,
"Failed to parse: %s\n",
ChrPtr(One));