Blocking a single user

Steve Freegard smf at F2S.COM
Wed Apr 20 11:29:01 IST 2005


Hi Ian,

On Wed, 2005-04-20 at 09:34 +0100, Ian Barnes wrote:
> Hi again,
>
> I want to blocka certain users email from being accepted onto my network.
> Now, i dont want to just mark it as spam or high spam, i just want to delete it.
>
> Is this possible ?
>

Yes - you do can do this in two ways:

1) You could do it using a spam blacklist in MailScanner

in MailScanner.conf set the value 'Is Definitely Spam
= /etc/MailScanner/rules/spam.blacklist.rules' and create the
file /etc/MailScanner/rules/spam.blacklist.rules and add:

To: <user at domain> yes
FromOrTo: default no

Then restart MailScanner.

2) You could do it at the MTA level (sendmail)

This is probably better as this will save you some bandwidth and
processor time.

See http://www.sendmail.org/m4/anti_spam.html and look for FEATURE
('blacklist_recipients') for the full details.

If you are on RedHat - all you need to do is edit /etc/mail/sendmail.mc
and make sure that the line 'FEATURE('blacklist_recipients')' does not
have a 'dnl' preceeding it.

Then edit /etc/mail/access and add the line:

user at domain.com                 REJECT

Then rebuild the maps by running 'make -C /etc/mail'.

What should then happen is that as part of the SMTP conversation
Sendmail will display reject the message at the 'RCPT TO' stage with a
550 general purpose rejection error and therefore you don't have to
actually receive the body of the message.

Hope this helps.

Kind regards,
Steve.

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!




More information about the MailScanner mailing list