Gossamer Forum
Home : Products : DBMan : Discussions :

ban e-mail addresses

Quote Reply
ban e-mail addresses
Hello

How can to ban some email addresses to signup at dbman?

I have downloaded the

http://www.jpdeni.com/dbman/Mods/email.zip

but this file it looks corrupted..

Could you help me?

Thanks
Quote Reply
Re: [kinisi] ban e-mail addresses In reply to
Does the zip file not open?

Just to let you know that list was created a few years ago and it very outdated. I can't remember now where I got the original list.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] ban e-mail addresses In reply to
> Does the zip file not open?



It is not open by winzip, it is like as destroyed
Quote Reply
Re: [kinisi] ban e-mail addresses In reply to
Try this copy:

http://webmagic.hypermart.net/dbman/freemail.zip

let me know if it opens okay

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] ban e-mail addresses In reply to
this copy it is ok - thanks



Do you know any other mod for ban addresses except jpdeni website?

Because I have installed and not worked.
Quote Reply
Re: [kinisi] ban e-mail addresses In reply to
I haven't used it myself, but I'm sure if you search the forum threads you will find others who have used that mod or variations of it.

search for "ban email" or whatever else could have been used to identify it. I can't remember the exact name of that mod.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [kinisi] ban e-mail addresses In reply to
....how about:

Code:
my @ban_list = ();

open B, "<banlist.txt" or die $!;
@ban_list = <B>;
close B;

my $domain = $in{Email_Field}; $domain =~ s/^\S+@(\S+\.\S+)$/$1/;

if (grep { /^\Q$domain\E$/ } @ban_list) {

some_error_here

}

Last edited by:

RedRum: Feb 23, 2002, 2:26 AM
Quote Reply
Re: [RedRum] ban e-mail addresses In reply to
Where and which file must to add these?



....how about:

Code:
my @ban_list = ();

open B, "<banlist.txt" or die $!;
@ban_list = <B>;
close B;

my $domain = $in{Email_Field}; $domain =~ s/^\S+@(\S+\.\S+)$/$1/;

if (grep { /^\Q$domain\E$/ } @ban_list) {

some_error_here

}
Quote Reply
Re: [kinisi] ban e-mail addresses In reply to
Wherever you need to ban emails. I assume during signup so that would be sub signup() in db.cgi?

Do you require an email address during signup?
Quote Reply
Re: [RedRum] ban e-mail addresses In reply to
Next code it is part of db.cgi

Could you write with color characters , where need to put your code?



sub signup {
# --------------------------------------------------------
# Allows a user to sign up without admin approval. Must have $auth_signup = 1
# set. The user gets @default_permissions.
#
my $message;

# Check to make sure userid is ok, pw ok, and userid is unique.
unless ((length($in{'userid'}) >= 3) and (length($in{'userid'}) <= 12) and ($in{'userid'} =~ /^[a-zA-Z0-9]+$/)) {
$message = "Invalid userid: $in{'userid'}. Must only contain only letters and be less then 12 and greater then 3 characters.";
}
unless ((length($in{'pw'}) >= 3) and (length($in{'pw'}) <= 12)) {
$message = "Invalid pw: '$in{'pw'}'. Must be less then 12 and greater then 3 characters.";
}
open (PASS, "<$auth_pw_file") or &cgierr ("unable to open: $auth_pw_file.\nReason: $!");
if ($db_use_flock) { flock(PASS, 1); }
while (<PASS>) {
/^\Q$in{'userid'}\E:/ and ($message = "userid already exists. Please try another.");
}
close PASS;
if ($message) {
&html_signup_form ($message);
return;
}

# Add the userid into the file with default permissions.
open (PASS, ">>$auth_pw_file") or &cgierr ("unable to open: $auth_pw_file.\nReason: $!");
if ($db_use_flock) {
flock(PASS, 2) or &cgierr("unable to get exclusive lock on $auth_pw_file.\nReason: $!");
}
srand( time() ^ ($$ + ($$ << 15)) ); # Seed Random Number
my @salt_chars = ('A' .. 'Z', 0 .. 9, 'a' .. 'z', '.', '/');
my $salt = join '', @salt_chars[rand 64, rand 64];
my $encrypted = crypt($in{'pw'}, $salt);
my $permissions = join (":", @auth_signup_permissions);

print PASS "$in{'userid'}:$encrypted:$permissions\n";
close PASS;

&html_signup_success;
}
Quote Reply
Re: [kinisi] ban e-mail addresses In reply to
When you said you tried the Ban email domains from signup mod from JPDeni's site and it didnt work ... what didn't work?

It requires the installation of the secure password lookup mod first. Did you install that? I think that mod puts the email address into the password file.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/