SJ Burns <[EMAIL PROTECTED]> wrote:
>I've looked through the mailing list archives, but couldn't find anything
>to help me with this one. I run a network in a school, and have been using
>qmail for nearly a year. It runs well, but some people (ie the kids here)
>are using the system for trivial and (occasionally) abusive purposes.
>Apart from locking the accounts of those responsible, I would like to
>implement a system where each user nominates the people he would like to
>email -- say, a list of five people. Any mail to any other destination
>won't get through. Those people I trust could get unrestricted access.
>
>I can hack perl quite proficiently, so if any coding is required that's
>what I would like to use. Could anyone provide me with a few pointers as
>to how to devise such a system? Thanks in advance.
It looks like a wrapper around qmail-remote would do the trick. E.g.,
create a script like the following and put it in
/var/qmail/bin/qmail-remote after renaming the real qmail-remote to
qmail-remote-real:
#!/bin/pseudoperl
$host=$1;
$sender=$2;
$recip=$3; # could be multiple recipients
# check table of senders/recips
if $ok
exec /var/qmail/bin/qmail-remote-real;
else
die "$sender can't send to $recip\@$host";
-Dave