ETRN Release Queue Command

New ideas and constructive comments go here.

Moderator: Moderators

Post Reply
deathrock
Posts: 4
Joined: Thu Mar 17, 2005 11:59 am

ETRN Release Queue Command

Post by deathrock »

Hi,

I have a mail server who doesn't support ETRN command, I've made this script for anyone

I ran it every hout with CronJob.

Code: Select all

<?
$domain = "deathrocknet.org";
?>

<?php
$fp = fsockopen("mail.rollernet.us", 2525, $errno, $errstr, 30);
if (!$fp) {
   echo "$errstr ($errno)<br />\n";
} else {
   $out = "ETRN $domain \n";
   fwrite($fp, $out);
   echo "<BR>";
   echo fgets($fp, 1024);
   $out = "QUIT \n";
   fwrite($fp, $out);
   echo "<BR>";
   echo fgets($fp, 1024);  
   $out = "\n";
   fwrite($fp, $out);
   echo "<BR>";
   echo fgets($fp, 1024);   
   fclose($fp);
}
?> 
<BR>

<?php
$fp = fsockopen("mail2.rollernet.us", 2525, $errno, $errstr, 30);
if (!$fp) {
   echo "$errstr ($errno)<br />\n";
} else {
   $out = "ETRN $domain \n";
   fwrite($fp, $out);
   echo "<BR>";
   echo fgets($fp, 1024);
   $out = "QUIT \n";
   fwrite($fp, $out);
   echo "<BR>";
   echo fgets($fp, 1024);  
   $out = "\n";
   fwrite($fp, $out);
   echo "<BR>";
   echo fgets($fp, 1024);   
   fclose($fp);
}
?> 
Post Reply