how to balance outgoing emails with multiple IP addresses with postfix

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

how to balance outgoing emails with multiple IP addresses with postfix

Paul Martin
Hello,

Do you know how to balance outgoing emails  with multiple IP addresses with postfix ?
(I do not have randmap on my postfix)

Thank you.

Paul
Reply | Threaded
Open this post in threaded view
|

Re: how to balance outgoing emails with multiple IP addresses with postfix

Matus UHLAR - fantomas
On 07.01.19 14:11, Paul Martin wrote:
>Do you know how to balance outgoing emails  with multiple IP addresses with
>postfix ?
>(I do not have randmap on my postfix)

what exactly are you trying to achieve?
To delay outgoing mail for anyone using greylisting?

--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I don't have lysdexia. The Dog wouldn't allow that.
Reply | Threaded
Open this post in threaded view
|

Re: how to balance outgoing emails with multiple IP addresses with postfix

Bokhan Artem
In reply to this post by Paul Martin
Hi.

It could be tcp table or mysql table or similar:

main.cf
transport_maps=mysql:/etc/postfix/select_ipaddress.cf

/etc/postfix/select_ipaddress.cf
hosts = 127.0.0.1
dbname = information_schema
user = postfix
password = changeme
query = select concat('mail', LPAD(ROUND((RAND()*(16-1))+1), 2, 0) ) as mail

master.cf
mail01    unix  -       -       y       -       -       smtp -o syslog_name=postfix-mail01 -o smtp_bind_address=1.1.1.1 -o smtp_helo_name=mail01
...
mail16    unix  -       -       y       -       -       smtp -o syslog_name=postfix-mail16 -o smtp_bind_address=16.16.16.16 -o smtp_helo_name=mail16

07.01.2019 20:11, Paul Martin пишет:
Hello,

Do you know how to balance outgoing emails  with multiple IP addresses with postfix ?
(I do not have randmap on my postfix)

Thank you.

Paul


Reply | Threaded
Open this post in threaded view
|

Re: how to balance outgoing emails with multiple IP addresses with postfix

Paul Martin
In reply to this post by Matus UHLAR - fantomas
A solution (with randmap for postfix version >3 ) is:

But I have postfix 2.xx, that's why I asked:
how  balance outgoing emails  with multiple IP addresses with postfix without randmap ?

Thank you.


Le lun. 7 janv. 2019 à 14:25, Matus UHLAR - fantomas <[hidden email]> a écrit :
On 07.01.19 14:11, Paul Martin wrote:
>Do you know how to balance outgoing emails  with multiple IP addresses with
>postfix ?
>(I do not have randmap on my postfix)

what exactly are you trying to achieve?
To delay outgoing mail for anyone using greylisting?

--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I don't have lysdexia. The Dog wouldn't allow that.
Reply | Threaded
Open this post in threaded view
|

Re: how to balance outgoing emails with multiple IP addresses with postfix

Christos Chatzaras


> On 7 Jan 2019, at 15:34, Paul Martin <[hidden email]> wrote:
>
> A solution (with randmap for postfix version >3 ) is:
> https://shami.blog/2016/04/randomize-source-ip-addresses-with-postfix/
>
> But I have postfix 2.xx, that's why I asked:
> how  balance outgoing emails  with multiple IP addresses with postfix without randmap ?
>
> Thank you.
>

We did it in the past with multiple VPS as relay with:

relayhost = [smtp.example.com]:587

smtp.example.com points to all IPs.

Our current setup is 2 SMTP relays with each having multiple IPs so we now use randmap.