I have 3 servers: server 1 and 2 are listed as mx servers for different domains and server 3 is for amavis/spamd/clamd filtering for both server 1 & 2. My plan is to have 'first pass' postfix listen on ports 587 and 25 on servers 1/2 and pass mail to amavis through server 3 port 10024.
The idea would then be to send mail after filtering back to the original server on port 10025, which would not have a filter directive (defined in master.cf). The best way I can think to do this would be to have an smpt client (postfix if possible) look up the mx record for the recipient domain (result=mx_host) and send the mail to [mx-host]:10025. This would not be an open relay because I would configure it only to accept mail from the loopback address (and thus from amavis).
However, I cannot seem to find how one would configure postfix smtp (or other) to deliver by default to port 10025.
Summary: 1) Is this path the right one to go down for remote spam/virus filtering? If not, what is better? 2) If it is, how can I get mail back to the queue on the correct server.
Thanks in advance,
Ed