From: Ignoramus27024 on
David, your script is awesome. Here's my rewritten version that does
not require inetd. You can start it from cron. The greeting host and
port are command line arguments. I hope tht you do not object to the
license statement.

#!/usr/bin/perl -w
#
# Written By: David Skol dfs AT roaringpenguin.com
# Modified By: Igor Chudov igor AT chudov.com
#
# License: GNU Public License
#
use strict;
use warnings;

package MailServer;


use Net::Server::PreForkSimple;
use vars qw( @ISA $host );

@ISA = qw(Net::Server::PreForkSimple);

use Getopt::Long;

# Null SMTP server. Accepts and throws away everything on stdin.
# Run it via inetd.

my $port = 25;

$host = 'mailserver';

GetOptions(
"port=i" => \$port,
"host=s" => \$host,
);

##> I would like to know if there is some "dummy" program that looks
to
##> the outside worls as a MTA, but in reality all it does is accept
##> incoming mail and simply disregards it (drops to bit bucket).
##
##Here's one in Perl. Run it from (x)inetd.

sub process_request
{
my $self = shift;
my $sock = $self->{server}->{client};

print "220 $host SMTP Ready\n";
my $in_data = 0;
$| = 1;
while(<>) {
$in_data = 0 if ($in_data && /^\.\r?$/);
next if $in_data;
if (/^QUIT\r?$/i) {
print "221 bye bye\n";
last;
}
if (/^DATA/i) {
print "350 accepting.\n";
$in_data = 1;
next;
}
print "250 OK.\n";
}

}

__PACKAGE__->run( port => $port, max_servers => 3 );
From: wisdomkiller & pain on
Ignoramus22979 wrote:

> I would like to know if there is some "dummy" program that looks to
> the outside worls as a MTA, but in reality all it does is accept
> incoming mail and simply disregards it (drops to bit bucket).
>
> I know that sendmail can be configured to do what I want, but it is a
> lot of overhead given what I want.
>
A good one is smtarpit - it is intended for just that purpose, to trap
spammers by delayed smtp negotiation sequences and block their outgoing
ports and ressources.
From: Mike Scott on
wisdomkiller & pain wrote:
....
> A good one is smtarpit - it is intended for just that purpose, to trap
> spammers by delayed smtp negotiation sequences and block their outgoing
> ports and ressources.

Getting pointless these days. A lot of spammers just throw all the data
in one go in the general direction of the receiving server and leave.
Attempts to delay them don't work because they're not listening.

--
Mike Scott (unet2 <at> [deletethis] scottsonline.org.uk)
Harlow Essex England
From: John Nemeth on
Mike Scott (usenet.12(a)spam.stopper.scottsonline.org.uk) wrote:
: wisdomkiller & pain wrote:
: ...
: > A good one is smtarpit - it is intended for just that purpose, to trap
: > spammers by delayed smtp negotiation sequences and block their outgoing
: > ports and ressources.

: Getting pointless these days. A lot of spammers just throw all the data
: in one go in the general direction of the receiving server and leave.
: Attempts to delay them don't work because they're not listening.

Not to mention that the spammer is quite likely using a
compromised PC as a spambot and thus doesn't care if you slow the
system down.
From: Grant Taylor on
Bruce Esquibel wrote:
> A few weeks ago I noticed a sort-of-denial-of-attack against one of
> our mailers and because of the sustained activity got to play around
> with some things to see how effective they were.

Thank you for the good / interesting observations / information Bruce.

I find it both interesting and frightening that the bot net was being
centrally controlled. (I could digress in to the pros and cons of this,
but I'll skip that for now.)



Grant. . . .