LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-18-2007, 08:55 AM   #1
Joe2007
LQ Newbie
 
Registered: Dec 2007
Posts: 5

Rep: Reputation: 0
How to deny imap and pop access


Hi,

How do I deny users from certain network segment from accessing my sendmail server using pop3 and imap protocols using TCP Wrappers (hosts.deny file) without using iptables?

e.g. prevent users from 192.168.203.0/24 network from accessing mail server using hosts.deny or/and hosts.allow files

Thank you.

Joe
 
Old 12-18-2007, 10:03 AM   #2
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
In hosts.deny enter:

143: 192.168.203.0/24
110: 192.168.203.0/24
 
Old 12-18-2007, 10:44 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
Quote:
Originally Posted by ramram29 View Post
In hosts.deny enter:

143: 192.168.203.0/24
110: 192.168.203.0/24
Are you sure the notation is ".0/24"? In my book it's just a trailing dot: 192.168.203.
 
Old 12-18-2007, 10:56 AM   #4
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
You could also use the trailing dot or /255.255.255.0. Test it.
 
Old 12-18-2007, 07:04 PM   #5
Joe2007
LQ Newbie
 
Registered: Dec 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Sorry, it is not still working using both suggestions.
 
Old 12-18-2007, 08:25 PM   #6
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
Do you know what ports they are using? If they are using SSL they may be checking mail on 995 and sending on 587 or 465 (as far as POP is concerned). I don't know the IMAP SSL ports off the top of my head, but you should be able to block what they are using. The above suggestions are indeed correct usage of the hosts.deny file. You can use 'man hosts.deny' to see other options.
 
Old 12-20-2007, 08:22 AM   #7
Joe2007
LQ Newbie
 
Registered: Dec 2007
Posts: 5

Original Poster
Rep: Reputation: 0
It looks like there is no way one can use TCP wrappers to prevent users from accessing pop3 (port 110) and imap (port 143) server.
 
  


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
Courier IMAP deny users mjnman Linux - Software 2 08-01-2007 02:59 PM
Restric access to pop/imap server RHEL 4.0 nasim2 Red Hat 1 02-04-2006 07:41 AM
Imap, Pop ziox Linux - Networking 2 01-23-2006 05:35 PM
Restrict IMAP/POP access pembo13 Linux - Networking 3 01-13-2004 01:24 PM
I need POP and IMAP rufassa Linux - Networking 1 11-08-2003 11:56 AM


All times are GMT -5. The time now is 08:59 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration