LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 03-22-2005, 12:57 AM   #1
jomy
Member
 
Registered: Jul 2004
Location: UAE
Distribution: RedHat
Posts: 93

Rep: Reputation: 15
Blocking SPAM in Sendmail


Hi,


I'm having a Linux EL AS 3 running as a mail server (Sendmail). Once I started receiving Spam ,I thought of controlling it and configured Sendmail (in sendmail.mc) to use the RBL this way,


FEATURE(`dnsbl', `list.dsbl.org', `"550 Mail from "$`'&{client_addr} " refused - see http://dsbl.org/"')dnl

FEATURE(`dnsbl', `bl.spamcop.net', `"550 Mail from "$`'&{client_addr} " refused - see http://spamcop.net/bl.shtml/"')dnl

These 2 entries were given and ran the commands

m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

service sendmail restart


But I couldn't find any of the spam mails blocked.What could have gone wrong? Is there any other way to control the spam.Please give me a solution.


Jomy
 
Old 03-22-2005, 01:57 AM   #2
vimal
Red Hat India
 
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260

Rep: Reputation: 34
first of all view your log file in /var/log/. find out the spam source. then edit the file /etc/mail/access and add the line
From:xx.xx.xx.xx REJECT
here the xx.xx.xx.xx line specifies the ip add: of the source. also you can specify the subnet or fqdn.sava the file and issue the command " make access.db". then restart your service. i hope it would work. bye
 
Old 03-22-2005, 08:28 AM   #3
jomy
Member
 
Registered: Jul 2004
Location: UAE
Distribution: RedHat
Posts: 93

Original Poster
Rep: Reputation: 15
No. There is no point in doing that. Every day I get spam from different domains.So even if I add the entry n /etc/mail/access , tomorrow the mails are sent in another domain .So every day I have to do the same process.
 
Old 03-22-2005, 02:07 PM   #4
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
Here is what I have in my config


FEATURE(`dnsbl')dnl
FEATURE(`dnsbl', `combined.njabl.org', `"550 Email Rejected - combined.njabl.org"')dnl
FEATURE(`enhdnsbl', `bl.spamcop.net', `"550 Email Rejected - bl.spamcop.net blacklist"', `t')dnl
FEATURE(`dnsbl', `sbl.spamhaus.org', `"550 Email Rejected - sbl.spamhaus.org blacklist"')dnl
FEATURE(`dnsbl', `list.dsbl.org', `"550 Email Rejected - list.dsbl.org blacklist"')dnl
FEATURE(`dnsbl', `unconfirmed.dsbl.org', `"550 Email Rejected - unconfirmed.dsbl.org blacklist"')dnl
FEATURE(`dnsbl', `cbl.abuseat.org', `"550 Email Rejected - cbl.abuseat.org"')dnl

Note that for bl.spamcop.net you need to use the enhdnsbl feature. You need the `t' after the block message as well.

What do you mean you couldn't find them? They are not stored for review anywhere they are just plain rejected before the message can even be recieved.

on the command line as root do this:
grep -i "reject=550" /var/log/maillog

That will show what was rejected w/ the dnsbl's
 
Old 03-23-2005, 02:19 AM   #5
jomy
Member
 
Registered: Jul 2004
Location: UAE
Distribution: RedHat
Posts: 93

Original Poster
Rep: Reputation: 15
This seems to work. Thanks for the solution

Jomy
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Blocking spam with qmail Apollo77 Linux - General 70 03-05-2009 03:22 AM
Spam and sendmail Jonpittam Linux - Software 2 09-30-2004 07:56 AM
Sendmail: blocking spam pk21 Linux - Software 1 08-21-2003 06:28 AM
Sendmail Spam MrJoshua Linux - Software 1 08-14-2003 11:54 AM
blocking forum spam with snort rule? JustinHoMi Linux - Security 1 02-04-2002 06:50 PM


All times are GMT -5. The time now is 08:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration