[Mimedefang] Blocking Certain E-Mail Addresses

Vincent Jaussaud tatooin at kelkoo.com
Mon Oct 28 09:46:01 EST 2002


You can also do this within sendmail.cf:

# Declare a new file, containing any pattern you want to reject
F{UnwantedUsers}        /etc/mail/unwantedusers

# In Scheck_mail [Where we check for "MAIL FROM:" command]
R$*$={UnwantedUsers}$*  $#error $@ 5.7.1 $: "Sorry, your domain is
unwanted here."

Now, if you had "@microsoft.com" into /etc/mail/unwantedusers, every
SMTP sessions containing @microsoft.com into the SMTP Command "MAIL
FROM:" will be rejected with a 5.7.1 error.

Note: Use <tab>, not <space>

Hope this helps.
Vincent.

On Sat, 2002-10-26 at 19:02, Dirk Mueller wrote:
> On Sam, 26 Okt 2002, Jeff Grossman wrote:
> 
> > >   return (0, 'my favourite insultment for the spammer')
> > >     if ($sender =~ /^<?foo\d+\@microsoft.com>?$/);
> > Thanks for the help.  I hope you don't mind if I ask a couple of
> > questions.  First, will the above, entered as is, reject the message?
> 
> it will make sendmail stop with a 5xx code and the above message directly 
> after the rcpt to: line. 
> 
> > If not, what do I need to put in the reject the message?  Secondly, can
> > you explain all of the parts of the second line?  What does everything
> > mean and why did you choose to do it that way?
> 
> this is a simple perl regular expression. 
> 
> man perlre
> 
> will tell you everything you want to know. 
> 
> 
> -- 
> Dirk (received 386 mails today)
> _______________________________________________
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
-- 
Vincent Jaussaud
Kelkoo.com Security Manager 
email: tatooin at kelkoo.com

"The UNIX philosophy is to design small tools that do one thing, and do
it well."




More information about the MIMEDefang mailing list