sendmail authentication

shenasar
shenasar used Ask the Experts™
on
hi,
  I am using sendmail 8.12.10 with sasl authentications for the user.
We have to restrict some of the users to send mails outside and receiving from outside while the others should have no restrictions.
  Could anybody suggest me how to accomplish this.

  Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
Is this feature not in sendmail. Is there any other MTA supports these type of feature.  please help me to achieve this.
Thanks.
Systems Administrator
Commented:
Edit the /etc/mail/access file.  From this file you can restrict using IP address
Example:
User1 is using 192.168.0.1. If you want to restrict is from sending out emails from the server you would add a line in the /etc/mail/access file such as this

192.168.0.1<TAB>REJECT or simply not to include this IP address from the list.

On the other hand, if you would like to allow this user to send out emails, add this line in the /etc/mail/access

192.168.0.1<TAB>RELAY

Just make sure after editing and saving the /etc/mail/access file you issue this
makemap hash access.db<access

Now with the sendmail-8.12.10 feature of AUTHENTICATION, this can be overided.  Even IP address are not included in the access file, they can send emails simply by AUTHENTICATION first.

Hope this helps.


Author

Commented:
hi SandyKalugdan,
    Thanks for your reply. This is ok. But there is a loop hole if the user uses other machine and then sends mails to outside. Our sendmail is configured to use user authentication. So restriction should be user based not ip based.

Author

Commented:
Well, I did not get any proper solutions. Now we made a serparate mail server  for those people.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial