here's the setup:
# the script is running as a SERVICE on port 25, and i launched it from the terminal so i can see its echos (so i know what it's doing)
# the firewall is open to the internet
# i telnet into the public ip on port 25 via "telnet example.com 25", using another open terminal, and i can do a full smtp session, and view output in the client side, and view server side echos in the server's terminal
# i use "sendmail -t user@example.com <n>blah blah!<n>.<n>" and sendmail seems to accept it, but the server side terminal does not respond in any way
# i use gmail to send an email, and the server side terminal has no output
so, i'm stumped as to why it APPEARS that mail transfer agents are not reaching my smtp service, and yet its just fine with telnet. it would output SOMETHING to show at least a connection was made, but i get nothing.
here's a snippet of my code:
- Code: Select all
<?// if ($socket = socket_create_listen(25)){
if ($socket = socket_create(AF_INET , SOCK_STREAM , SOL_TCP)){
//socket_set_option($socket , SOL_SOCKET , SO_REUSEADDR , 1);
echo "TCP Socket Created\n";
if (socket_bind($socket , '0.0.0.0' , 25)){
echo "TCP Socket Bound\n";
socket_listen($socket);
//socket_set_nonblock($socket);
while(true){
if($connection = socket_accept($socket)){
echo "\n================================BEGIN================================\n";
...
}
}
}else{
echo "tcp Socket Failed to bind\n";
}
}else{
echo "tcp Socket Failed to Create\n";
}
thanks in advance

