All of lore.kernel.org
 help / color / mirror / Atom feed
* TCP delay, SMTP errors
@ 2002-06-10 20:45 Nathan Cassano
  2002-06-10 22:18 ` Ramin Alidousti
  2002-06-10 22:35 ` Doug Monroe
  0 siblings, 2 replies; 7+ messages in thread
From: Nathan Cassano @ 2002-06-10 20:45 UTC (permalink / raw)
  To: netfilter


Hi folks,
	Our website (on an internal NAT'ed network) connects our email
server (on an external network). The website uses a SMTP PHP class to
send mail using socket connections. The problem is a delay in connecting
to the mail server that causes the class to quit prematurely. I fixed
the problem by adding a function call to sleep(1) after fsockopen() but
this is a hack. Is there a better way to fix this TCP delay? I tried
setting the TOS value to Minimize-Delay but I didn't see any difference.
Any suggestions are welcome. 

Nathan

PHP script 
<?php

$this->connection = fsockopen("mail.server.tld", 25, $errno, $errstr,
30);

socket_set_timeout($this->connection, 10, 0);

$smtp_greeting = fgets($this->connection, 512);

?>

$IPTABLES -A OUTPUT -t mangle -p tcp --dport 25 -j TOS --set-tos
Minimize-Delay



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-06-11 22:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-10 20:45 TCP delay, SMTP errors Nathan Cassano
2002-06-10 22:18 ` Ramin Alidousti
2002-06-10 22:35 ` Doug Monroe
2002-06-11 10:41   ` Simon A. Boggis
2002-06-11 15:54   ` Nathan Cassano
2002-06-11 17:34     ` Ramin Alidousti
2002-06-11 22:00       ` TCP delay Nathan Cassano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.