LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 11-18-2009, 11:44 PM   #1
akluthra
LQ Newbie
 
Registered: Nov 2009
Posts: 4

Rep: Reputation: 0
Host wise restricion not working in sendmail with squirrelmail in RHEL-5


Dear all,
I have installed sendmail with squirrelmail on RHEL-5 ,it is working fine but /etc/mail/access file does not block mail from any host listed in this file for blocking. Can any one explain why it is so and how to get rid of this problem?

(A.K. Luthra)
 
Old 11-19-2009, 12:14 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,906

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
Hi,

Any time you do changes in /etc/mail/access, you need to rebuild the access database. This is done running:
Code:
makemap hash /etc/mail/access < /etc/mail/access
Regards
 
Old 11-19-2009, 12:45 AM   #3
akluthra
LQ Newbie
 
Registered: Nov 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Host wise restricion not working in sendmail with squirrelmail in RHEL-5

Quote:
Originally Posted by bathory View Post
Hi,

Any time you do changes in /etc/mail/access, you need to rebuild the access database. This is done running:
Code:
makemap hash /etc/mail/access < /etc/mail/access
Regards
Yes , I did that of course and it works fine when I use outlook express on Windows client or Mozilla mail on Linux clients, but my problem is it does not work when I use webmail using squirrelmail. I think I have been able to clarify my point. Is there any additional configuration required to activate /etc/mail/access.db while using webmail?
Thanks,
 
Old 11-19-2009, 02:25 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,906

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
What exactly do you want to restrict?
What's in /etc/mail/access?
 
Old 11-25-2009, 03:23 AM   #5
akluthra
LQ Newbie
 
Registered: Nov 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Smile

Let us say the ip address of my sendmail server is 192.168.30.32, the domain name is cdac.org (the name server is configured for this domain and is working successfully) and the entries in /etc/mail/access are as follows

127.0.0.1 RELAY
192.168.30.217 550 “ Do not use my mailserver”
Now the above file is saved.

# makemap hash /etc/mail/access < /etc/mail/access
The entries in /etc/mail/local-host-names is as follows:
cdac.org
The files /etc/httpd/conf/httpd.conf , /etc/mail/sendmail.mc , /etc/squirrelmail/config.php and /etc/dovecot.conf are configured properly then I use following commands
# service named start
#service httpd start
#service sendmail start
# service dovecot start
After this I go to client machine 192.168.30.217 and using the entry nameserver 192.168.30.32 in /etc/resolv.conf file of this client machine, I start the web browser, give the url www.cdac.org/webmail and I get the squirrelmail window where I give username and password of one of the users of mail server I am very much able to send and receive mails without any hindrance, on the other hand when I use Mozilla mail or out look express on the same machine after creating the user account and try to send or receive I get the error message 550 Don’t use my mail server. That means the sending
and receiving mail is being blocked successfully due to entry in /etc/mail/access file, then why the mail is not being blocked by using web mail, while other conditions are same.
 
Old 11-25-2009, 03:49 AM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,906

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
Now this make sense:
A user from 192.168.30.217, uses the webserver on 192.168.30.32 to access your mailserver, that is installed on the same IP.
When this user sends an email from SquirrelMail, he actually access the smtp server from localhost (you can verify it from logs), so he grants relay.
If you want to restrict access by IP, you can use this SquirrelMail plugin, or use the apache techniques to restrict access based on the IP address.

Regards

Last edited by bathory; 12-06-2009 at 05:19 PM.
 
  


Reply

Tags
rhel5, squirrelmail


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
how to Block a site in a Firewall or Router by Protocol wise & host wise. shahid khan Linux - Security 2 06-26-2009 04:13 PM
Help me getting work with squirrelmail in RHEL 5.0 siri.siri143 Linux - Enterprise 9 11-11-2008 09:20 AM
Sendmail--Smart host entry not working dhanju Linux - Server 1 03-19-2008 08:09 AM
SquirrelMail on RHEL carlosinfl Linux - Server 1 02-24-2007 12:21 AM
bandwidth allocation by user wise and ip wise basbosco Linux - Networking 1 11-12-2003 02:54 AM


All times are GMT -5. The time now is 12:58 AM.

Main Menu
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