From: "Nathan Cassano" <nathan@cjhunter.com>
To: netfilter@lists.samba.org
Subject: TCP delay, SMTP errors
Date: Mon, 10 Jun 2002 13:45:50 -0700 [thread overview]
Message-ID: <001601c210bf$d1a5fef0$2901a8c0@amos> (raw)
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
next reply other threads:[~2002-06-10 20:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-10 20:45 Nathan Cassano [this message]
2002-06-10 22:18 ` TCP delay, SMTP errors 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001601c210bf$d1a5fef0$2901a8c0@amos' \
--to=nathan@cjhunter.com \
--cc=netfilter@lists.samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox