Roy: In addition to Lloyd's example, if the RBL ACL is set up correctly, you may need to look at an actual message header to insure the user has whitelisted the correct information.
And while on the subject of "which comes first," I've always wondered if there is a preferred order in which the anti-spam tests should be placed in the ACL, particularly as they relate to the verify recipient (aka user unkown) process.
For example, let's say you are using a combination of:
- HELO/EHLO tests
- RBL Checks
- Reverse Host Lookup
- Sender Verify
We've got things set up so that when a message arrives ...
1) It goes through various HELO/EHLO tests (quick and easy on resources). Rejected if does not pass.
2) If the message passes #1, a recipient check is performed and rejected if user is unkown. Of course Jonathan's Dictionary Attack script is at the very top of the stack.
3) If it passes #2, it is checked against various RBL's
4) If it passes #3, an rDNS check is performed (can lead to some false positives - we have to maintain a whitelist)
5) If the message gets through #4, a sender/callout takes place
6) Finally, the message is accepted and handed off to MailScanner / SpamAssassin.
I've seen some examples where the recipient verification is done further down in the process (i.e. RBL checks take place regardless of whether the mail is addressed to a valid user). Our objective was to cut down on resources and unnecessary queries. But are we better off having a spam source see we are verifying against RBLs and never seeing the user unkown?
Not certain there is a right answer. Anyone have any thoughts on the above? Thx -