On 2010-03-11 Bacfd Bubb wrote: > I've got a virtual domain setup with a box dedicated to spam filtering > in front of it, to keep the hungry spam and av checks away from the > mail server itself. > > Mail between domains is delivered as expected, but the behaviour I'm > after is one where if the sender domain is not the same as the > recipient domain, and the recipient domain is on the mail server, and > if it hasn't got a header from the spam box; send it through the spam > box first. > > This way all local domains' incoming mail would get scanned and avoid > sending mail out through the spam box which is only setup to accept > mail for the domains on the mail server. The reason for this is all > the clean/crap reporting is done on the spam server and I'd like to > have those stats. > > I guess something like ( $sender_domain != $recipient_domain ) && > exists $local_domains{$recipient_domain} then send it on to the > header checks which would check for the spam box header and deliver > appropriately. Ideally these domains wouldn't come from the data > section.
Why not have the "spam box" act as the MX for your domains? That way all inbound mail would go through that box. I'd rather not rely on the presence of some header for the decision whether or not to spam-check an incoming mail. For relaying of outbound mail you could enable submission on the backend MTA. Regards Ansgar Wiechers -- "Abstractions save us time working, but they don't save us time learning." --Joel Spolsky