LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-24-2012, 06:58 AM   #1
sunshadow
LQ Newbie
 
Registered: Mar 2012
Posts: 13

Rep: Reputation: Disabled
Cutting down on Spam!


Dears,
I'm a system administrator of an ISP. Our IP address space is black listed because many of our clients are sending out spam and we don't have an anti-measure in place at the moment. Therefore, we are planning to block all traffic destined to TCP port 25 and get our clients to use a mail gateway that is operated by the ISP. I have installed and configured sendmail, MailScanner and Spamassassin. But the problem is that in order to allow our clients to send through our mail gateway, we must grant Relay permission to them. I'm not sure if this is the best practice to fight against spam. All clients in this case can now configure their MSPs to use any email address even if it does not really belong to them and then send forged emails through our mail gateway.
Your recommendations are highly appreciated!
Thanks
 
Old 05-24-2012, 07:36 AM   #2
r0b0
Member
 
Registered: Aug 2004
Location: Europe
Posts: 608

Rep: Reputation: 50
Quote:
Originally Posted by sunshadow View Post
I'm a system administrator of an ISP. Our IP address space is black listed because many of our clients are sending out spam and we don't have an anti-measure in place at the moment. Therefore, we are planning to block all traffic destined to TCP port 25 and get our clients to use a mail gateway that is operated by the ISP.
Very good.
Quote:
Originally Posted by sunshadow View Post
I have installed and configured sendmail, MailScanner and Spamassassin. But the problem is that in order to allow our clients to send through our mail gateway, we must grant Relay permission to them.
Is your configuration passing all relayed e-mail through spamassassin? What do you do with e-mail evaluated as spam? Are you dropping it? Rejecting it while the SMTP connection is still open?
Quote:
Originally Posted by sunshadow View Post
I'm not sure if this is the best practice to fight against spam. All clients in this case can now configure their MSPs to use any email address even if it does not really belong to them and then send forged emails through our mail gateway.
Well, this is how the SMTP protocol works. Anyone can send an e-mail with any From address they want. There's not much you can do about it as an ISP. But forged e-mail is *not* the reason you get to the blacklists. Spam is the reason. And if you will be catching spam on your relay, you're going to be fine.

Robert
 
Old 05-24-2012, 09:16 AM   #3
sunshadow
LQ Newbie
 
Registered: Mar 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
Hello Robert,

Thanks for your reply!
Yes, all relayed emails are passed through Spamassassin. I have configured MailScanner to store emails evaluated as spam in quarantine.

Actually, I thought the same,there is not much I can do about it, I just wanted to know whether my configuration is what an ISP should typically do.

I have another question, I will appreciate if you help me with your opinion about it. I added a Yahoo mail account on my Outlook and used our ISP's mail gateway as the outgoing mail server. Then I have sent several email messages to my Gmail, but unfortunately Gmail put all the messages into the Spam folder! I have checked the messages headers and found out that MailScanner installed on our ISP's mail gateway added the following headers to the message:

X-yoursite-MailScanner: Found to be clean
X-Spam-Status: No

Which apparently means that it considered the messages to be clean. Why did Gmail consider the message as spam? Is it possibly because Gmail mail exchanger did MX record lookup on yahoo.com and found out that our ISP's mail gateway, which it received the messages from is not a valid mail exchanger of yahoo.com?

Thanks!
 
Old 05-24-2012, 03:04 PM   #4
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
One thing that I might suggest is that you want your clients to perform SASL authentication before being allowed to send mail. This will at least prevent open relay syndrome and give you a better record of who sent what when. It will also have a psychological effect in that your clients will not feel quite so anonymous in sending mail which will cut down on the spam.

With respect to:
Quote:
I added a Yahoo mail account on my Outlook and used our ISP's mail gateway as the outgoing mail server. <snip> Gmail put all the messages into the Spam folder!
My guess is that yes, one of the problems you could face is that, the from field in the envelope shows that the message was from user@yahoo, but it did not come from a yahoo mx, which is typically a sign of spam being passed through an open relay. Alternatively, they could have done a lookup on the your IP that made the connection, tried to look up your MX record or SPF record and found inconsistent or no information and decided that the originating system is not a legitimate mail server.
 
Old 05-29-2012, 01:58 AM   #5
r0b0
Member
 
Registered: Aug 2004
Location: Europe
Posts: 608

Rep: Reputation: 50
Quote:
Originally Posted by sunshadow View Post
I added a Yahoo mail account on my Outlook and used our ISP's mail gateway as the outgoing mail server. Then I have sent several email messages to my Gmail, but unfortunately Gmail put all the messages into the Spam folder! I have checked the messages headers and found out that MailScanner installed on our ISP's mail gateway added the following headers to the message:

X-yoursite-MailScanner: Found to be clean
X-Spam-Status: No

Which apparently means that it considered the messages to be clean. Why did Gmail consider the message as spam? Is it possibly because Gmail mail exchanger did MX record lookup on yahoo.com and found out that our ISP's mail gateway, which it received the messages from is not a valid mail exchanger of yahoo.com?
Yes, there are approaches and protocols to overcome the "weakness" of SMTP in terms of spoofing. You can look up DKIM and SPF. Maybe you could even consider implementing them in your setup!

Robert
 
  


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
Auto deleting spam assasins spam box via cronjob and Roundcube Junk Folder osmy Linux - Newbie 8 01-23-2012 04:22 PM
Move SA Marked Spam to Junk/Spam Folder Using Procmail, Postfix, and Virtual Users alden_pease Linux - Server 0 01-05-2012 12:29 AM
postfix spam. someone is using my server to send spam and it's not open relay bob808 Linux - Server 6 03-23-2010 09:44 AM
spam filter that puts spam into spam folder? paul_mat Linux - Software 3 03-31-2009 04:18 AM
procmail and spam -- do not send out of office auto replay to spam draix Linux - Software 0 12-30-2004 08:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:15 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
Open Source Consulting | Domain Registration