Send mail from dedicated IP

AxlF

Verified User
Joined
Dec 14, 2007
Messages
98
Hey,

My Server has two IP's. At the moment the second IP isn't used or configured in DA.
How could I configure exim using the second IP instead of the main IP of the server?

Best wishes,
AxlF
 
Thank you for your response.

the current value for in the exim conf is

interface = <; ${if exists{/etc/virtual/domainips}{${lookup{$sender_address_domain}lsearch*{/etc/virtual/domainips}}}}

should I modify this?

How can I persist the changes for exim updates through custombuild?


The exim.interface file doesn't exist. Should I create it manually?
 
Custombuild can't do it so you manual modify exim.conf as example above.
and create new file exim.interface
 
Could you be a little more detailed about your reply?

I'm switching from manual exim to exim via CB2.0

What goes in /etc/exim.interface?

Do we have to make edits to /etc/exim.conf?

In my old conf I simply had:

remote_smtp:
driver = smtp
interface = ${lookup{$sender_address_domain}lsearch{/etc/virtual/interfaces} {$value}{my_servers_main_ip_address}}

The new conf is:

remote_smtp:
driver = smtp
interface = <; ${if exists{/etc/virtual/domainips}{${lookup{$sender_address_domain}lsearch*{/etc/virtual/domainips}}}}

Please be more specific
 
I test the first option and not work, use the custom build 2.0 and the last exim version:

[root@tau ~]# exim -bV
Exim version 4.87 #2 built 06-Oct-2016 17:40:17

In the guide show that if you have a superior version not edit neccesary, in my exim.conf not have these lines:

interface
helo_data
smtp_active_hostname

I have add_domain_to_domainips enabled:
add_domain_to_domainips=1

then restart directadmin, when add a new domain with dedicated IP now have this:

[root@tau ~]# cat /etc/virtual/domainips
*:37.153.xx.xx
domain.com:37.153.xx.yy

[root@tau ~]# cat /etc/virtual/helo_data
37.153.xx.yy:yy.domain.com

But when send emails from this domain still sending with main IP address, can somebody helpme?

Thank you.
 
This may be an issue with mail being sent out via CRON.

Ex:
Magento 1.9.x sends out all emails via cron. And cron runs under a different user than the owner of the domain.

Drupal sends emails on demand (without cron), so email headers look proper.
 
Back
Top