procmail
[Top] [All Lists]

Re: How to restrict group mail ?

1999-07-26 02:52:08
On Sun, 25 Jul 1999 00:36:41 +0000 (UTC), Chandra Shekhar Kumar
<cs(_at_)astra(_dot_)xlri(_dot_)ac(_dot_)in> wrote:
             We are running a mail server on Red hat linux 5.2. Our
MTA is sendmail. Can u pls tell us how to restrict the group-mail
facility to only certain users. For example if we have created a
group-mail id like all_user(_at_)domain(_dot_)com then Only administrator
should be able to send the mail to this account.
  
I don't know what you mean by "group-mail" but if all_user is
currently an alias which expands to a long list of e-mail addresses,
you can filter incoming mail through (say) Procmail to limit who can
send mail to this alias. Change the alias definition to something like

    all_user: "| procmail /etc/local/all_user.rc"

and then in /etc/local/all_user.rc

    :0
    * ^From: administrator
    ! (actual list of recipients here)

    :0
    | ( formail -t ; echo "You are not allowed to send mail to all_users" ) \
      | $SENDMAIL $SENDMAILFLAGS -t

The first condition is very simplistic (anybody who can type in a
From: header and guess what it sould contain can get past this) and
sending a reply might not always be the best idea; perhaps the mail
should just be forwarded to postmaster (with an error message added to
the headers, probably). But hopefully, you can build something useful
on this.

Hope this helps,

/* era */

-- 
 Too much to say to fit into this .signature anyway: <http://www.iki.fi/era/>
  Fight spam in Europe: <http://www.euro.cauce.org/> * Sign the EU petition

<Prev in Thread] Current Thread [Next in Thread>