aboutsummaryrefslogtreecommitdiffstats
path: root/etrn.c
Commit message (Collapse)AuthorAgeFilesLines
* Enforce minimum recommended SMTP timeouts, apply to EHLO/LHLO as well.Matthias Andree2009-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | Short timeouts could cause fetchmail to not wait long enough for the "250 Ok" after shipping a long message, particularly with synchronous mailers and extensive spam filtering. This caused fetchmail to re-fetch long messages. While the actual fix is making sure that the timeout is no shorter than the time the SMTP server takes to process the message, we now enforce the minimum RFC-5321 recommended timeouts even if the user configures a lower timeout. This is to fix Berlios Bug #10972, reported by Viktor Binzberger. NOTE: it is untested whether we will properly delete the m
#!/usr/bin/perl

BEGIN { $SIG{'__WARN__'} = sub {};};

$hostname = "criens.u-psud.fr";
$username = "p99dreyf";
$passwd = "xxxxxxxx";
$command = "exec ~/bin/imapd";

use Net::Telnet ();
$host = new Net::Telnet (Timeout => 10,
                         Port => 23,
                         Prompt => '/p99dreyf>\s?$/',
                         Cmd_remove_mode => 1);

$host->option_accept(Dont => &Net::Telnet::TELOPT_ECHO,
                     Wont => &Net::Telnet::TELOPT_ECHO);
                     open (FILE,">log");
$host->dump_log("log2");
$host->input_log("log3");
## Issue some commands.
$host->open($hostname);
#$host->login($username, $passwd);
$host->waitfor('/login:\s?$/');
$host->print("$username");
$host->waitfor('/Password:\s?$/');
$host->print("$passwd");
$host->waitfor('/p99dreyf>\s?$/');

$host->print("$command");
$strip=1;
while ($strip) {
        $greeting=$host->getline();
   if ($greeting=~/^\* PREAUTH.*$/) { print "$greeting"; $strip=0;};
}
    do {
      do {
        $cmd=<STDIN>;
        chop $cmd;
      } while ($cmd !~/[A-Za-z0-9]/);
      $host->print("$cmd");
      print FILE ">>$cmd<<\n";
      do {
        $line=$host->getline();
        chop($line);
        print "$line\n";
        print FILE "<<$line<<\n";
      } while (($line!~/^[A-Za-z0-9]+ (OK|BAD|Expunge).*$/) &&
                ($line!~/^\* BAD.*$/));
      print FILE "--next cmd\n";
    } while ($line!~/^[A-Za-z0-9]+ OK LOGOUT.*$/);

exit;
e='1999-02-01 22:27:17 +0000'>1999-02-011-10/+10 | | | | svn path=/trunk/; revision=2369 * error -> report, third stage.Eric S. Raymond1999-01-051-5/+5 | | | | svn path=/trunk/; revision=2330 * Progress messages now go to stdout.Eric S. Raymond1999-01-051-10/+10 | | | | svn path=/trunk/; revision=2328 * First step towards splitting error from progress messages.Eric S. Raymond1999-01-051-3/+3 | | | | svn path=/trunk/; revision=2326 * ID ourselves correctly in ETRN mode.Eric S. Raymond1998-12-141-1/+1 | | | | svn path=/trunk/; revision=2271 * Fix copyrights.Eric S. Raymond1998-12-041-2/+0 | | | | svn path=/trunk/; revision=2260 * Fix ETRN messages.Eric S. Raymond1998-12-011-3/+6 | | | | svn path=/trunk/; revision=2248 * Internationalization support via GNU gettext().Eric S. Raymond1998-11-261-14/+17 | | | | svn path=/trunk/; revision=2208 * Jonathan T. Agnew's massive code cleanup.Eric S. Raymond1998-10-261-1/+1 | | | | svn path=/trunk/; revision=2137 * Incorporated Henrik Storner's mimedecode patch.Eric S. Raymond1998-03-241-3/+4 | | | | svn path=/trunk/; revision=1719 * Fix IMAP password shrouding.Eric S. Raymond1998-03-181-0/+1 | | | | svn path=/trunk/; revision=1712 * MSGBUFSIZE everywhere.Eric S. Raymond1998-02-261-1/+1 | | | | svn path=/trunk/; revision=1678 * Alll of Craig Metz's changes for IPv6 and IPSEC except the POP3 stuff.Eric S. Raymond1998-02-161-0/+4 | | | | svn path=/trunk/; revision=1630 * Sent this to Gunther Leber.Eric S. Raymond1997-11-281-44/+43 | | | | svn path=/trunk/; revision=1541 * -Wall cleanup.Eric S. Raymond1997-10-101-3/+1 | | | | svn path=/trunk/; revision=1497 * Enable conditioning out of POP3, IMAP, ETRN.Eric S. Raymond1997-10-041-0/+2 | | | | svn path=/trunk/; revision=1477 * Smart re-polling support.Eric S. Raymond1997-09-301-0/+1 | | | | svn path=/trunk/; revision=1437 * Added --expunge option for Richard Kooidjman.Eric S. Raymond1997-09-281-1/+7 | | | | svn path=/trunk/; revision=1430 * Make the X-IMAP check independent of protocol.Eric S. Raymond1997-09-231-1/+0 | | | | svn path=/trunk/; revision=1395 * Compilation cleanups.Eric S. Raymond1997-09-191-0/+1 | | | | svn path=/trunk/; revision=1374 * improved ETRN handling.Eric S. Raymond1997-09-161-89/+46 | | | | svn path=/trunk/; revision=1358 * Clean up the error status.Eric S. Raymond1997-09-161-1/+7 | | | | svn path=/trunk/; revision=1357 * Simplify the length handling.Eric S. Raymond1997-09-141-1/+0 | | | | svn path=/trunk/; revision=1339 * Deal with X-IMAP header properly.Eric S. Raymond1997-08-071-0/+1 | | | | svn path=/trunk/; revision=1244 * Break the pollname out of the names list.Eric S. Raymond1997-07-301-3/+3 | | | | svn path=/trunk/; revision=1207 * Guenther Leber's error changes.Eric S. Raymond1997-07-081-2/+4 | | | | svn path=/trunk/; revision=1157 * Eliminate a GETHOSTBYNAME dependency.Eric S. Raymond1997-07-011-6/+1 | | | | svn path=/trunk/; revision=1134 * Some configuration cleanup.Eric S. Raymond1997-07-011-0/+5 | | | | svn path=/trunk/; revision=1133 * RSK pointed out a SunOS4.1.4 port bug.Eric S. Raymond1997-06-261-1/+2 | | | | svn path=/trunk/; revision=1122