> Thanks for the info, i checked it for the POP users it is working fine.
>
> I want to know how it can be done for SMTP users. Kindly suggest.

Could you please explain how you identify the users,
is it only done by their address or is it done by IP.


The only method I can think of @ the top of my head is to set
control/virtualdomains & control/rcpthosts
so that the domains you want to block goes to a certain user.
This user could have the same type of script in it's .qmail,
also using the $DEFAULT variable to filter out the unwanted.
All messages that isn't blocket will be stored in this users maildir/box,
and must be resent unless you can do this directly from the script.
Because this method catches mail going to the domains you
are looking to block, you cannot resend them to the same mailserver.
It is very important that you test the script carefully,
to avoid looping or losing E-Mail to these domains.


#stops everyone from sending to [EMAIL PROTECTED]
|if [ "$DEFAULT" = "badguy" ]; then exit 99 ;fi

#stops [EMAIL PROTECTED] from sending to *@domain.com
|if [ "$SENDER" = "[EMAIL PROTECTED]" ]; then exit 99 ;fi

#stops [EMAIL PROTECTED] from sending to [EMAIL PROTECTED]
|if [ "$SENDER" = "[EMAIL PROTECTED]" ]; then if [ "$DEFAULT" = "badguy" ]; then 
|exit 99 ;fi ;fi

#delivers the mail temporarly, remember to resend them.
./Maildir/


It's also important to note that any user allowed to send trough your mailserver,
can forge his address bypassing all $SENDER checks and get to his destination.


Regards Andr� Paulsberg


Reply via email to