Page 1 of 1

How to send email from two IP

Posted: Mon Jun 26, 2023 4:57 pm
by viela1881
I have a vesta setup with two IPs.
I want to send 40 email on each per hour rotational of cause. My aim is to keep a good email reputation.
How do i get that done.

Re: How to send email from two IP

Posted: Mon Jun 26, 2023 5:49 pm
by myVesta
https://github.com/myvesta/vesta/blob/m ... -for-email

but after that you need exim ACL customization for randomization.
example:

Code: Select all

remote_smtp:
  driver = smtp
  interface = "${lookup {${randint:2}} lsearch {/etc/exim4/virtual/ips}}"
  helo_data = "${lookup{$sending_ip_address}lsearch{/etc/exim4/virtual/helo_data}{$value}{FIRSTHOST}}"
bash part:

Code: Select all

echo "1: FIRSTIP" > /etc/exim4/virtual/ips
systemctl restart exim4

Re: How to send email from two IP

Posted: Mon Jun 26, 2023 10:38 pm
by viela1881
I'm a bit lost in the explanation.
Where do i add remote_smtp code and where do i add my list of ips?
A simplified explanation will be great

Re: How to send email from two IP

Posted: Tue Jun 27, 2023 7:44 am
by myVesta
after running v-make-separated-ip-for-email "MAIL_HOSTNAME" "MAIL_IP"
in file /etc/exim4/exim4.conf.template you will find existing block:

Code: Select all

######################################################################
#                      TRANSPORTS CONFIGURATION                      #
######################################################################
begin transports

remote_smtp:
  driver = smtp
  interface = ${if eq{$acl_m3}{yes}..........