How to send email from two IP

Post Reply
viela1881
Posts: 3
Joined: Mon Jun 26, 2023 4:47 pm

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.
User avatar
myVesta
Site Admin
Posts: 963
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 10 times
Been thanked: 6 times

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
viela1881
Posts: 3
Joined: Mon Jun 26, 2023 4:47 pm

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
User avatar
myVesta
Site Admin
Posts: 963
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 10 times
Been thanked: 6 times

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}..........
Post Reply