On Tue, 5 Jun 2001, David Parter wrote:
> look at cf/README, and look at the anti-spam example Local_check_mail
> and the "allnumbers" regex map. You can do the same thing to match your
> pattern.
For those whose interest may have been caught by this...
After reading David's hint, I made two changes on the mail relay:
1) Rebuilt sendmail with the following line added to site.config.m4:
define(`confMAPDEF', `-DMAP_REGEX')
I needed to do this in order to enable regular expression maps - I guess
the Build script doesn't automatically pick up on the fact that the OS
on the machine (RedHat 7.0, Linux 2.2.18) supports POSIX regular
expression processing.
2) Added these lines to the end of sendmail.mc and rebuilt sendmail.cf:
LOCAL_CONFIG
Kspamexpa regex -a@MATCH ^[a-z][a-z][0-9][a-z][a-z][0-9][0-9]+$
LOCAL_RULESETS
SLocal_check_mail
# check address against various regex checks
R$* $: $>Parse0 $>3 $1
R$+ < @ $+ > $* $: $(spamexpa $1 $)
R@MATCH $#error $: 553 Failure
While watching a tail -f on the machine's syslog, I now see that we're
rejecting all sorts of stuff with "553 Failure" errors. I had initially
set this to be "553 Bite me" on my test machine, but decided against it
for production. :-)
Thanks for the hint, David..
|