Page 1 of 1
Ubuntu Exim4 - Send Mails from same IP website
Posted: Mon Jun 20, 2016 12:06 pm
by m4th3us
If you need to change the IP that is used to send email out of your systme, you can do so by editing your /etc/exim.conf.
Change:
remote_smtp:
driver = smtp
to:
remote_smtp:
driver = smtp
interface = 1.2.3.4
Where 1.2.3.4 is the IP you want exim to use.
source:
https://help.directadmin.com/item.php?id=152
Ex.: I host many websites and 5 IPs...
website1.com -> ip: 10.10.10.5
website2.com -> ip: 10.10.10.6
website3.com -> ip: 10.10.10.7
I would like to exim use the same IP that vestacp use to host website, for send mails
Anyone done that?
Re: Ubuntu Exim4 - Send Mails from same IP website
Posted: Wed Jun 22, 2016 1:01 pm
by SS88
It is possible to do with Exim as you can use expansion variables.
An example (plucked from DirectAdmin - so not Vesta specific):
Code: Select all
remote_smtp:
driver = smtp
interface = ${lookup{$sender_address_domain}lsearch{/etc/virtual/interfaces} {$value}{SHARED.IP.FROM.SERVER}}
helo_data = "mail.$sender_address_domain"
change
SHARED.IP.FROM.SERVER for domains not list in /etc/virtual/interfaces
/etc/virtual/interfaces
Code: Select all
domain1.com: xxx.xxx.xxx.xxx
domain2.com: yyy.yyy.yyy.yyy
Also here is another reference from DA:
http://forum.directadmin.com/showthread ... post215584
Re: Ubuntu Exim4 - Send Mails from same IP website
Posted: Wed Jun 22, 2016 2:05 pm
by m4th3us
SS88 wrote:It is possible to do with Exim as you can use expansion variables.
An example (plucked from DirectAdmin - so not Vesta specific):
Code: Select all
remote_smtp:
driver = smtp
interface = ${lookup{$sender_address_domain}lsearch{/etc/virtual/interfaces} {$value}{SHARED.IP.FROM.SERVER}}
helo_data = "mail.$sender_address_domain"
change
SHARED.IP.FROM.SERVER for domains not list in /etc/virtual/interfaces
/etc/virtual/interfaces
Code: Select all
domain1.com: xxx.xxx.xxx.xxx
domain2.com: yyy.yyy.yyy.yyy
Also here is another reference from DA:
http://forum.directadmin.com/showthread ... post215584
Thats what i did, and i was coming here to tell and you found same solution!
thanks anyway
Re: Ubuntu Exim4 - Send Mails from same IP website
Posted: Tue Oct 15, 2019 10:37 pm
by coolindark
How could you fix the helo message?
Mails drop to spam because of that. helo always sticks with the mail ip address.