> Phil Barnett writes: 
> 
> > Is it outlined somewhere how to block a single mail address to a 
> > single mail address. 
> > 
> > I have a user who is being harrassed and I need to intervene. 
> 
> If someone is harrassing one of your users, then it would be reasonable to 
> presume that in doing so, they give up the privilege to email *anyone* at 
> your site. Therefore, adding the offender's email address to 
> /var/qmail/control/badmailfrom will do the trick.

.... alternatively, if you don't want the harrasser to know that they're being
blocked, you could setup a custom .qmail file for the user receiving the
harrassing mails, that filters out anything that looks unpleasant (Do this
by using a "Program delivery" to check the E-mail: Only then deliver
the message if it's not considered harrassing). An example .qmail file
for the harrassed user might look like this,

    | harrassment_checker
    ./Maildir/

where the harrassment_checker program could be shell or Perl script. If
it wishes to reject a message, it can return the error code 99. This should
mean that the harrasser doesn't get any "Message rejected" type error,
and the intended recipient doesn't receive the harrassing message. All
other mail goes through as normal.

See "man dot-qmail" for more details, also search the archive for messages
about writing .qmail files (you could, for example, trivially extend the above
to capture all harrassing E-mails in a separate Maildir).

cheers,

Andrew.

Reply via email to