[Mimedefang] Help with bouncing e-mails to group of users

Joseph Brennan brennan at columbia.edu
Fri Sep 30 11:16:16 EDT 2005

--On Friday, September 30, 2005 9:47 -0400 "McKinlay, Ken" 
<Ken.McKinlay at curtisswright.com> wrote:

> Greetings,
> I am hoping for either a simple sendmail or Mimedefang solution for a
> group of invalid addresses being used for joe-jobs. It appears that one
> of our e-mail addresses is sort of being used as the base of the "from"
> address in spam. The user component of the address is in the format of
> "jdow????", where the "?"s are a series of random letters. To populate
> an access.db file for sendmail to deny all the possible combinations
> just for that one example would need more than 450,000 entries.
> Can anyone help me either in creating a sendmail or Mimedefang routine
> that will bounce the message with a 5XX error when the recipient is in
> that format?

in filter_begin()

foreach $recipient (@Recipients) {
	if ($recipient =~ /^jdow.*\@curtiswright\.com) {
		# some action

Action might be to log it and action_discard(), if you are sure it
would always be junk.

Sendmail could be told to reject at MAIL with a local rule in
check_mail.  Use a regex map.  More efficient but harder to code
correctly.  Might be worth it if there's so much of this that it's
affecting service.

Joseph Brennan
Columbia University Information Technology

More information about the MIMEDefang mailing list