The question may sound odd, but here's what I'm trying to do:

There are number of virtual domains defined on the local server that
is the final destination for these domains. Yet the MX record in the
DNS for these domains points to the mail exchangers of an external
spam filtering service which in turn forwards clean emails to my local
server. The local server doesn't receive mail (for these domains) from
any other source, in fact the interface is limited to the IPs of the
spam filtering service's relay servers to prevent bypassing the
external spam filter.

The domains have various "distribution groups" defined, alias users
whose only function is to forward the mail to two or more users (they
don't have a mailbox of their own – they're defined in
virtual_alias_maps). If possible, I'd like the emails forwarded from
these alias accounts to loop through the MX servers listed in the
domain's DNS record (i.e. the spam filtering service's mail servers)
rather than be delivered locally. The reason for this is that I would
like to have the spam filtered only once, on the final pass (i.e.
after the forward) so that if the inbound message is trapped as spam
it would be found in each recipient's spam quarantine.

In other words..

1. Inbound mail passes through the spam filtering service unfiltered
(the "distribution group" accounts are set to not filter at the
filtering service).
2. Inbound mail – spam or not – reaches my local server, it is
received at a "distribution group" alias account and forwarded to, for
example, three real users on the same domain.
3. At this stage I'd like the local server to forward the messages to
the mail servers listed in MX records for the domain (the spam
filtering service's mail servers) rather than deliver them locally.
4. Now the forwarded copies of the message are filtered for each user
who receives it.
5. If the copies of the message are clean, they are relayed to the
local server and delivered to the users' mailboxes (if they're found
to be spam, they're quarantined at the spam filtering service).

Thanks again for the advice!

Reply via email to