How-to: Sending emails using IP address per domain in exim (Directadmin)

by

in

exim

To be able to send mails via different IP per domain, You need to do the following changes in the /etc/exim.conf file:

Find the “remote_smtp:” part, and add line

  
interface = "${lookup{$sender_address_domain}lsearch{/etc/virtual/domainips}{$value}}"

It should look something like:

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



File /etc/virtual/domainips syntax:

domain.tld: ip.add.re.ss

That’s it. Create the domainowners file, restart exim, and You are all set!


pssst… If You want to automagically generate domainips file by IP addresses that are assigned to users in DA – check out this POST.





Comments

One response to “How-to: Sending emails using IP address per domain in exim (Directadmin)”

  1. this configuration work as well, but if then change the main ip of the domain and assign the shared the emails are reject:

    550 HELO required before MAIL

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.