amavis behind haproxy

Vitali Quiering vitali at
Wed Sep 19 15:17:34 CEST 2018

Thank you very much Tom.

If a postfix ( <>, the actual mailserver) sends a mail to another postfix ( that sends it to amavis (, how can you send the scanned mail back to <>?

Where do you loadbalance?

I am talking about up to 80 postfix instances that will send mail to <>.


> Am 19.09.2018 um 15:09 schrieb Tom Sommer <mail at>:
> On 2018-09-19 14:15, Vitali Quiering wrote:
>> I already got the forward_method, socket_bind and inet_acl setup
>> correctly. The problem I’m facing now is the ip that amavis sees and
>> wants to send the result to. This is the haproxy ip address which of
>> course doesn’t work.
> The problem is, IIRC, that haproxy doesn't send XFORWARD - it sends its own variant, supported by Postfix.
> So AFIAK you need Postfix in front the preserve the IP.
> You could in theory have postfix do the balancing between the multiple amavis servers (content filters), with a randomized lookup table, personally I just have a postfix in front of every amavis instance.
> --
> Tom

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the amavis-users mailing list