On Sep 30, 2005, at 8:16 AM, Joseph Brennan wrote:
--On Friday, September 30, 2005 9:47 -0400 "McKinlay, Ken"
<[EMAIL PROTECTED]> 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 =~ /[EMAIL PROTECTED]) {
# some action
}
}
Actually, I think he said jdow is legit. So, if it's literally
"jdow????" (always 4 characters), then you want the if line to be this:
if ($recipient =~ /[EMAIL PROTECTED]/) {
(note: you forgot the $/ at the end of the regex)
If it's not just random characters, but a random number of characters,
then I would do this:
if ( ($recipient =~ /[EMAIL PROTECTED]/)
&& ($recipient !~ /[EMAIL PROTECTED]/) ) {
(I know, it shouldn't be able to match both, but I'm a little paranoid
sometimes)
_______________________________________________
Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list
[email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang