I have two postfix mail servers
- mailserver1 is running amavis to scan spam and virus mails
- mailserver2 is running without amavis.
My question is how is the smartest way to use mailserver1 respectively amavis from mailserver1 to scan the mails form mailserver2.
I already configurated postfix on mailserver1 to forward the mails to amavis and this works fine, but if it is possible I want to forward the mails from mailserver2 directly to amavis. Does someone know how I can specify amavis to listen to external ports too. My configuration of amavis already looks like this:
#where can i specify the ip address and the networks for which amavis is listening??
$inet_socket_port = [10024,10028]; # default listening socket
#incoming mail from server1
$interface_policy{'10024'} = 'S1';
#incoming mail from server2 forewarded by server1
$interface_policy{'10028'} = 'S2';
$policy_bank{'S1'} = {
#send back to postfix on local server1
notify_method => 'smtp:[127.0.0.1]:10026',
forward_method => 'smtp:[127.0.0.1]:10026',
};
$policy_bank{'S2'} = {
#send to postfix on other server2
notify_method => 'smtp:[192.168.1.2]:10029',
forward_method => 'smtp:[192.168.1.2]:10029',
};
So what do I have to add to this configuration that I can receive direct mails with amavis from mailserver2 and send them back to it.