|
Question : Use wildcard in Virtusertable to combat spam / Junkmail? *easy*
|
|
The most effective way we've found of handling junkmail to nonexistent users is with virtusertable entries like the following:
[email protected] error:nouser User unknown
Recently, however, it appears that parsing errors either by mail clients or email harvesting robots have produced addresses like ":[email protected]" and "Jonathan|johndoe@ourdomain.com"
Is there a way to use a wildcard in the virtusertable entry that will successfully match any characters preceding johndoe? (i.e. *[email protected] error:nouser User unknown)
|
Answer : Use wildcard in Virtusertable to combat spam / Junkmail? *easy*
|
|
With a standard sendmail and virtusertable you can't do the kind of fuzzy match that you are asking for. And the reason for that is in the way virtusertable works. The virtusertable is a key-value database and when presented with an email address like [email protected] sendmail will attempt a lookup using the email address as the key. If that returns a value it will be used as the email account. If no value is returned "who" will be stripped and the lookup will be done using "@where.tld" as the key. Since the database can't do wildcarded key lookups, the sort of thing you are after would need to implemented using some other method.
In a way, what you are asking for in something of a contradiction in terms. You are wanting your "catch-all rule must exists(sic) to ALLOW incoming mail instead of bounce it", but then you really don't want to accept all incoming mail and want to bounce some of it. And it seems to me that your use of the mail system compounds the problem because you can't say, at any given time, what consitutes a valid or invalid email address.
Without modifying sendmail I suspect that the best solution might be to implement a procmail filter for the catch-all account and try to control the unwanted mail that way.
|
|
|
|