如何从其他邮件服务器扫描amavis邮件

我有两个后缀的邮件服务器

  • mailserver1正在运行amavis来扫描垃圾邮件和病毒邮件
  • mailserver2运行时没有amavis。

我的问题是,如何从mailserver1分别使用mailserver1和amavis来扫描邮件表单mailserver2。
我已经在邮件服务器1上configurationpostfix来将邮件转发给阿马维斯,这工作正常,但如果可能的话,我想从mailserver2邮件直接转发给阿马维斯。 有人知道我怎么能指定阿马维斯也听外部端口。 我的amavisconfiguration看起来像这样:

#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', }; 

那么,我必须添加到这个configuration,我可以从mailserver2接收amavis的直接邮件,并将它们发回给它。

$inet_socket_bind使用参数$inet_socket_bind 来指定哪个绑定IP地址 。 可能的值是undef或IP地址。 所以, 不可能指定一些IP地址,但不是全部。 默认值是127.0.0.1 ,这意味着amavis只在localhost上监听。

如果您通过将其绑定到公共IP地址来暴露amavisd,请不要忘记设置ACL,以便您不允许自由访问amavisd SMTP端口。 为此,请使用参数@inet_acl 。 例如:

 @inet_acl = qw(127.0.0.1 [::1] 192.168.1.2); # this will allow connection only from 127.0.0.1 or [::1] or 192.168.1.2)