Привет Народ!Есть regex карты:
Kspamwords1_d regex -a@FOUND_D1 -f rev.gaoland.net|pool|dyn[.]user|broadband|in[.]hosting[.]ua|ppp|user|dsl|dynamic|dhcp|cable|pppoe
Kspamwords 2_d ....
Kspamwords3_d ....
....
Ksumm_d sequence spamwords1_d spamwords2_d spamwords3_d spamwords4_d ....
SLocal_check_relay
#R$* $| $* $: $(syslog B_H: $1 $) $1 $| $2
R$* $| $* $: $(summ_a $1 $) $| $1
R@FOUND_A1 $| $* $@ OK
R@FOUND_A2 $| $* $@ OK
R@FOUND_A3 $| $* $@ OK
R@FOUND_A4 $| $* $@ OK
R@FOUND_A5 $| $* $@ OK
R$* $| $* $: $(summ_d $1 $) $| $1
R@FOUND_D1 $| $* $#error $: 553 Bad Host1: We get a lot of spam from your relay-ip ($1). If you are not a spamer, please contact the tech@xxx.ru via another relay-ip.
R@FOUND_D2 $| $* $#error $: 553 Bad Host2: We get a lot of spam from your relay-ip ($1). If you are not a spamer, please contact the tech@xxx.ru via another relay-ip.
R@FOUND_D3 $| $* $#error $: 553 Bad Host3: We get a lot of spam from your relay-ip ($1). If you are not a spamer, please contact the tech@xxx.ru via another relay-ip.
.....
Данное правило должно фильтровать хосты по regex выражениям. Проблема в том, что sendmail не переводит hostname в нижний регистр перед отправкой его на проверку в regex map, т.е. не работает case-insensitive, что собственно должно быть по-умолчанию(ключ -f не задан). Из "Sendmail By Bryan Costales, Eric Allman":
============
33.3.4.3 -f don't fold keys to lowercase (V8.1 and above)
Ordinarily, sendmail will normalize a key to lowercase before looking it up in the database. If the keys in the database are case-sensitive ("TEX" is considered different from "tex," for example), the -f switch should be used to prevent this normalization. Note that if the -f switch is omitted (the default), the database must have been created with all lowercase keys (also the default).
============
Однако, когда hostname в нижнем регистре фильтрация проходит на ура.