LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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-18-2011, 02:36 PM   #1
mmyles
LQ Newbie
 
Registered: Jun 2009
Posts: 13

Rep: Reputation: 0
Exclamation E-mail server getting Blacklisted


Hello. I work for a small ISP, and am having trouble with our e-mail server continually getting blacklisted. It has happened 2 nights in a row now (and I'm not very Linux Savvy). We're running Redhat 5.6.

I think I can see why it is happening, I just don't know how to prevent it. Someone is sending e-mail, using an e-mail address not associated with our server. They are doing it every 15 seconds or so, and their IP address changes every time. Here is two examples.... [pvbb.net is one of our domains, but the usernames are totally unknown]

Quote:
Originally Posted by maillog
May 18 01:01:40 mail sendmail[11126]: p4I81cYU011126: <steven_judy_d@pvbb.net>... User unknown
May 18 01:01:40 mail sendmail[11126]: p4I81cYU011126: lost input channel from [182.177.146.164] to MTA after rcpt
May 18 01:01:40 mail sendmail[11126]: p4I81cYU011126: from=<steven_judy_d@pvbb.net>, size=0, class=0, nrcpts=0, proto=SMTP, daemon=MTA, relay=[182.177.146.164]

May 18 01:02:02 mail sendmail[11204]: p4I81w85011204: <stevenson@pvbb.net>... User unknown
May 18 01:02:02 mail sendmail[11204]: p4I81w85011204: lost input channel from s129-247.star.net.pl [89.17.247.129] to MTA after rcpt
May 18 01:02:02 mail sendmail[11204]: p4I81w85011204: from=<stevenson@pvbb.net>, size=0, class=0, nrcpts=0, proto=SMTP, daemon=MTA, relay=s129-247.star.net.pl [89.17.247.129]
Any help or advice will be very helpful... I'm not the one that set this server up, but do have a grasp of Linux.

Last edited by mmyles; 05-18-2011 at 02:43 PM.
 
Old 05-18-2011, 04:03 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi there,

Let us know how you can configured your mail server. I mean using postfix or sendmail?

Also it appears that someone is using your server as a relay agent. Which means they are connecting directly to the server from a workstation by typing: telnet server_name 25 and then typing in bogus From name and sending email.

If you have configured postfix I would be interested in seeing:

/etc/postfix/main.cf

Especially, the following setting:

unknown_local_recipient_reject_code
 
1 members found this post helpful.
Old 05-18-2011, 04:31 PM   #3
mmyles
LQ Newbie
 
Registered: Jun 2009
Posts: 13

Original Poster
Rep: Reputation: 0
It is configured using Sendmail

Hmm, I thought telnet access was disabled, but it appears I can do so.

How can I disable telnet access?

Last edited by mmyles; 05-18-2011 at 04:37 PM.
 
Old 05-18-2011, 04:53 PM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Have a look at this: http://www.electrictoolbox.com/artic...ction-refused/

Make sure you backup your files before editing them so that you can revert if something goes wrong.

Last edited by T3RM1NVT0R; 05-18-2011 at 05:56 PM.
 
Old 05-19-2011, 04:48 AM   #5
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
In addition to the telnet approach, I would also ask what form of authentication are you requiring of your users? The two most common ones that I can think of from an ISP perspective would be IP address being "my network" and a user name - password approach like SASL. My first thought was that you are a semi-open relay in that anyone using blah-blah@pvbb.net, the @pvbb.net being the crucial part are being accepted. BTW, you can't rely on header envelop or HELO information as this is easily spoofed.
 
1 members found this post helpful.
Old 05-19-2011, 11:19 AM   #6
mmyles
LQ Newbie
 
Registered: Jun 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Wink

Got in touch with the guy that set it up. He found the user 'spam' (a customers account, with a weak password) was somehow able to get shell access, using a .php installed into their home directory. We removed the account, and the trouble has stopped.

Thanks for your quick responses, though!!
 
Old 05-20-2011, 10:22 AM   #7
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 381

Rep: Reputation: 23
Quote:
Originally Posted by mmyles View Post
Got in touch with the guy that set it up. He found the user 'spam' (a customers account, with a weak password) was somehow able to get shell access, using a .php installed into their home directory. We removed the account, and the trouble has stopped.

Thanks for your quick responses, though!!
Weak passwords will cause lots of problems, believe me I have managed 5,500 accounts and it is like trying to 'get blood from a turnip' trying to make people understand the reason for strong passwords.
 
Old 05-20-2011, 09:19 PM   #8
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 381

Rep: Reputation: 23
***Note

With Postfix there is policyd you can install to limit the number of emails sent in 24 hours, this will get you blacklisted in a hurry.

I went with another Linux mail server due to this very problem, I can limit the number of emails sent in 24hr, so if it does get exploited (it will happen). This non-sense stopped instantly, plus I could view the IP and the amount of emails sent I knew it was compromised so I just lock the account and notify the helpdesk it is locked and cannot be used again until the password is changed.

You may check and see if there is a package like policyd for sendmail, also to I put rate-limiting rules in iptables in the input chain to stop malicious attackers from running scripts/mail-bombing hitting the server with denial of service attacks.

It is better to stop the attack with iptables and let the email server do what it does best relaying email. The rouge attackers just go to a black-hole now.

90% of all of the spam is sent via exploited email accounts with weak passwords, people don't care they do not have to deal with the administrative headahces and/or clean up.

Last edited by rhbegin; 05-20-2011 at 09:21 PM.
 
  


Reply



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
mail server migration: howto deliver locally AND forward mail to new server pedrobl Linux - Server 1 01-21-2011 11:12 PM
How to connect linux mail server with the exchange mail server nanuseenu Linux - Newbie 4 03-04-2008 03:37 AM
Blacklisted Mail Server IP dlublink Linux - Networking 1 02-02-2005 01:47 PM
Cannot e-mail some people. I am seemingly blacklisted?! WorldBuilder Linux - Networking 11 05-20-2003 09:19 AM

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

All times are GMT -5. The time now is 12:00 PM.

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