Gossamer Forum
Home : Products : Links 2.0 : Customization :

Email Address Blocking

Quote Reply
Email Address Blocking
I was wondering if their is a way to program links to recognize specific email addresses and not allow them to submit sites and take them to a specific page explaining that they can't. I'm starting to see the begins of spammers to mine via saveavenue.com. They totally deny their involved but its just their sites.
Quote Reply
Re: [LordStryfe] Email Address Blocking In reply to
Put in add.cgi this

Code:
if (lc($in{'Contact Email'}) =~ "spammer1|spammer2|spammer3|spammer4|andsoon") {
&site_html_add_failure ("Go away");
return;
}


before this

# This will set system fields like Validated to their proper values.


You can use a routine like this for all input fields.

Best Karl
Quote Reply
Re: [Karl] Email Address Blocking In reply to
Thank you
Quote Reply
Re: [LordStryfe] Email Address Blocking In reply to
Hi,

btw

you dont have to use the complete emailadress. Instead of spammer@spammer.com you can use just a part of it like "spammer"

So any adress with the word "spammer" in it whould be blocked.

Best,
Karl
Quote Reply
Re: [Karl] Email Address Blocking In reply to
In Reply To:
before this

# This will set system fields like Validated to their proper values.

Hi Karl,
could you please specify this a bit clearer. I can not find this line in my add.cgi :-(

Thanks
Matthias

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] Email Address Blocking In reply to
Hi,

place the code after this:

Code:

sub process_form {
# --------------------------------------------------------
my ($key, $status, $line, $output);
# Check the referer.
if (@db_referers and $ENV{'HTTP_REFERER'}) {
$found = 0;
foreach (@db_referers) {
$ENV{'HTTP_REFERER'} =~ /$_/i and $found++ and last;
}
if (!$found) {
&site_html_add_failure ("Auto submission is not allowed in this directory. Please visit the site to add your entry.");
return;
}
}

Grüße,
Karl-Heinz
Quote Reply
Re: [Karl] Email Address Blocking In reply to
Hallo Karl-Heinz,
läuft super, vielen Dank für deine Hilfe.
Matthias

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] Email Address Blocking In reply to
This is not working
Quote Reply
Re: [LordStryfe] Email Address Blocking In reply to
@LordStryfe:

Search for :

Code:
&check_exclude($in{'Kategorie'});

in add.cgi and replace it with:

Code:
&check_exclude($in{'Kategorie'});
&spam_exclude($in{'Email'});

Insert between sub check_exclude and sub send_email
the following code:

Code:
sub spam_exclude {
# Avoid entries from specific Email-Addy`s -- insert them manually
# @ must be masked: \@

my ($badmail) = shift;
my ($antispam) = "http://www.your-forum.de/404.html"; # Simply an error message - configure this by your affords
# Blanko Spam Eintrag : || $badmail eq ""


if ($badmail eq "contact\@....com"
|| $badmail eq "...\@yahoo.com"
|| $badmail eq "...\@spamarrest.com"
|| $badmail eq "...\@jesterware.co.uk" #

) { $in{'Titel'} = "";
$in{'DownloadURL'} = "";
$in{'Kategorie'} = "";
$in{'KurzBeschreibung'} = "";
$in{'Beschreibung'} = "";
$in{'Image'} = "";
$in{'Dateigroesse'} = "";
$in{'Version'} = "";
$in{'Betriebssystem'} = "";
$in{'Lizenz'} = "";
$in{'Preis'} = "";
$in{'Sprache'} = "";
$in{'Name'} = "";
$in{'Email'} = "";
$in{'Website'} = "";
$status = "";
print "Location: http://www.your-forum.de/404.html\n\n";
}

else {$status = "ok";}

}

Each time a spam addy tries to add an entry it will receive an error message in this example.

.


Andreas

Dr.Windows








Quote Reply
Re: [SevenSpirits] Email Address Blocking In reply to
I think I should explain how it works:

Avoid entries in special categories:
Code:
&check_exclude($in{'Kategorie'});
This is a regular function in Links 2.0.


Block email adresses:

This calls a sub and passes the email adress to the sub:
Code:
&spam_exclude($in{'Email'});


Code:
sub spam_exclude {

# my ($badmail gets the value of $in{'Email'} /
# the email adress we want to block

my ($badmail) = shift;


# Not necessary - but nice:
# $antispam is the URL of an HTTP 404 Error Message Site
# Especially useful for Auto Soft Submit Software

my ($antispam) = "http://www.your-forum.de/404.html";
# Blanko Spam Eintrag : || $badmail eq ""

# In this part you must enter unwanted
# email adresses manually
# don`t forget to mask the at: \@
# example: abc\@spamdomain.com

# Some examples:
if ( $badmail eq "...\@very-funny-videos.com"
|| $badmail eq "...\@yahoo.com"
|| $badmail eq "...\@spamarrest.com"
|| $badmail eq "...\@jesterware.co.uk"
)

# All variables will be cleared:
{
$in{'Titel'} = "";
$in{'DownloadURL'} = "";
$in{'Kategorie'} = "";
$in{'KurzBeschreibung'} = "";
$in{'Beschreibung'} = "";
$in{'Image'} = "";
$in{'Dateigroesse'} = "";
$in{'Version'} = "";
$in{'Betriebssystem'} = "";
$in{'Lizenz'} = "";
$in{'Preis'} = "";
$in{'Sprache'} = "";
$in{'Name'} = "";
$in{'Email'} = "";
$in{'Website'} = "";

# $status is cleared
$status = "";

# Error message:
# (In this case I did not use $antispam)
print "Location: http://www.your-forum.de/404.html\n\n";
}

else {$status = "ok";}
}


.


Andreas

Dr.Windows