Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Answers to Frequently Asked Questions Email Antispam Techniques and Email Filtering Sendmail Access DB TLD Blocking .... Post 34325 by Neo on Sunday 16th of February 2003 09:14:25 PM
Old 02-16-2003
Sendmail Access DB TLD Blocking ....

Now this is a bit tricky, but works great if you can decide which Top Level Domains or TLDs you want to receive mail We are getting so much spam from countries we never receive useful mail, I've been experimenting with blocking entire TLDs using sendmail access_db as an antispam technique.

Here is my current list, working great... yes I might miss a good one, but it blocks SO MUCH junk Smilie :

Code:
ad      REJECT
ae      REJECT
af      REJECT
al      REJECT
ar      REJECT
ao      REJECT
az      REJECT
ba      REJECT
bb      REJECT
bd      REJECT
bg      REJECT
bi      REJECT
bh      REJECT
bj      REJECT
bt      REJECT
bw      REJECT
by      REJECT
cf      REJECT
cg      REJECT
ch      REJECT
ci      REJECT
cm      REJECT
cn      REJECT
cs      REJECT
cy      REJECT
cz      REJECT
dz      REJECT
ee      REJECT
eg      REJECT
eh      REJECT
er      REJECT
et      REJECT
ga      REJECT
ge      REJECT
gf      REJECT
gh      REJECT
gm      REJECT
gn      REJECT
gp      REJECT
gq      REJECT
gw      REJECT
gy      REJECT
hr      REJECT
ht      REJECT
hu      REJECT
id      REJECT
iq      REJECT
ir      REJECT
jm      REJECT
jo      REJECT
ke      REJECT
kg      REJECT
ki      REJECT
kp      REJECT
kr      REJECT
kw      REJECT
lb      REJECT
li      REJECT
lr      REJECT
ls      REJECT
lt      REJECT
lv      REJECT
ly      REJECT
ma      REJECT
md      REJECT
mg      REJECT
mk      REJECT
mn      REJECT
mr      REJECT
ms      REJECT
mt      REJECT
mu      REJECT
mv      REJECT
mw      REJECT
mx      REJECT
my      REJECT
mz      REJECT
na      REJECT
ne      REJECT
ng      REJECT
ni      REJECT
om      REJECT
pa      REJECT
pe      REJECT
pf      REJECT
pg      REJECT
pk      REJECT
pl      REJECT
pn      REJECT
pr      REJECT
pt      REJECT
py      REJECT
qa      REJECT
ro      REJECT
ru      REJECT
rw      REJECT
sa      REJECT
sb      REJECT
sc      REJECT
sd      REJECT
si      REJECT
sk      REJECT
sn      REJECT
so      REJECT
sr      REJECT
su      REJECT
sv      REJECT
sy      REJECT
sz      REJECT
td      REJECT
tg      REJECT
tj      REJECT
tk      REJECT
tm      REJECT
tn      REJECT
to      REJECT
tp      REJECT
tr      REJECT
tt      REJECT
tu      REJECT
tv      REJECT
tw      REJECT
tz      REJECT
ug      REJECT
uy      REJECT
uz      REJECT
ve      REJECT
ws      REJECT
ye      REJECT
yu      REJECT
za      REJECT
zm      REJECT
zr      REJECT
zw      REJECT

Combining this TLD blocking with Procmail charset filters has cut my spam down to fraction of what it was.......
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

blocking mail using sendmail

Hi, I am using sendmail 8.9.1 and trying to block email from certain domain/user. How could I do that? TQ (4 Replies)
Discussion started by: liyas
4 Replies

2. UNIX for Dummies Questions & Answers

access file for sendmail

Hi, I have created an access file using makemap and write in user email address that wish to be rejected by the mail server but it doesn't work. I still can receive the emails from the domains that are supposed to be REJECTED. Please help. Sendmail version 8.9.1 Solaris 2.6 TQ (3 Replies)
Discussion started by: liyas
3 Replies

3. UNIX for Advanced & Expert Users

blocking sendmail from domain

hi i edited the /etc/mail/access files with the line "yahoo.com REJECT", afterwhich i cannot send out files to the yahoo.com domain. :mad: can someone advise on how to go about configuring such that i am able to send mail out to yahoo.com BUT block INCOMING mail from yahoo.com :confused: i... (0 Replies)
Discussion started by: legato
0 Replies

4. UNIX for Dummies Questions & Answers

Which program can I use for blocking unauthorized access via/ssh/ftp

Hi, I need to install a program on my Centos 5.3 server that will block unauthorized ssh/ftp access attempts. The two features I require is that I should be able to configure the program to block the IP of the intruder after a a certain amount of access attempts and that it should display a... (3 Replies)
Discussion started by: mojoman
3 Replies

5. Linux

sendmail access file problem

I am trying to configure access file of sendmail to relay on certain domain. I noticed that it does not work if I put domain name but it works when I put the IP address of that domain. for example: zgoldz.com RELAY (does not work) RELAY (works fine) ... (1 Reply)
Discussion started by: jalmod
1 Replies

6. UNIX for Advanced & Expert Users

Sendmail Access DB Scalability

Hello, So here's what I am trying to accomplish. We have a sendmail server and we are trying to stop backscattering. One idea that we came up with to prevent this is to utilize sendmail's access database. Basically we'd have the first line bounce all mail coming in to our mail server to users... (9 Replies)
Discussion started by: citaliano
9 Replies

7. UNIX for Dummies Questions & Answers

Redirecting requests from 8153 and blocking access to the same

Hey All, Problem: I have a application which runs on port 8153 (http) and on 8154 (https). For design reasons i can not block tcp connections to 8153. How do i forward all requests from http 8153 to https 8154( this would be the ideal solution) Or redirect all requests that come to... (2 Replies)
Discussion started by: Arun Kumar
2 Replies

8. Post Here to Contact Site Administrators and Moderators

Google Chrome is blocking access to UNIX.com

For some reason Google Chrome sees unix.com as dangerous and has start to block it. I need to select advanced and continue on own risk. Can you make an effort to remove unix.com form the list of dangerous site from Google. IE has not this problem. (5 Replies)
Discussion started by: Jotne
5 Replies
Mail::SpamAssassin::PerMsgStatus(3)			User Contributed Perl Documentation		       Mail::SpamAssassin::PerMsgStatus(3)

NAME
Mail::SpamAssassin::PerMsgStatus - per-message status (spam or not-spam) SYNOPSIS
my $spamtest = new Mail::SpamAssassin ({ 'rules_filename' => '/etc/spamassassin.rules', 'userprefs_filename' => $ENV{HOME}.'/.spamassassin.cf' }); my $mail = Mail::SpamAssassin::NoMailAudit->new(); my $status = $spamtest->check ($mail); if ($status->is_spam()) { $status->rewrite_mail (); $mail->accept("caught_spam"); } ... DESCRIPTION
The Mail::SpamAssassin "check()" method returns an object of this class. This object encapsulates all the per-message state. METHODS
$isspam = $status->is_spam () After a mail message has been checked, this method can be called. It will return 1 for mail determined likely to be spam, 0 if it does not seem spam-like. $list = $status->get_names_of_tests_hit () After a mail message has been checked, this method can be called. It will return a comma-separated string, listing all the symbolic test names of the tests which were trigged by the mail. $num = $status->get_hits () After a mail message has been checked, this method can be called. It will return the number of hits this message incurred. $num = $status->get_required_hits () After a mail message has been checked, this method can be called. It will return the number of hits required for a mail to be consid- ered spam. $report = $status->get_report () Deliver a "spam report" on the checked mail message. This contains details of how many spam detection rules it triggered. The report is returned as a multi-line string, with the lines separated by " " characters. $status->rewrite_mail () Rewrite the mail message. This will add headers, and possibly body text, to reflect its spam or not-spam status. The modifications made are as follows: Subject: header for spam mails The string "*****SPAM*****" (changeable with "subject_tag" config option) is prepended to the subject, unless the "rewrite_subject 0" configuration option is given. X-Spam-Status: header for spam mails A string, "Yes, hits=nn required=nn tests=..." is set in this header to reflect the filter status. The keys in this string are as follows: X-Spam-Report: header for spam mails The SpamAssassin report is added to the mail header if the "report_header 1" configuration option is given. hits=nn The number of hits the message triggered. required=nn The threshold at which a mail is marked as spam. tests=... The symbolic names of tests which were triggered. X-Spam-Flag: header for spam mails Set to "YES". Content-Type: header for spam mails Set to "text/plain", in order to defang HTML mail or other active content that could "call back" to the spammer. X-Spam-Checker-Version: header for spam mails Set to the version number of the SpamAssassin checker which tested the mail. spam mail body text The SpamAssassin report is added to top of the mail message body, unless the "report_header 1" configuration option is given. X-Spam-Status: header for non-spam mails A string, "No, hits=nn required=nn tests=..." is set in this header to reflect the filter status. The keys in this string are the same as for spam mails (see above). $messagestring = $status->get_full_message_as_text () Returns the mail message as a string, including headers and raw body text. If the message has been rewritten using "rewrite_mail()", these changes will be reflected in the string. Note: this is simply a helper method which calls methods on the mail message object. It is provided because Mail::Audit uses an unusual (ie. not quite intuitive) interface to do this, and it has been a common stumbling block for authors of scripts which use Spa- mAssassin. $status->finish () Indicate that this $status object is finished with, and can be destroyed. If you are using SpamAssassin in a persistent environment, or checking many mail messages from one Mail::SpamAssassin factory, this method should be called to ensure Perl's garbage collection will clean up old status objects. SEE ALSO
"Mail::SpamAssassin" "spamassassin" perl v5.8.0 2002-09-26 Mail::SpamAssassin::PerMsgStatus(3)
All times are GMT -4. The time now is 11:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy