[PLUG] regex help requested
Colin Kuskie
ckuskie at dalsemi.com
Tue Nov 19 18:07:58 UTC 2002
On Tue, Nov 19, 2002 at 09:45:23AM -0800, Rich Shepard wrote:
> There's a domain, mail.com, that's infested with spammers. But, if I put
> in a postfix filter, /mail\.com/ REJECT, in the header_checks file,
> then domains such as hotmail.com are also rejected. Not a bad idea, but not
> practical, unfortunately.
>
> Would specifying the regex as /@mail\.com/ REJECT solve this problem
> and limit the rejection to only the mail.com domain? If not, is there a way
> of writing the expression to catch the one and not all of the others?
You should do that, and anchor the end.
/@mail\.com/ matches:
mail.com
mail.computers.net
If you think in filesystem wildcards, then it would look like this:
@mail.com*
If you anchor the end, /@mail\.com$/ then it should do the right
thing.
Colin
More information about the PLUG
mailing list