Operating System - HP-UX
1751936 Members
4701 Online
108783 Solutions
New Discussion юеВ

Restrict user to send mail.

 
Yogesh M Puranik
Valued Contributor

Restrict user to send mail.

Hello Gurus,

In my env, I ve sendmail with version 8.11.1(HP-UX 11.23).I ve to restrict sendmail access for a perticular user.As per my knowledge I ve followed below steps .

Consider a user "test" for whom I wana restrict sendmail access.So i followed below steps

1]Added entry in /etc/mail/access
test@domain.com REJECT

2]Recreated access.db file.
makemap dbm /etc/mail/access < /etc/mail/access.

3] Sendmail restarted

After following above steps as well , I m still getting the mails from the user "test"

Kindly Help me to guess what went wrong in my above stpes?

Thanks in advance !!

Rgds
YOgesh
8 REPLIES 8
Anshumali
Esteemed Contributor

Re: Restrict user to send mail.

Recreated access.db with DBM type? Dont we create with hash type This might have nothing to do with the solution but just wanetd to add that:

makemap hash /etc/mail/access.db < /etc/mail/access

From man makemap:


makemap handles up to three different database formats, selected using
the maptype parameter. They may be:

dbm DBM format maps. (.pag,.dir)

btree B-Tree format maps. (.db)

hash Hash format maps. (.db)
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
Horia Chirculescu
Honored Contributor

Re: Restrict user to send mail.

>Consider a user "test" for whom I wana restrict sendmail access

Your implementation would not be enough (of course with hash format maps). This would not restrict your user to use another smtp server for sending email. So he will be able to send emails.

It will only reject emails sent to the specified user.

Best regards,
Horia.
Best regards from Romania,
Horia.
Prasanth V Aravind
Trusted Contributor

Re: Restrict user to send mail.

Hi Yougesh,


Check this link .. which given procedure to restict one user.

http://docs.hp.com/en/5969-4321/5969-4321.pdf

Gudluck
Prasanth
Yogesh M Puranik
Valued Contributor

Re: Restrict user to send mail.

Hi all,

I ve already tried all option mentioned.I ven't get my ans yet !!

Rgds
Yogesh


Steven Schweda
Honored Contributor

Re: Restrict user to send mail.

> [...] I ve to restrict sendmail access for
> a perticular user [...]

Why? What, exactly, is the problem which you
are trying to solve?

> [...] I m still getting the mails from the
> user "test"

A user does not need to use "sendmail" to
_send_ an e-mail message. It can be done
using many different programs, including,
for example, a Telnet client.

> [...] I ven't get my ans yet !!

Perhaps you're asking the wrong question.
Yogesh M Puranik
Valued Contributor

Re: Restrict user to send mail.

Hello all,

Thnx for reply...If I am no wrong My question is pretty simple and self explainatory...

more specific :

I just want user "test" should not send mail from its own login but others should.

Rgds
Yogesh
Steven Schweda
Honored Contributor

Re: Restrict user to send mail.

> I just want user "test" should not send
> mail from its own login but others should.

Ask him politely not to send e-mail messages?

There may be a way to stop him (on the system
where the e-mail message originates), but I
don't know what it would be. Certainly,
playing with "sendmail" (on the system where
the e-mail message originates) can _not_ stop
him (because he does _not_ need to use
"sendmail" there to send an e-mail message).

You might be able to use some kind of network
access control to restrict SMTP connections
(port 25) from the sending system to some
particular e-mail server system, and then
configure "sendmail" (or some similar
program) on that server to reject messages
from your problem user.
Steven E. Protter
Exalted Contributor

Re: Restrict user to send mail.

Shalom,

Consider not running the sendmail daemon.

It is needed for inbound, not outbouond mail.

The flaw in your process is the m4 daemon is not being run to rebuild your sendmail configuration.

http://hpux.ws/buildmail.hpux.text

Shows how to do that.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com