Amavis and Postfix in a cluster with smtpd_proxy_filter
Noel Jones
njones at megan.vbhcs.org
Fri Aug 29 16:35:34 CEST 2014
On 8/29/2014 8:53 AM, Carsten wrote:
> Hello all together,
>
> I've got a question to my clustering setup.
>
> I've got several firewalls, which receive Mails from the Internet,
> and they should send them to dedicated amavis nodes for scanning.
> This should be done by using smtpd_proxy_filter to be able, to
> directly reject spam and virus messages.
>
> The Firewalls have the IPs 10.1.1.1, 10.1.1.2 and 10.1.1.3
> I have got a loadbalancer VIP 10.2.2.1:10024, which sends the
> packets to the dedicated amavis nodes 10.2.2.5:10024 and
> 10.2.2.6:10024.
> The problem is the way back to one of the firewalls. I know, that I
> can use $forward_method and $notify_method, but which IPs should I
> put in there?
> I don't know, which Firewall is sending the request to amavis at the
> moment, so i can't statically define the IP to send back on Port 10025.
> I think, the mail needs to go back to the same Firewall von Port
> 10025, which originally contacted amavis.
>
> How can I archieve this or is there a better way to use amavis in a
> cluster setup?
>
> Thanks in advance
>
> Carsten
>From amavsid.conf-sample:
# To make it possible for several hosts to share one content
checking daemon,
# the IP address and/or the port number in $forward_method and
$notify_method
# may be spacified as an asterisk. An asterisk in the colon-separated
# second field (host) will be replaced by the SMTP client peer address,
# An asterisk in the third field (tcp port) will be replaced by the
incoming
# SMTP/LMTP session port number plus one. This obsoletes the
previously used
# less flexible configuration parameter $relayhost_is_client. An
example:
# $forward_method = 'smtp:*:*'; $notify_method = 'smtp:*:10587';
So it seems you can use
$forward_method = 'smtp:*:*';
$notify_method = $forward_method;
-- Noel Jones
More information about the amavis-users
mailing list