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
SHOREWALL-BLRULES(5)						  [FIXME: manual]					      SHOREWALL-BLRULES(5)

NAME
blrules - shorewall Blacklist file SYNOPSIS
/etc/shorewall/blrules DESCRIPTION
This file is used to perform blacklisting and whitelisting. Rules in this file are applied depending on the setting of BLACKLISTNEWONLY in shorewall.conf[1](5). If BLACKLISTNEWONLY=No, then they are applied regardless of the connection tracking state of the packet. If BLACKLISTNEWONLY=Yes, they are applied to connections in the NEW and INVALID states. The format of rules in this file is the same as the format of rules in shorewall-rules (5)[2]. The differece in the two files lies in the ACTION (first) column. ACTION- {ACCEPT|CONTINUE|DROP|A_DROP|REJECT|A_REJECT|WHITELIST|LOG|QUEUE|NFQUEUE[(queuenumber)]|COMMENT|action|macro[(target)]}[:{log-level|none}[!][:tag]] Specifies the action to be taken if the packet matches the rule. Must be one of the following. BLACKLIST Added in Shorewall 4.5.3. This is actually a macro that expands as follows: o If BLACKLIST_LOGLEVEL is specified in shorewall.conf[1](5), then the macro expands to blacklog. o Otherwise it expands to the action specified for BLACKLIST_DISPOSITION in shorewall.conf[1](5). blacklog May only be used if BLACKLIST_LOGLEVEL is specified in shorewall.conf[1](5). Logs, audits (if specified) and applies the BLACKLIST_DISPOSITION specified in shorewall.conf[1] (5). ACCEPT|CONTINUE|WHITELIST Exempt the packet from the remaining rules in this file. DROP Ignore the packet. A_DROP and A_DROP! Audited versions of DROP. Requires AUDIT_TARGET support in the kernel and ip6tables. REJECT disallow the packet and return an icmp-unreachable or an RST packet. A_REJECT Audited versions of REJECT. Require AUDIT_TARGET support in the kernel and ip6tables. LOG Simply log the packet and continue with the next rule. QUEUE Queue the packet to a user-space application such as ftwall (http://p2pwall.sf.net). The application may reinsert the packet for further processing. NFLOG[(nflog-parameters)] queues matching packets to a backend logging daemon via a netlink socket then continues to the next rule. See http://www.shorewall.net/shorewall_logging.html[3]. NFQUEUE Queues the packet to a user-space application using the nfnetlink_queue mechanism. If a queuenumber is not specified, queue zero (0) is assumed. COMMENT the rest of the line will be attached as a comment to the Netfilter rule(s) generated by the following entries. The comment will appear delimited by "/* ... */" in the output of "shorewall show <chain>". To stop the comment from being attached to further rules, simply include COMMENT on a line by itself. action The name of an action declared in shorewall-actions[4](5) or in /usr/share/shorewall/actions.std. macro The name of a macro defined in a file named macro.macro. If the macro accepts an action parameter (Look at the macro source to see if it has PARAM in the TARGET column) then the macro name is followed by the parenthesized target (ACCEPT, DROP, REJECT, ...) to be substituted for the parameter. Example: FTP(ACCEPT). The ACTION may optionally be followed by ":" and a syslog log level (e.g, REJECT:info or Web(ACCEPT):debug). This causes the packet to be logged at the specified level. If the ACTION names an action declared in shorewall-actions[4](5) or in /usr/share/shorewall/actions.std then: o If the log level is followed by "!' then all rules in the action are logged at the log level. o If the log level is not followed by "!" then only those rules in the action that do not specify logging are logged at the specified level. o The special log level none! suppresses logging by the action. You may also specify NFLOG (must be in upper case) as a log level.This will log to the NFLOG target for routing to a separate log through use of ulogd (http://www.netfilter.org/projects/ulogd/index.html). Actions specifying logging may be followed by a log tag (a string of alphanumeric characters) which is appended to the string generated by the LOGPREFIX (in shorewall.conf[1](5)). For the remaining columns, see shorewall-rules (5)[2]. EXAMPLE
Example 1: Drop Teredo packets from the net. DROP net:[2001::/32] all Example 2: Don't subject packets from 2001:DB8::/64 to the remaining rules in the file. WHITELIST net:[2001:DB8::/64] all FILES
/etc/shorewall/blrules SEE ALSO
http://shorewall.net/blacklisting_support.htm http://shorewall.net/configuration_file_basics.htm#Pairs shorewall(8), shorewall-accounting(5), shorewall-actions(5), shorewall-hosts(5), shorewall-interfaces(5), shorewall-maclist(5), shoewall6-netmap(5),shorewall-params(5), shorewall-policy(5), shorewall-providers(5), shorewall-rtrules(5), shorewall-routestopped(5), shorewall-rules(5), shorewall.conf(5), shorewall-secmarks(5), shorewall-tcclasses(5), shorewall-tcdevices(5), shorewall-tcrules(5), shorewall-tos(5), shorewall-tunnels(5), shorewall-zones(5) NOTES
1. shorewall.conf http://www.shorewall.net/manpages/shorewall.conf.html 2. shorewall-rules (5) http://www.shorewall.net/manpages/shorewall-rules.html 3. http://www.shorewall.net/shorewall_logging.html http://www.shorewall.net/shorewall.logging.html 4. shorewall-actions http://www.shorewall.net/manpages/shorewall-actions.html [FIXME: source] 06/28/2012 SHOREWALL-BLRULES(5)
All times are GMT -4. The time now is 05:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy