aboutsummaryrefslogtreecommitdiffstats
path: root/dist-tools/getstats.py
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2011-09-06 21:08:16 +0200
committerMatthias Andree <matthias.andree@gmx.de>2011-09-06 21:08:16 +0200
commitc73bada9f61c0fa184c191a0bfaca17e0e2356dd (patch)
tree3fc2686b9a03c6879b1649ff05dc94764a87d282 /dist-tools/getstats.py
parent488465a3c28c70c04e09064ad93d7bba5a5a8f2f (diff)
downloadfetchmail-c73bada9f61c0fa184c191a0bfaca17e0e2356dd.tar.gz
fetchmail-c73bada9f61c0fa184c191a0bfaca17e0e2356dd.tar.bz2
fetchmail-c73bada9f61c0fa184c191a0bfaca17e0e2356dd.zip
Add items.
Diffstat (limited to 'dist-tools/getstats.py')
0 files changed, 0 insertions, 0 deletions
lic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/usr/bin/perl
# Copyright 2000 john Summerfield ,summer@os2.ami.com.au>
# Your choice of licence: GPL 2 or later, or same licence as Perl.
#
# Warranty? 					None
# If it breaks? 				The pieces are yours
# If it breaks something?	You drove it.
# Bugs?							At least one.

# now we've cleared the air;
#	This supposed to allow one to talk pop-3 to a mail server. If you're lucky (and know how)
#		you might also be able to talk a few other Internet protocols with it.
#	Typically, it's run thus:
#		pop2test.1 <mailserver> [<mailport>]
#	mailport's optional; default is 110 (pop-3).
#	
#	Having started, you type away much as you would with telnet.
#	
#	
#	
#	It has this great advantage over telnet: it reads its input from stdin and writes to stdout;
#		you can prepare the entire sequence in a file, then run it this:
#			pop2test.1 <thefileyoujustcreated >theresultsyouwanttoperuse host port
#	
#	
#	uses:
#		1	Debugging POP3 (and maybe imap does anyone know?) mail problems
#		2	Deleting the occasional piece of mail that's too big or stuffs fetchmail.
#		3	Talking to sendmail
#	
use Socket;
sub hx;
sub getreply;
$timeout=1;
$RemoteHost = $ARGV[0];shift;
$RemotePort = $ARGV[0] || 110;shift;
($PRname,$PRaliases,$PRport,$PRproto) = getservbyname($RemotePort,'tcp');
$PRport=$RemotePort unless $PRport;
$proto=getprotobyname($PRproto);  
$RemoteIP = inet_aton $RemoteHost or die "Can't resolve $RemoteHost";
$that = pack 'Sna4x8',AF_INET, $PRport, $RemoteIP;
socket(REMOTESITE,AF_INET,SOCK_STREAM,$proto)
        or die "Can't create socket to $RemoteHost: $!\n";;
connect(REMOTESITE, $that) or die "Can't connect: $!\n";
select(REMOTESITE);$|=1;select STDOUT;
$rin = $win = $ein = '';
vec($rin,fileno(REMOTESITE),1) = 1;
#vec($win,fileno(REMOTESITE),1) = 1;
$ein = $rin | $win;
getreply;
while ($L=<STDIN>)
{
	chomp $L;
	print REMOTESITE $L . "\r\n";
	print "send: " . $L . "\n";
	getreply;
}
print REMOTESITE "Quit\r\n";
getreply;
#print <REMOTESITE>;
close REMOTESITE;
exit;
# P
sub hx
{
	$N=$_[0];shift;
	$S=$_[0];shift;
	return "$N(" . unpack("h", $S) . ") "; 
}
sub getreply
{
	while ('x')
	{
		($nfound,$timeleft) = select($rout=$rin, undef, $eout=$ein, $timeout);
		last if $nfound == 0;
#		print "nf($nfound) tl($timeleft) " . hx("rin",$rin) . hx("rout", $rout) . hx("ein",$ein) . hx("eout",$eout) . "\n";
		$Reply= <REMOTESITE>;
		print "recv: " . $Reply;
		last if $Reply eq '';
		$Reply =~ s/[\r\n]*//;
		last if $Reply eq '.';
	}
}